I am calling an unmanaged DLL like follows in a Class wrapper.
namespace blah
{
[DllImport("DLLN ame.DLL", EntryPoint="Bla hEntryPoint",
CallingConventi on=CallingConve ntion.ThisCall]
public static extern void blahFn(out long blah, out long blah2);
class sealed ClassBlah
{
private ClassBlah()
{
}
}
}
Why have I to call this with the CallingConventi on of ThisCall, its just
normal "C" functions in a DLL. Why wont StdCall work?
What happens with other calling conventions is that the out parameters are
NOT set, yet with ThisCall, they are set ok, or appear to be. I find it odd.
Thanks
namespace blah
{
[DllImport("DLLN ame.DLL", EntryPoint="Bla hEntryPoint",
CallingConventi on=CallingConve ntion.ThisCall]
public static extern void blahFn(out long blah, out long blah2);
class sealed ClassBlah
{
private ClassBlah()
{
}
}
}
Why have I to call this with the CallingConventi on of ThisCall, its just
normal "C" functions in a DLL. Why wont StdCall work?
What happens with other calling conventions is that the out parameters are
NOT set, yet with ThisCall, they are set ok, or appear to be. I find it odd.
Thanks
Comment