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 winspool, prefix the name with the module name and a period.
if (ret)
{
PRINTER_INFO_2 [] Info2 = new PRINTER_INFO_2[cReturned];
int offset = pAddr.ToInt32();
for (int i = 0; i < cReturned; i++)
{
Info2[i] = (PRINTER_INFO_2) Marshal.PtrToStructure(new IntPtr(offset), typeof(PRINTER_INFO_2));
offset += Marshal.SizeOf(typeof(PRINTER_INFO_2));
}
Marshal.FreeHGlobal(pAddr);
Alternative Managed API:
PrinterSettings.InstalledPrinters, but this only gives the name of the printers.
Used by the EnumPrinters function in Winspool.
9/18/2014 9:25:10 PM - -65.89.124.19
Used by the EnumPrinters call in Winspool.
9/13/2013 2:04:16 AM - -193.109.238.134
Used by the EnumPrinters function in Winspool.
9/18/2014 9:25:10 PM - -65.89.124.19
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).