C
Chris Saunders
Here is the C declaration of a struct from Windows:
typedef struct _TXFS_READ_BACKUP_INFORMATION_OUT {
union {
//
// Used to return the required buffer size if return code is
STATUS_BUFFER_OVERFLOW
//
DWORD BufferLength;
//
// On success the data is copied here.
//
BYTE Buffer[1];
} DUMMYUNIONNAME;
} TXFS_READ_BACKUP_INFORMATION_OUT, *PTXFS_READ_BACKUP_INFORMATION_OUT;
Can I declare a pointer to Buffer[0] as BYTE ** ptr;
and if I have a pointer to some allocated memory BYTE * p;
can I assign it like this: Buffer[0] = p;
I'm actually accessing this C struct from another language and
my C is quite rusty so sorry for the dumb question.
Regards
Chris Saunders
typedef struct _TXFS_READ_BACKUP_INFORMATION_OUT {
union {
//
// Used to return the required buffer size if return code is
STATUS_BUFFER_OVERFLOW
//
DWORD BufferLength;
//
// On success the data is copied here.
//
BYTE Buffer[1];
} DUMMYUNIONNAME;
} TXFS_READ_BACKUP_INFORMATION_OUT, *PTXFS_READ_BACKUP_INFORMATION_OUT;
Can I declare a pointer to Buffer[0] as BYTE ** ptr;
and if I have a pointer to some allocated memory BYTE * p;
can I assign it like this: Buffer[0] = p;
I'm actually accessing this C struct from another language and
my C is quite rusty so sorry for the dumb question.
Regards
Chris Saunders