Click here to Skip to main content
15,914,322 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Pinvoking a non WIN32 API under VB, cant get handle to printer Pin
Hrizip29-Jun-10 3:00
Hrizip29-Jun-10 3:00 
AnswerRe: Pinvoking a non WIN32 API under VB, cant get handle to printer Pin
Luc Pattyn29-Jun-10 3:37
sitebuilderLuc Pattyn29-Jun-10 3:37 
GeneralRe: Pinvoking a non WIN32 API under VB, cant get handle to printer Pin
Hrizip29-Jun-10 3:43
Hrizip29-Jun-10 3:43 
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 
I looked deeper into the matter, here is my conclusion:

<DllImport("ZBRPrinter.dll")>
Public Shared Function ZBRGetHandle(ByVal hPrinter As IntPtr, ByVal pName As StringBuilder, ByRef printerType As Integer, ByRef err As Integer) As IntPtr
    End Function


which means:
1. no SetLastError (where did you get that idea? there already is an error pointer)
2. no Charset.Auto (the native code expects ANSI, which is the default)
3. pointers normally get passed by value

reminder: printerType in the SDK example was zero, not 330.

Smile | :)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles] Nil Volentibus Arduum
Please use < PRE > tags for code snippets, it preserves indentation, and improves readability.


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 
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 

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.