Coś zaczynam kumać, tylko ten FILE_READ_ACCESS.
Drąże dalej ;-) To funkcja, która korzysta z tych danych:
DeviceIoControl(hDev, IOCTL_WAVE_SET_MIXER, DataIn, sizeof(DataIn), DataOut, sizeof(DataOut), &BytesReturned, NULL))
Z helpa SDK:
BOOL DeviceIoControl(
HANDLE hDevice, // handle to device of interest
DWORD dwIoControlCode, // control code of operation to perform
LPVOID lpInBuffer, // pointer to buffer to supply input data
DWORD nInBufferSize, // size of input buffer
LPVOID lpOutBuffer, // pointer to buffer to receive output data
DWORD nOutBufferSize, // size of output buffer
LPDWORD lpBytesReturned, // pointer to variable to receive output byte count
LPOVERLAPPED lpOverlapped // pointer to overlapped structure for asynchronous operation
);
Kompilator mi daje błąd niezgodności typu, zatrzymując się za lpBytesReturned. A mam tak:
DeviceIoControl(hDev, IOCTL_WAVE_SET_MIXER, @DataIn, SizeOf(DataIn), @DataOut, SizeOf(DataOut), BytesReturned, nil);
gdzie:
DataIn: array[0..1] of Longword;
DataOut: array[0..1] of Longword;
BytesReturned: LPDWORD;
hDev: integer;
LPOVERLAPPED - co to jest? Albo inaczej, czy podając tu nil (NULL) robię coś nie tak?
Pozdrawiam,
Jacek