Hi,
You need to use the DSSetHandleSize function to allocate memory space for your string.
here is a snipit for an ni example:
int32 DynamicStringResize(LStrHandle in_string, int32 size)
{
MgErr error;
int32 i;
// Strings have the first 32 bits determine how many characters are in the string
error = DSSetHandleSize(in_string, sizeof(int32) + size*sizeof(uChar) );
if (error != mFullErr && error != mZoneErr)
{
(*in_string)->cnt=size;
for (i=0; i
(*in_string)->str[i]=(uChar)(65+i); //65 is decimal for character 'A'
return 0;
}
else return -1;
}
You can find this example at
http://sine.ni.com/apps/we/niepd_web_display.display_epd4?p_guid=B45EACE3E78F56A4E034080020E74861&p_node=DZ52065&p_submi
tted=&p_rank=&p_answer=&p_source=External
This should help sort your problem
Regards
Ray Farmer
Regards
Ray Farmer
