网络参考可能原因: http://social.msdn.microsoft.com/Forums/en-US/csharpgeneral/thread/b0637998-dc89-4ff9-b59d-5ad262a48bc6 You need to set the calling convention. The default convention (stdcall) is not correct, which will cause P/Invoke stack imbalances.
For example, your first call should look like:
[DllImport("Service.dll", CallingConvention=CallingConvention.Cdecl)] static private extern IntPtr CallCreateClass(); By default, C and C++ use cdecl - but marshalling uses stdcall to match the Windows API.