Consultor Eletrônico



Kbase P9649: EnumPrinters is not working in some machines with WinXP and Win2000.
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   4/6/2011
Status: Verified

SYMPTOM(s):

EnumPrinters is not working in some machines with WinXP and Win2000.

EnumPrinters is not working in some machines with WinXP and Win2000 when it did with WinNT.

DLL procedure <procedure> using an uninitialized MEMPTR. (3233)

FACT(s) (Environment):

Windows XP
Windows 2000
Progress 9.0x
OpenEdge 10.x

CAUSE:

EnumPrinters behaves different depending on the platform.

FIX:

Try to set the Flag input parameter to 5 instead of 2.

Flag: 2 => Local printers
Flag: 5 => Remote printers

run EnumPrintersA(
output res,
input 5, /* instead of 2 */
input "",
input 2,
input-output pPrinterEnum,
input get-size(pPrinterEnum),
OUTPUT pcbNeeded,
OUTPUT pcReturned).