Type a page name and press Enter. You'll jump to the page if it exists, or you can create it if it doesn't.
To create a page in a module other than user32, prefix the name with the module name and a period.
<Runtime.InteropServices.DllImport("user32.dll")>
Private Function EnumDesktops(ByVal hwinsta As IntPtr, ByVal lpEnumFunc As EnumDesktopsDelegate, ByVal lParam As IntPtr) As Boolean
End Function
int _doEnumDesktops()
{
IList<string> list = new List<string>();
GCHandle gch = GCHandle.Alloc( list );
EnumDesktopsDelegate childProc = _enumDesktopCallback;
if (!EnumDesktops(IntPtr.Zero, childProc, GCHandle.ToIntPtr( gch ) ))
{
int e = Marshal.GetLastWin32Error();
WriteLine( "EnumDesktops errno={0}", e );
WriteLine( "EnumWindowStations errno={0}", e );
return 1;
}
foreach ( string a in list ) {
Console.WriteLine( a );
}
return 0;
}
Alternative Managed API:
Do you know one? Please contribute it!
The EnumDesktops API
7/17/2020 1:02:57 AM - -87.123.176.177
For use with the EnumDesktops function.
11/6/2008 5:07:25 PM - -222.130.195.98
Please edit this page!
Do you have...
helpful tips or sample code to share for using this API in managed code?
corrections to the existing content?
variations of the signature you want to share?
additional languages you want to include?
Select "Edit This Page" on the right hand toolbar and edit it! Or add new pages containing supporting types needed for this API (structures, delegates, and more).