|
-
May 21st, 2000, 07:38 PM
#1
Thread Starter
New Member
I would like to add a printer with the addprinter api but:
Here is the declaration in C++:
HANDLE AddPrinter( LPTSTR pName, // pointer to server name
DWORD Level, // printer info. structure level
LPBYTE pPrinter // pointer to structure);
here is my declaration in VB:
Declare Function AddPrinter Lib "winspool.drv" Alias "AddPrinterA" (ByVal pName As String, ByVal Level As Long, pPrinter As any) As Long
I call the API like that, before I have fill in the Printer_Info_2 structure:
ReturnValue = AddPrinter("", 2, PrtInfo)
Return Value is a long, PrtInfo is a Printer_Info_2 structure.
But this API doesn't work at all, I think there is a problem with the pPrinter parametre but I'm not sure...
Does someone help me quick please???
Thank You
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|