PerlRob has asked for the wisdom of the Perl Monks concerning the following question:
According to MSDN, a DWORD is a 32-bit unsigned long. So, in terms of pack(), I assume a DWORD corresponds to 'L'. The second member of the structure, a BYTE pointer to the data, seems a little more tricky. Since it needs a pointer to the data, I assume pack() is going to expect 'P', but I think a BYTE is 'C', so maybe some double packing is required? Here's what I've come up with...how far off am I?typedef struct DATA_BLOB { DWORD cbData; // DWORD that contains the count, in bytes, of data. BYTE *pbData; // Pointer to the data buffer. }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: pack() Question - DATA_BLOB structure
by Anonymous Monk on Jul 08, 2009 at 03:43 UTC | |
|
Re: pack() Question - DATA_BLOB structure
by jbt (Chaplain) on Jul 08, 2009 at 03:47 UTC |