Saakar
asked on
converting byte array from C++ to vb udt (Careful padding)
I am receiving byte array from C++ source.
I would want to convert it into VB udt
Because of padding issue in VB 6.0 i am unable to read in vb udt.
any solution
Saakar
I would want to convert it into VB udt
Because of padding issue in VB 6.0 i am unable to read in vb udt.
any solution
Saakar
sorry in vb they pad with 4 bytes, so change it to 4 bytes
by the way, i usually use 1 byte from c++ and then use copy memory on vb to extract the info one at the time instead of copy to udt
ASKER
I am already doing that, I a just wondering if there is a easy api to diretly convert it into DWORD (??) or VB UDT format.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
if you do, make sure in c++
Project->properties->c/c++
change struct memeber alignment to 1 byte and recompile