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

Visual Basic

 
QuestionUsing IEnumerator in String arrays Pin
byka27-May-14 5:59
byka27-May-14 5:59 
AnswerRe: Using IEnumerator in String arrays Pin
Eddy Vluggen27-May-14 7:21
professionalEddy Vluggen27-May-14 7:21 
QuestionHow to Compare two Architectural element using Programming Languages Pin
FOAD AL-DHOH26-May-14 21:50
FOAD AL-DHOH26-May-14 21:50 
GeneralRe: How to Compare two Architectural element using Programming Languages Pin
Richard MacCutchan26-May-14 23:28
mveRichard MacCutchan26-May-14 23:28 
QuestionFilter nested entities Pin
dilkonika26-May-14 4:39
dilkonika26-May-14 4:39 
QuestionMake image jump up using vb6.0 Pin
Otekpo Emmanuel22-May-14 14:21
Otekpo Emmanuel22-May-14 14:21 
AnswerRe: Make image jump up using vb6.0 Pin
Eddy Vluggen23-May-14 7:34
professionalEddy Vluggen23-May-14 7:34 
Questioncalling c dll that contains structures from VB6 Pin
Khaled_Eissa22-May-14 6:53
Khaled_Eissa22-May-14 6:53 
Hi all,

I have a dll that communicate with access control hardware which stores all transactions in its memory
unfortunately, all docs are in c# which I note able to manage since I know vb6 only

the main structure (Type as in vb6) has the following:

Public Structure sysReply

' Fields
<fieldoffset(0)> _
Public nsysNumber As Short
<fieldoffset(4)> _
Public nType As Integer
<marshalas(unmanagedtype.byvalarray, sizeconst:="&H400)," fieldoffset(8)=""> _
Public sBuffer As Char()
End Structur

the sbuffer array is the union of all events

what I understand that there is no union in vb6 but is UDT

so there is many UDT's thats is related to the sbuffer according to the nType in the sysReply structure

my question is how to deal with the above in vb6?

I did the following

Public type sysReply

nsysNumber As integer
nType as integer
sBuffer() As Byte
end type

public sReply as sysReply

there is other structures that is related to the nType



and use copymemory to copy the sysRply to every udt
like:

Dim bytcommstatus As sysReplyCommStatus

CopyMemory ByVal VarPtr(bytcommstatus), ByVal VarPtr(sReply), LenB(bytcommstatus)

With bytcommstatus
debug.print .status
debug.print .error_no

end with

I get get data but I face two problems

- data are not in same order as udt
- application crashes

can someone show me example?

regards
AnswerRe: calling c dll that contains structures from VB6 Pin
Eddy Vluggen23-May-14 7:33
professionalEddy Vluggen23-May-14 7:33 
QuestionSpeech(Audio file ) To Text file in VB.Net Pin
Member 1041929722-May-14 3:35
Member 1041929722-May-14 3:35 
AnswerRe: Speech(Audio file ) To Text file in VB.Net Pin
Richard MacCutchan22-May-14 3:56
mveRichard MacCutchan22-May-14 3:56 
AnswerRe: Speech(Audio file ) To Text file in VB.Net Pin
Dave Kreskowiak22-May-14 4:18
mveDave Kreskowiak22-May-14 4:18 
QuestionDetect if a messagebox is shown Pin
dilkonika22-May-14 1:26
dilkonika22-May-14 1:26 
AnswerRe: Detect if a messagebox is shown Pin
Dave Kreskowiak22-May-14 4:17
mveDave Kreskowiak22-May-14 4:17 
GeneralRe: Detect if a messagebox is shown Pin
dilkonika22-May-14 4:46
dilkonika22-May-14 4:46 
GeneralRe: Detect if a messagebox is shown Pin
Eddy Vluggen22-May-14 9:11
professionalEddy Vluggen22-May-14 9:11 
GeneralRe: Detect if a messagebox is shown Pin
dilkonika22-May-14 9:48
dilkonika22-May-14 9:48 
GeneralRe: Detect if a messagebox is shown Pin
Eddy Vluggen22-May-14 22:31
professionalEddy Vluggen22-May-14 22:31 
GeneralRe: Detect if a messagebox is shown Pin
Dave Kreskowiak22-May-14 11:11
mveDave Kreskowiak22-May-14 11:11 
GeneralRe: Detect if a messagebox is shown Pin
Dave Kreskowiak22-May-14 11:11
mveDave Kreskowiak22-May-14 11:11 
GeneralRe: Detect if a messagebox is shown Pin
dilkonika22-May-14 13:50
dilkonika22-May-14 13:50 
QuestionLoad method with file URL file location reference Pin
Member 1066669819-May-14 22:33
Member 1066669819-May-14 22:33 
AnswerRe: Load method with file URL file location reference Pin
Eddy Vluggen20-May-14 5:23
professionalEddy Vluggen20-May-14 5:23 
GeneralRe: Load method with file URL file location reference Pin
Member 1066669820-May-14 5:44
Member 1066669820-May-14 5:44 
QuestionListing Directory using FTPwebrequest and updating DB tables Pin
Sachin k Rajput 19-May-14 3:33
Sachin k Rajput 19-May-14 3:33 

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.