Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

*** Urgent *****

 

Hi all, I have lot of trouble trying to convert to .net...Below I have a declaration of an API, my problem is .net does not take the argument of

ByRef lparam as Any

 

this argument is a pointer to a structure......

 

Can someone help me out ........

 

 

 

----------CODE----------------------

Private Declare Function SendMessageAsAny Lib "user32" Alias "SendMessageA" _

(ByVal hWnd As Long, _

ByVal wMsg As Long, _

ByVal wParam As Long, _

ByRef lParam As Any) As Long

 

 

Function capGetVideoFormat(ByVal hCapWnd As Long, ByRef BmpFormat As BITMAPINFO, ByVal CapFormatSize As Long) As Long

capGetVideoFormat = SendMessageAsAny(hCapWnd, WM_CAP_GET_VIDEOFORMAT, CapFormatSize, BmpFormat)

End Function

  • *Experts*
Posted
Since you can have overloads in .NET, it's best to have multiple overloads. For example, declare the API multiple times, using different types for the last parameter.
Posted

I sort of understand what it meant now....well that what I have been doing....declare it as different type but my problem is that in vb6 I need to transfer this declaration of type ANY (ie Myfunction(byref Var as any)), which not does work in vb .net.....

 

Is there any way to convert it in .net.

 

pls someone help

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...