I
ifdefdebug
Guest
Hi,
I use c++ Interop to wrap a native C library, meaning I just include the header files and let the compiler do the work.
Now inspecting the created managed Dll, I noticed the native functions get the following signature:
[MethodImpl(MethodImplOptions::Unmanaged, MethodCodeType=MethodCodeType::Native),
SuppressUnmanagedCodeSecurity,
DllImport(S"", EntryPoint=S"", CallingConvention=CallingConvention::Cdecl, SetLastError=true)]
Since the wrapped library does not use LastError, I'd like to have the DllImport with SetLastError=false.
I could not find any documentation about doing that.
Is it possible to tell the compiler to issue SetLastError=false, and if so, how is it done?
Thank you in advance
Continue reading...
I use c++ Interop to wrap a native C library, meaning I just include the header files and let the compiler do the work.
Now inspecting the created managed Dll, I noticed the native functions get the following signature:
[MethodImpl(MethodImplOptions::Unmanaged, MethodCodeType=MethodCodeType::Native),
SuppressUnmanagedCodeSecurity,
DllImport(S"", EntryPoint=S"", CallingConvention=CallingConvention::Cdecl, SetLastError=true)]
Since the wrapped library does not use LastError, I'd like to have the DllImport with SetLastError=false.
I could not find any documentation about doing that.
Is it possible to tell the compiler to issue SetLastError=false, and if so, how is it done?
Thank you in advance
Continue reading...