An example of calling a c++ dll from c#. CallingConvention = CallingConvention.Cdecl and [MarshalAs(UnmanagedType.LPWStr)] are the important parts.