Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Passing User defined types ByVAL to a WinAPI call
Message
From
25/01/1999 16:07:58
Rob Gordon
Xon Digital Communications Ltd.
Dartmouth, Nova Scotia, Canada
 
 
To
All
General information
Forum:
Visual Basic
Category:
Windows API functions
Title:
Passing User defined types ByVAL to a WinAPI call
Miscellaneous
Thread ID:
00179989
Message ID:
00179989
Views:
47
I'm trying to use the ChildWindowFromPointEX function which is defined as :

Public Declare Function ChildWindowFromPointEx Lib "user32" (ByVal hWnd As Long, ByVal pt As POINT, ByVal un As Long) As Long

I have declared the POINT strucure as follows :
Public Type POINT
x As Long
y As Long
End Type

I can pass this POINT structure by reference (to other functions) without any trouble but I get compile errors when I try to pass it byVal. I tried declaring the variable ByRef but then I get a runtime "Bad DLL calling convention error"

Any ideas ??
Reply
Map
View

Click here to load this message in the networking platform