Hi all.
I created a structure in C#, DEVMODE, which is placed in winuser.h in C++.
Then I imported a function: ChangeDisplaySettings in the following way
This function has the following C++ declarationCode:[ DllImport( "user32", EntryPoint = "ChangeDisplaySettingsW", CallingConvention = CallingConvention.StdCall ) ] public static extern int ChangeDisplaySettings( ref DEVMODE lpDevMode, uint dwFlags );
I need to pass C++ NULL value for lpDevMode to this function in C#. How to do that?Code:WINUSERAPI LONG WINAPI ChangeDisplaySettingsW( IN LPDEVMODEW lpDevMode, IN DWORD dwFlags);
When I pass C# null, compiler gives an error.
Thanx for attention.


Reply With Quote