B
Bryan G
Hi, I'm working on a VB project which involves using C
library functions which take struct pointers as args, and
I keep running into this error when trying to pass either
an IntPtr or a Structure ByRef to the functions.
An unhandled exception of
type 'System.Runtime.InteropServices.MarshalDirectiveExcept
ion' occurred in ConsoleApplication1.exe
Additional information: PInvoke restriction: can not
return variants.
Can someone please give me a general idea of what "cannot
return variants" means? The function that I've imported
takes a struct pointer and returns void.
library functions which take struct pointers as args, and
I keep running into this error when trying to pass either
an IntPtr or a Structure ByRef to the functions.
An unhandled exception of
type 'System.Runtime.InteropServices.MarshalDirectiveExcept
ion' occurred in ConsoleApplication1.exe
Additional information: PInvoke restriction: can not
return variants.
Can someone please give me a general idea of what "cannot
return variants" means? The function that I've imported
takes a struct pointer and returns void.