SonyUsbControlSend // that 2nd paramiter what is it for!?
"Alex Muirhead" <[email protected]>
| Newsgroups | gmane.comp.audio.netmd.devel |
|---|---|
| Message-ID | <002001c2d12e$4dcda9e0$331a89c3@oroin> |
I have been trying to understand SonyUsbControlSend part of the NetMDUSB library. So far I have concluded that there are 4 DWORD parameters the first is a handle to the NetMD Device driver the 2nd, I don't have a clue, seams to be 0x80 always HELP!! the 3rd, control to send to the NetMD the 4th, length of that control in bytes. If any of you know what that 2nd param is, or I have made a mistake in my hackings please do tell! So far I think that a flow for the GetCriticalSelection function might look like LocalAlloc, it creates the buffer it will use to send to the device driver, here some extra formatting is done to the buffer that 2nd param is stuck at the front (DWORD) and then the length of the control string (DWORD) before a copy of the sting itself then calls ResetEvent finally DeviceIOControl this is given the handled passed (well pointer to) from the begging a "hard-coded" constant 80002004 for IOControl Code, next is the pointer to the buffer created with local alloc, next is length of buffer passed (the length given to this function +8 for the 2 dwords added to the buffer),2 nulls for the un-used outbuffer and outbuffer size, followed by 2 places on the stack for bytes returned, and the overlapped structure, ESP+0x10 and ESP+0x18 respectively) Alex Muirhead [email protected] "When I was a child I spoke as a child I understood as a child I also thought that Linux was the best OS ever"