Original Post
🔒 Locked
VB structured data types
Advertisement
Unless I''m misinterpreting the question (quite likely
), then it works like this:
A few things you have to watch out for are the dynamic types (variable length strings and dynamic arrays), when written, VB puts in short headers describing their size, so unless you write those same headers with C++, then you can''t use those types.
Trying is the first step towards failure.
Type MyStruct
Blah1 As Integer
Blah2 As Long
Blah3(5) As Byte
Blah4 As String * 4
End Type
Function LoadStuff(Filename As String) As MyStruct
Dim Filenum As Long
Filenum = FreeFile
Open Filename For Binary As Filenum
Get Filenum, 1, LoadStuff
Close Filenum
End Function
A few things you have to watch out for are the dynamic types (variable length strings and dynamic arrays), when written, VB puts in short headers describing their size, so unless you write those same headers with C++, then you can''t use those types.
Trying is the first step towards failure.
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.
Sign in to reply to this topic.
Advertisement
