G
Guest
Hello,
this my problem:
I have a struc, but i would like to know how can i do to convert it in byte.
This is my code:
[DllImport("winspool.drv", EntryPoint = "AddMonitor")]
public static extern int AddMonitorA(string pName, int Level, ref byte
pMonitors);
[StructLayout(LayoutKind.Sequential)]
public struct MONITOR_INFO_2
{
public string pName;
public string pEnvironment;
public string pDLLName;
}
AddMonitorA(null, 2,ref ???);
Thank you,
Best regards,
Wavemill
this my problem:
I have a struc, but i would like to know how can i do to convert it in byte.
This is my code:
[DllImport("winspool.drv", EntryPoint = "AddMonitor")]
public static extern int AddMonitorA(string pName, int Level, ref byte
pMonitors);
[StructLayout(LayoutKind.Sequential)]
public struct MONITOR_INFO_2
{
public string pName;
public string pEnvironment;
public string pDLLName;
}
AddMonitorA(null, 2,ref ???);
Thank you,
Best regards,
Wavemill