views:

27

answers:

1

Hi there.

I'm porting a DLL written in C from WinCE 5.0 to WinCE 6.0 on an ARM target. This DLL is called by a .NET software. On WinCE5.0, everything runs fine. On WinCE6, I have the following problem:

  • on InitInstance() of my DLL, I can call anything without problem (for example MessageBox()) or uses recursivity.

  • Passed that point, the DLL is called by .NET code. And then it fails: even the arguments passed by .NET code seem weird. I can call MessageBox() once, but I can't call a function that calls MessageBox() and then that calls itself: recursivity is broken.

It seems that the .NET code uses the stack in a different way than my C code.

I'm very unfamillar with the Windows world and the company that gives me the .NET application does not understand yet why there is such a failure.

Any pointer/hint/advice welcome!

Thanks!

A: 

Well it appears that the calling convention changed at some point, between a DLL compiled on EV4/WinCE5 and called by some .NET code, and the same DLL compiled for VS2008/WinCE6. Now my DLL receives a pointer to wide chars instead of an object... Conditional compilation solved my problem while I would have liked to get a 'real' explanation from some official doc. Anyway the matter is settled now.

bernard