F
Fernando Cacciola
I have the following C# declaration:
[DllImport("mylib.dll", CallingConvention = CallingConvention.StdCall)]
extern static bool SomeFunc( IntPtr a
,int [] b
,byte [] c
,PointF[] d
);
which calls into some unmanaged C++ function.
I'm using VS.NET 2003
The dissasembly output shows:
000000b9 push dword ptr [ebp-1Ch]
000000bc push dword ptr [ebp-14h]
000000bf mov edx,dword ptr [ebp-18h]
000000c2 mov ecx,dword ptr [ebp-4]
000000c5 call dword ptr ds:[09092E40h]
But this is wrong!!!!
only the last two parameters are being pushed onto the stack
the other two are passed in the edx and ecx registers.
naturally, it crashes, because the C++
functions expected the four arguments in the
stack.
I noticed that this has been reported here before:
http://tinyurl.com/4mgak
TIA
Fernando Cacciola
[DllImport("mylib.dll", CallingConvention = CallingConvention.StdCall)]
extern static bool SomeFunc( IntPtr a
,int [] b
,byte [] c
,PointF[] d
);
which calls into some unmanaged C++ function.
I'm using VS.NET 2003
The dissasembly output shows:
000000b9 push dword ptr [ebp-1Ch]
000000bc push dword ptr [ebp-14h]
000000bf mov edx,dword ptr [ebp-18h]
000000c2 mov ecx,dword ptr [ebp-4]
000000c5 call dword ptr ds:[09092E40h]
But this is wrong!!!!
only the last two parameters are being pushed onto the stack
the other two are passed in the edx and ecx registers.
naturally, it crashes, because the C++
functions expected the four arguments in the
stack.
I noticed that this has been reported here before:
http://tinyurl.com/4mgak
TIA
Fernando Cacciola