nsresult rv = NS_ERROR_FAILURE;
DWORD             dwSizeNeeded = 0; DWORD             dwNumItems   = 0; LPPRINTER_INFO_2  lpInfo        = NULL;
GlobalPrinters::EnumerateNativePrinters(){  nsresult rv = NS_ERROR_FAILURE;  PR_PL(("-----------------------\n"));  PR_PL(("EnumerateNativePrinters\n"));  TCHAR szDefaultPrinterName[1024];      DWORD status = GetProfileString("devices", 0, ",", szDefaultPrinterName, sizeof(szDefaultPrinterName)/sizeof(TCHAR));  if (status > 0) {    DWORD count = 0;    LPTSTR sPtr   = (LPTSTR)szDefaultPrinterName;    LPTSTR ePtr   = (LPTSTR)(szDefaultPrinterName+(status*sizeof(TCHAR)));    LPTSTR prvPtr = sPtr;    while (sPtr < ePtr) {      if (*sPtr == NULL) {        LPTSTR name = _tcsdup(prvPtr);        mPrinters->AppendElement(name);        PR_PL(("Printer Name:    %s\n", prvPtr));        prvPtr = sPtr+1;        count++;      }      sPtr++;    }    rv = NS_OK;  }  PR_PL(("-----------------------\n"));  return rv;}