Click here to Skip to main content
16,005,038 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: Multy threading question Pin
Yosh_10-May-10 2:12
professionalYosh_10-May-10 2:12 
QuestionAdapting a DLL to VB.NET, using PINVOKE Pin
Hrizip8-May-10 8:44
Hrizip8-May-10 8:44 
AnswerRe: enum, hex literals Pin
Luc Pattyn8-May-10 9:29
sitebuilderLuc Pattyn8-May-10 9:29 
GeneralRe: enum, hex literals Pin
Hrizip8-May-10 10:38
Hrizip8-May-10 10:38 
GeneralRe: enum, hex literals Pin
Hrizip8-May-10 22:10
Hrizip8-May-10 22:10 
GeneralRe: enum, hex literals Pin
Luc Pattyn9-May-10 2:02
sitebuilderLuc Pattyn9-May-10 2:02 
GeneralRe: enum, hex literals Pin
Hrizip9-May-10 2:36
Hrizip9-May-10 2:36 
AnswerRe: P/Invoke Pin
Luc Pattyn8-May-10 9:38
sitebuilderLuc Pattyn8-May-10 9:38 
the prototype should indicate either an array or a pointer, so try this:
<DllImport("kernel32", EntryPoint:="WriteFile", SetLastError:=True)> _
    Private Shared Function WriteFile(ByVal handle As IntPtr, ByRef bytes As Byte(), ByVal numBytesToWrite As Integer, ByRef numBytesWritten As Integer, ByRef overlapped As OVERLAPPED) As Integer
    End Function


I made bytes an array of bytes, not a single byte.
I expect that to work for you, I haven't done it in VB.NET yet, I normally do C# (and P/Invoke from C# to C).

Smile | :)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]

Prolific encyclopedia fixture proof-reader browser patron addict?
We all depend on the beast below.


GeneralRe: P/Invoke Pin
Hrizip8-May-10 10:42
Hrizip8-May-10 10:42 
GeneralRe: P/Invoke Pin
Luc Pattyn8-May-10 10:51
sitebuilderLuc Pattyn8-May-10 10:51 
GeneralRe: P/Invoke Pin
Hrizip8-May-10 10:56
Hrizip8-May-10 10:56 
AnswerRe: baudrate Pin
Luc Pattyn8-May-10 9:41
sitebuilderLuc Pattyn8-May-10 9:41 
GeneralRe: baudrate Pin
Hrizip8-May-10 22:11
Hrizip8-May-10 22:11 
AnswerRe: RegKey Pin
Luc Pattyn8-May-10 9:46
sitebuilderLuc Pattyn8-May-10 9:46 
GeneralRe: RegKey Pin
Hrizip8-May-10 22:11
Hrizip8-May-10 22:11 
AnswerRe: CallbackWrapper Pin
Luc Pattyn8-May-10 9:50
sitebuilderLuc Pattyn8-May-10 9:50 
AnswerRe: overall Pin
Luc Pattyn8-May-10 9:57
sitebuilderLuc Pattyn8-May-10 9:57 
GeneralRe: overall Pin
Hrizip8-May-10 10:52
Hrizip8-May-10 10:52 
GeneralRe: overall Pin
Luc Pattyn8-May-10 11:04
sitebuilderLuc Pattyn8-May-10 11:04 
AnswerRe: Adapting a DLL to VB.NET, using PINVOKE Pin
Hrizip8-May-10 22:32
Hrizip8-May-10 22:32 
GeneralRe: Adapting a DLL to VB.NET, using PINVOKE Pin
Luc Pattyn9-May-10 1:57
sitebuilderLuc Pattyn9-May-10 1:57 
GeneralRe: Adapting a DLL to VB.NET, using PINVOKE Pin
Hrizip9-May-10 2:38
Hrizip9-May-10 2:38 
AnswerRe: Adapting a DLL to VB.NET, using PINVOKE Pin
Hrizip12-May-10 23:54
Hrizip12-May-10 23:54 
QuestionHow could I debug the connection process of a COM AddIn Pin
Sonhospa8-May-10 8:12
Sonhospa8-May-10 8:12 
AnswerRe: How could I debug the connection process of a COM AddIn Pin
Luc Pattyn8-May-10 8:40
sitebuilderLuc Pattyn8-May-10 8:40 

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.