Click here to Skip to main content
15,887,214 members
Home / Discussions / Visual Basic
   

Visual Basic

 
Questionconvert visual basic 6.0 to visual basic 2010 Pin
kikyamelia18-Jan-14 18:48
kikyamelia18-Jan-14 18:48 
AnswerRe: convert visual basic 6.0 to visual basic 2010 Pin
Peter Leow18-Jan-14 19:11
professionalPeter Leow18-Jan-14 19:11 
GeneralRe: convert visual basic 6.0 to visual basic 2010 Pin
kikyamelia18-Jan-14 20:21
kikyamelia18-Jan-14 20:21 
GeneralRe: convert visual basic 6.0 to visual basic 2010 Pin
Peter Leow18-Jan-14 20:36
professionalPeter Leow18-Jan-14 20:36 
AnswerRe: convert visual basic 6.0 to visual basic 2010 Pin
Eldar Zeynalov24-Jan-14 19:03
Eldar Zeynalov24-Jan-14 19:03 
AnswerRe: convert visual basic 6.0 to visual basic 2010 Pin
TheComputerMan31-Jan-14 5:07
TheComputerMan31-Jan-14 5:07 
QuestionSub reports Pin
Tsunamipudip17-Jan-14 2:10
Tsunamipudip17-Jan-14 2:10 
QuestionDelegates & Pointers Pin
Synth_Boy16-Jan-14 2:14
Synth_Boy16-Jan-14 2:14 
I'm trying to convert (from C++) a call to a DLL. I know that this requires a delegate etc but i am not getting very far as i believe i have a total misunderstanding of how delegates work with respect to pointers. The code i'm trying to convert is;

int __stdcall _RFID_Comms (char *sTx, char *sRx, WORD sRxSize, WORD timeout)

Parameters:
sTx - A pointer to a byte sized transmit buffer
sRx - A pointer to a byte sized receive buffer
sRxSize - Receive buffer size
timeout - The maximum length of time to wait in mS for incoming data.

I've converted this to;
VB
Public Delegate Sub DelegateTagComms(ByVal sTx As IntPtr, ByVal sRx As IntPtr, ByVal sRxSize As UShort, ByVal timeout As UShort)
    <DllImport("myCom.dll", CharSet:=CharSet.Unicode)> Public Function RFID_Comms(ByVal DTC As DelegateTagComms) As Integer
    End Function


But i'm not sure how to use this conversion as many attempts cause a 'Fatal Exception'. As i'm working on a PDA program i cant get much from the error.
If someone can explian how delegates work with DLL calls it would be much apprieciated.
AnswerRe: Delegates & Pointers Pin
Paulo Zemek16-Jan-14 3:17
mvaPaulo Zemek16-Jan-14 3:17 
GeneralRe: Delegates & Pointers Pin
Synth_Boy16-Jan-14 4:20
Synth_Boy16-Jan-14 4:20 
AnswerRe: Delegates & Pointers Pin
Dave Kreskowiak16-Jan-14 3:31
mveDave Kreskowiak16-Jan-14 3:31 
GeneralRe: Delegates & Pointers Pin
Synth_Boy16-Jan-14 4:24
Synth_Boy16-Jan-14 4:24 
GeneralRe: Delegates & Pointers Pin
Ron Beyer16-Jan-14 4:50
professionalRon Beyer16-Jan-14 4:50 
GeneralRe: Delegates & Pointers Pin
Synth_Boy16-Jan-14 5:15
Synth_Boy16-Jan-14 5:15 
GeneralRe: Delegates & Pointers Pin
Ron Beyer16-Jan-14 5:17
professionalRon Beyer16-Jan-14 5:17 
GeneralRe: Delegates & Pointers Pin
Synth_Boy16-Jan-14 6:03
Synth_Boy16-Jan-14 6:03 
AnswerRe: Delegates & Pointers Pin
Synth_Boy30-Jan-14 22:02
Synth_Boy30-Jan-14 22:02 
QuestionVb script Pin
Member 1052588115-Jan-14 4:25
Member 1052588115-Jan-14 4:25 
AnswerRe: Vb script Pin
Dave Kreskowiak15-Jan-14 4:38
mveDave Kreskowiak15-Jan-14 4:38 
AnswerRe: Vb script Pin
Ron Beyer15-Jan-14 5:00
professionalRon Beyer15-Jan-14 5:00 
Questionexe file Pin
Member 1052323315-Jan-14 2:23
Member 1052323315-Jan-14 2:23 
AnswerRe: exe file Pin
thatraja15-Jan-14 2:31
professionalthatraja15-Jan-14 2:31 
Questionvb 6.0 birthday reminder form code Pin
akcworld14-Jan-14 18:00
akcworld14-Jan-14 18:00 
AnswerRe: vb 6.0 birthday reminder form code Pin
Dave Kreskowiak14-Jan-14 18:13
mveDave Kreskowiak14-Jan-14 18:13 
Generalvisual basic 2010 homework Pin
Member 1052356014-Jan-14 5:10
Member 1052356014-Jan-14 5:10 

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.