STRING_BUFFER

Syntax

  typedef struct 
  { 
     UINT16   size; 
     char     string[1]; 
  } STRING_BUFFER;
  

Fields

size

Specifies the amount of memory (in bytes) allocated for string.

string

Specifies an array of one character.

Remarks

string can be declared as a NULL-terminated string array as follows:

  #define SIZE 32 
   
  STRING_BUFFER *s; 
   
  s = (STRING_BUFFER*)malloc(sizeof(STRING_BUFFER)+SIZE); 
  s->size = SIZE + 1; 
  strcpy(s->string, string);