Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem with EnumForms
Message
De
01/08/2001 12:39:32
Calvin Smith
Wayne Reaves Computer Systems
Macon, Georgie, États-Unis
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Titre:
Problem with EnumForms
Divers
Thread ID:
00538385
Message ID:
00538385
Vues:
66
Can anyone tell me what or how many things are wrong with the following code. When I run it EnumForms generates an error 'Too many arguments'. The code is :

nerror = WS_OpenPrinter(oprint.genericprinter, @lnhand, lndef) && this should open the printer
if nerror = 0
do form mymessage with 'Unable to open the selected printer. Please check.'
return 0
endif


Local loPrtInfo,lnsuccess,lnstructure


bNeeded=0
nForms=0
nSize=0
nBuffSize=2000
loPrtInfo=CreateObject('clsPrinterForms')

nSize=loPrtInfo.sizeof()
lnStructure=loPrtInfo.GetPointer(nBuffSize)
lnsuccess=WS_EnumForms(lnhand, 1 , lnStructure , nSize, @bNeeded , @nForms )


where ws_enumforms is declared as

Declare Integer EnumForms in WinSpool.Drv as WS_EnumForms ;
Integer hPrinter ;
Integer nDataLevel ;
Integer @pInfoBuffer ;
Integer nSizeOfBuffer ;
Integer @nReceivedRequired ;
Integer @nFormsReceived
A problem is a problem only as long as it has a possible solution. Lacking that, it becomes a FACT!
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform