|
-
May 18th, 2006, 03:05 AM
#1
[RESOLVED] VB6 and VB.NET API Data Type Differences
Hello guys!
I'm doing a bit of research about the differences with the API in VB6 and VB.NET (2003)
For example:
VB6 hwnd = VB.NEt IntPtr
etc.
I couldn't find detailed info on msdn
VB.NET MVP 2008 - Present
-
May 18th, 2006, 07:26 AM
#2
Hyperactive Member
Re: VB6 and VB.NET API Data Type Differences
"making an api call" is now called "platform invoking". Or pinvoke or p/invoke. May help with google.
Remeber that when you invoke a platform method, you are calling a C funtion, and it uses a Windows data type. If you call from vb6 then you use the vb6 type that is has the same Size (in bytes) as the C type, and is similar (integer, float, string etc). So the information you really want is which .Net type is the best one to use for a Windows data type.
For that info see
Platform invoke data types , which is a part of this subject (note: nothing on this page relates to vb6 types!)
First stop when you are looking for a particular signature should be www.pinvoke.net
You also probably want the help docs in the platform sdk
And to read the msdn mag article on pinvoke.
And it gets more complicated, as often .Net does not automatically marshal the data, and you need to do some custom marshalling...
-
May 18th, 2006, 07:47 AM
#3
Re: VB6 and VB.NET API Data Type Differences
Hey Thanx man!!
That was exactly what I needed, you see I'm comparing the original datatypes to vb6, and then to VB.NET. I've read quite a lot about pinvoke already, it just seems that it perhaps slipped my mind, or I was looking for the wrong things - no wonder I couldn't find what I was looking for.
Thanx, clever dude!! I'll buy you a beer sometime
VB.NET MVP 2008 - Present
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|