Click here to Skip to main content
15,925,400 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Pinvoking a non WIN32 API under VB, cant get handle to printer Pin
freakyit29-Jun-10 4:00
freakyit29-Jun-10 4:00 
GeneralRe: Pinvoking a non WIN32 API under VB, cant get handle to printer Pin
Hrizip29-Jun-10 4:31
Hrizip29-Jun-10 4:31 
AnswerRe: Pinvoking a non WIN32 API under VB, cant get handle to printer Pin
Luc Pattyn29-Jun-10 4:34
sitebuilderLuc Pattyn29-Jun-10 4:34 
GeneralRe: Pinvoking a non WIN32 API under VB, cant get handle to printer Pin
Hrizip29-Jun-10 4:36
Hrizip29-Jun-10 4:36 
AnswerRe: Pinvoking a non WIN32 API under VB, cant get handle to printer Pin
Luc Pattyn29-Jun-10 7:41
sitebuilderLuc Pattyn29-Jun-10 7:41 
GeneralRe: Pinvoking a non WIN32 API under VB, cant get handle to printer Pin
Hrizip29-Jun-10 7:58
Hrizip29-Jun-10 7:58 
GeneralRe: Pinvoking a non WIN32 API under VB, cant get handle to printer Pin
Luc Pattyn29-Jun-10 8:26
sitebuilderLuc Pattyn29-Jun-10 8:26 
GeneralRe: Pinvoking a non WIN32 API under VB, cant get handle to printer Pin
Hrizip29-Jun-10 8:34
Hrizip29-Jun-10 8:34 
I have SDkit provided by Zebra company, which features some C examples (which produce the same error as my VB.net code), I have my own code done in VB.net, the Delphi code was done by someone else on the internet (I do not have this code) and he stumbled into an extremely similar (maybe even identical) problem as I did.

My string (the name of the printer) is null terminated and I did try to pass that as LParray, safearray, char array and stringbuilder (same result = fail), one time I passed it as a pointer to the first character in the arrey (namely character "Z"), that time I didnt get the error code 63 nor 61 but the handle returned was still 0.

It is possible that I need to find a way to marshal this null terminated char array by the way of not sending only the pointer to the first element in the array but to the entire segment of memory, I do not know how to do this.

Even if I manage to do it, which I will certainly try to do, I might still get 0 as returned printer handle value.

No matter what I do, the returned printer handle always is "0", I think the dll is not able to communicate to the hardware hence errors 61 and 63 (no data from printer), hence invalid printer handle.
GeneralRe: Pinvoking a non WIN32 API under VB, cant get handle to printer Pin
Luc Pattyn29-Jun-10 8:52
sitebuilderLuc Pattyn29-Jun-10 8:52 
GeneralRe: Pinvoking a non WIN32 API under VB, cant get handle to printer Pin
Hrizip29-Jun-10 9:12
Hrizip29-Jun-10 9:12 
GeneralRe: Pinvoking a non WIN32 API under VB, cant get handle to printer Pin
Luc Pattyn29-Jun-10 10:03
sitebuilderLuc Pattyn29-Jun-10 10:03 
GeneralRe: Pinvoking a non WIN32 API under VB, cant get handle to printer Pin
Hrizip29-Jun-10 10:17
Hrizip29-Jun-10 10:17 
GeneralRe: Pinvoking a non WIN32 API under VB, cant get handle to printer Pin
Luc Pattyn29-Jun-10 10:26
sitebuilderLuc Pattyn29-Jun-10 10:26 
GeneralRe: Pinvoking a non WIN32 API under VB, cant get handle to printer Pin
Hrizip29-Jun-10 10:29
Hrizip29-Jun-10 10:29 
GeneralRe: Pinvoking a non WIN32 API under VB, cant get handle to printer Pin
Hrizip29-Jun-10 8:17
Hrizip29-Jun-10 8:17 
GeneralRe: Pinvoking a non WIN32 API under VB, cant get handle to printer Pin
Hrizip30-Jun-10 23:28
Hrizip30-Jun-10 23:28 
QuestionMDI window application with treeview by visual basic 2005 Pin
Andraw Tang28-Jun-10 9:03
Andraw Tang28-Jun-10 9:03 
AnswerRe: MDI window application with treeview by visual basic 2005 Pin
Dave Kreskowiak28-Jun-10 10:46
mveDave Kreskowiak28-Jun-10 10:46 
GeneralRe: MDI window application with treeview by visual basic 2005 Pin
Andraw Tang28-Jun-10 11:20
Andraw Tang28-Jun-10 11:20 
GeneralRe: MDI window application with treeview by visual basic 2005 Pin
Dave Kreskowiak28-Jun-10 14:09
mveDave Kreskowiak28-Jun-10 14:09 
GeneralRe: MDI window application with treeview by visual basic 2005 Pin
Andraw Tang28-Jun-10 11:39
Andraw Tang28-Jun-10 11:39 
GeneralRe: MDI window application with treeview by visual basic 2005 Pin
Dave Kreskowiak28-Jun-10 14:23
mveDave Kreskowiak28-Jun-10 14:23 
GeneralRe: MDI window application with treeview by visual basic 2005 Pin
Andraw Tang29-Jun-10 3:18
Andraw Tang29-Jun-10 3:18 
GeneralRe: MDI window application with treeview by visual basic 2005 Pin
Dave Kreskowiak29-Jun-10 5:14
mveDave Kreskowiak29-Jun-10 5:14 
GeneralRe: MDI window application with treeview by visual basic 2005 Pin
Andraw Tang29-Jun-10 5:23
Andraw Tang29-Jun-10 5:23 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.