Open wdstest opened 5 years ago
When the native signature is int MyFunction(BSTR * pszVerificationId)
int MyFunction(BSTR * pszVerificationId)
With PInvoke I can do something like
[System.Runtime.InteropServices.DllImportAttribute("TestDLL", EntryPoint = "MyFunction", CallingConvention = System.Runtime.InteropServices.CallingConvention.StdCall)] public static extern int MyFunction([MarshalAsAttribute(UnmanagedType.BStr)] ref string test);
With LegacyWrapper I don't know how to get it to work
[LegacyDllImport("TestDLL.dll")] public interface IUser32Dll : IDisposable { [LegacyDllMethod(CallingConvention = CallingConvention.StdCall)] int MyFunction([MarshalAs(UnmanagedType.BStr)]ref String test); }
But when I call it with
using (var client = WrapperProxyFactory<IUser32Dll>.GetInstance(configuration)) { client.MyFunction(ref test); }
I get System.Runtime.Serialization.SerializationException: 'End of Stream encountered before parsing was completed.'
When the native signature is
int MyFunction(BSTR * pszVerificationId)
With PInvoke I can do something like
With LegacyWrapper I don't know how to get it to work
But when I call it with
I get System.Runtime.Serialization.SerializationException: 'End of Stream encountered before parsing was completed.'