I'm doing some WinAPI stuff and one of the structures is this:
Basically LPTSTR ptstrName should be "A pointer to a null-terminated string that contains the name of the trustee"
Well I'm a bit wary of doing this:
Where my ptstrName is a normal BlitzMax string. I'm not convinced it will work. I tried defining it as Byte Ptr but then later I can't do Trustee.ptstrName="User", whereas I can if it's a String.
I know when you do externs you can specify as null terminated string with $z but if I do:
Field ptstrName$z
I get "Illegal variable type" on compile.
This stuff does my head in. Any advice MEGA appreciated, thanks!
typedef struct _TRUSTEE { PTRUSTEE pMultipleTrustee; MULTIPLE_TRUSTEE_OPERATION MultipleTrusteeOperation; TRUSTEE_FORM TrusteeForm; TRUSTEE_TYPE TrusteeType; LPTSTR ptstrName; } TRUSTEE, *PTRUSTEE;
Basically LPTSTR ptstrName should be "A pointer to a null-terminated string that contains the name of the trustee"
Well I'm a bit wary of doing this:
Type TTRUSTEE Field pMultipleTrustee: Byte Ptr Field MultipleTrusteeOperation: Int Field TrusteeForm: Int Field TrusteeType: Int Field ptstrName: String End Type
Where my ptstrName is a normal BlitzMax string. I'm not convinced it will work. I tried defining it as Byte Ptr but then later I can't do Trustee.ptstrName="User", whereas I can if it's a String.
I know when you do externs you can specify as null terminated string with $z but if I do:
Field ptstrName$z
I get "Illegal variable type" on compile.
This stuff does my head in. Any advice MEGA appreciated, thanks!