Jump to content
Xtreme .Net Talk

Recommended Posts

Posted
I have been trying to develop a control using some API's, but sometimes I find that in VB6 you declared some parts of the function with the phrase "As Any", will be ok to declare them "As Object"????? what do you think??? I haven't found a good document telling about API's in .NET
Fat kids are harder to kidnap
Posted
That's why I'm asking, As Any and Variant are no longer supported on .NET, but can't find the correct Data Type, and I know the As Object will help, the API I'm calling is CreateWindowEx, in the last option you have to send you will see in every doument about API's and VB that the data type is Any.
Fat kids are harder to kidnap
  • Administrators
Posted

It is better to declare the parameters as the correct type rather than Object.

Quite often the parameters were declared as any because the API could accept differrent things (string, integer, long etc) - but usually this was a pointer to the data in memory.

 

In VB.Net simply declare the API multiple times, specifying the correct different versions of the API.

Posting Guidelines FAQ Post Formatting

 

Intellectuals solve problems; geniuses prevent them.

-- Albert Einstein

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...