Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to get info from a pointer ?
Message
From
01/04/2003 11:19:33
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00772050
Message ID:
00772437
Views:
13
>>>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 ?
>>
>>pDriverName = 0
>>RtlMoveMem(@pDriverName,SubStr(pPrinter,4*4+1,4),4)
>
>Cetin,
>
>I've played with SYS(2600) in 7.0/8.0 with great success. Eliminates the need to ever have to use RtlCopyMem().

Oh this is new to me :) Actually I saw it but never tried to use. Would you give a sample for me. Help sample was obscure. Just 10-15 days ago I badly needed something like it but processing even with RtlMoveMemory turned out to be slow so created a FLL instead. Might be a good candidate for next version :)
(Thing I was trying to do is to read raw data files. A header definition was given. Each record was 228 bytes long holding a total of 123 signed, unsigned - char, short or int values. With over 200 CDs I needed to find a fast solution.)
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform