Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem with EnumForms
Message
 
 
À
01/08/2001 12:39:32
Calvin Smith
Wayne Reaves Computer Systems
Macon, Georgie, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00538385
Message ID:
00538389
Vues:
11
This message has been marked as the solution to the initial question of the thread.
>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

Calvi,
You forgot to put commas betwen arguments
Declare Integer EnumForms in WinSpool.Drv as WS_EnumForms ;
		Integer hPrinter, ;
		Integer nDataLevel, ;
		Integer @pInfoBuffer, ;
		Integer nSizeOfBuffer, ;
		Integer @nReceivedRequired, ;
		Integer @nFormsReceived
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform