Error: Method's type signature is not PInvoke compatible

  • Thread starter Thread starter Petar Popara
  • Start date Start date
P

Petar Popara

I've got this error calling one DLL func from my VB.net app:

An unhandled exception of type
'System.Runtime.InteropServices.MarshalDirectiveException' occurred in
Test.exe
Additional information: Method's type signature is not PInvoke compatible.

Called func takes an structure as input (not as a reference/pointer) and
returns structure (not as a reference/pointer).

What should I do?
 
Back
Top