Page 1 of 1
PInvoke restriction: cannot return variants.
#2
Re: PInvoke restriction: cannot return variants.
Posted 25 June 2008 - 01:27 AM
#3
Re: PInvoke restriction: cannot return variants.
Posted 25 June 2008 - 01:36 AM
Hi
im using a program to record the keystroke in vb.net
In this line im getting the exception error
PInvoke restriction: cannot return variants.
** Edit **
im using a program to record the keystroke in vb.net
KeyHook = SetWindowsHookEx(WH_KEYBOARD_LL, KeyHookDelegate, Marshal.GetHINSTANCE(System.Reflection.Assembly.GetExecutingAssembly.GetModules()(0)).ToInt32, 0)
In this line im getting the exception error
PInvoke restriction: cannot return variants.
** Edit **
#4
Re: PInvoke restriction: cannot return variants.
Posted 25 June 2008 - 06:43 AM
Yes, PInvoke cannot return Variants (which is actually good).
Simply create an overloaded definition of the API function in question replacing the Any data type with the data type you need and you should be able to call the API Function.
Simply create an overloaded definition of the API function in question replacing the Any data type with the data type you need and you should be able to call the API Function.
Page 1 of 1

Reply





MultiQuote





|