Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to get info from a pointer ?
Message
 
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00772050
Message ID:
00886064
Views:
16
Hi sergey,

When i try i have "variable lnHandle not found"

What can i do ?

bernhart



>>DECLARE INTEGER GetPrinter IN winspool.drv ;
>>INTEGER hPrinter, INTEGER Lvl, STRING @pPrinter,;
>>INTEGER cbBuf, INTEGER @pcbNeeded
>>
>> Here is the structure of PRINTER_INFO_2 of GETPRINTER function
>>
>> pServerName As Long
>> pPrinterName As Long
>> pShareName As Long
>> pPortName As Long
>> pDriverName As Long
>> pComment As Long
>> pLocation As Long
>> pDevMode As Long 'DEVMODE
>> pSepFile As Long
>> pPrintProcessor As Long
>> pDatatype As Long
>> pParameters As Long
>> pSecurityDescriptor As Long 'SECURITY_DESCRIPTOR
>> Attributes As Long
>> Priority As Long
>> DefaultPriority As Long
>> StartTime As Long
>> UntilTime As Long
>> Status As Long
>> cJobs As Long
>> AveragePPM As Long
>>
>>How can i get the pDriverName value ?
>
>Download Heap allocation class File #9482.
Declare Integer GetPrinter in WinSpool.Drv as WS_GetPrinter ;
>		Integer hPrinter, ;
>		Integer Level, ;
>		String  @pPrinter, ;
>		Integer cbBuf, ;
>		Integer @pcbNeeded
>
>SET PROCEDURE TO clsheap
>lnNeeded = 4096
>lcBuffer = REPLICATE( CHR(0), lnNeeded)
>lnOK = WS_GetPrinter( lnHandle, 2, @lcBuffer, lnNeeded, @lnNeeded )
>lcDriverName = GetMemString(DwordToNum(SUBSTR(lcBuffer,13,4)))
>
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform