When you assign a string to a user defined type in Visual Basic, it is necessary to hard-code a null immediately after the string. For example:
myStruct.stringField = "Hello" + CHR$(0)