|
-
October 3rd, 2003, 08:27 AM
#5
that works real good for single string returns, like
Code:
BSTR ReturnString()
{
return a_BSTR
}
but if i need to change 2 or more strings like
Code:
void Change2Strings(String_Pointer s1, String_Pointer s2)
{
*s1 = "something";
*s2 = "something else";
}
then I'd need something else...
I wonder if allocating an array of type BYTE, with a single
element and allocating a string immediatly after that like
Code:
dim b(1) as byte
dim s as String
dim s2 as String
I wonder if that would store the string right after the array
in memory.
I can then pass the array to Visual C++. VB passes the address
of the first element, so if the string follows the array in memory, i can just add 1 to the location of the array, and i've got me the address of the first string, i have no idea how to get to the second string though, maybe add 255? (why am i telling you this?)
I'll try it if i get a chance, and let you know(if i get a chance)
thanks
awni
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|