Alexander Puzankov alxpnv@gmail.com wrote:
- lpProc = mmioInstallIOProc(FOURCC_DOS, (LPMMIOPROC)mmio_test_IOProc, MMIO_INSTALLPROC);
- ok(lpProc == (LPMMIOPROC)mmio_test_IOProc, "mmioInstallIOProc error\n");
Please try to avoid this kind of casts, they hide the bugs. Also, if the tests depend on the following patches in sequence to pass, the tests should be sent as a last patch ('make test' should succeed after each patch in the sequence).
Ok, I missed that MSDN says that the first parameter of the custom I/O procedure is of type LPSTR instead of LPMMIOINFO (could be this an error in the documentation?). I can make cast in mmio_test_IOProc instead, something like:
static LRESULT CALLBACK mmio_test_IOProc(LPSTR lpMMIOInfo, UINT uMessage, LPARAM lParam1, LPARAM lParam2) { LPMMIOINFO lpmmioinfo = (LPMMIOINFO) lpMMIOInfo; ... }
So should I remove these casts and resend the entire patchset in the right order?
Best regards, Alexander Puzankov
Alexander Puzankov alxpnv@gmail.com wrote:
Ok, I missed that MSDN says that the first parameter of the custom I/O procedure is of type LPSTR instead of LPMMIOINFO (could be this an error in the documentation?).
Both PSDK and Wine headers use the same definition for MMIOPROC.
I can make cast in mmio_test_IOProc instead, something like:
static LRESULT CALLBACK mmio_test_IOProc(LPSTR lpMMIOInfo, UINT uMessage, LPARAM lParam1, LPARAM lParam2) { LPMMIOINFO lpmmioinfo = (LPMMIOINFO) lpMMIOInfo; ... }
So should I remove these casts and resend the entire patchset in the right order?
Yes please.