I am trying to print the contents of a buffer LPMIDIHDR lpBuffer
I am after the lpData member, and since it is declared as LPSTR
I tried doing it this way:
But I am only getting one characterCode:fprintf(fp,"lpBuffer = <%s>\n", &lpBuffer[i].lpData);
lpBuffer = <H>
What do I have to do to print out the entire string?
This is the structure from MSDN
Code:typedef struct midihdr_tag { LPSTR lpData; DWORD dwBufferLength; DWORD dwBytesRecorded; DWORD_PTR dwUser; DWORD dwFlags; struct midihdr_tag *lpNext; DWORD_PTR reserved; DWORD dwOffset; DWORD_PTR dwReserved[4]; } MIDIHDR, *LPMIDIHDR;




Reply With Quote