mciSendString from inside a DLL?
-
Not quite sure where I should ask this...I mean, this site really needs a Windows programming section, doesn't it? Anyways, here goes. I have this DLL trying to call mciSendString (command passed as a parameter). The call works fine in an EXE, but it refuses to do anything on a DLL (I'm testing with "set cdaudio door open"). The function gets called but it hangs. Forever. Stack, if it helps:
ntkrnlpa.exe!ExAllocatePoolWithTag+0x8ab
ntkrnlpa.exe!MmIsDriverVerifying+0xa08
ntkrnlpa.exe!MmIsDriverVerifying+0x12ea
ntkrnlpa.exe!PoShutdownBugCheck+0x32ce
ntkrnlpa.exe!KeSynchronizeExecution+0x10c
ntdll.dll!KiFastSystemCallRet
!WaitForSingleObject+0x12
!waveOutWrite+0x50c
!mci32Message+0x526
!mciSendCommandW+0x10b
!mciSendCommandW+0x48e
!mciSendStringW+0x31
!mciSendStringA+0x87Thanks! :)
-
Not quite sure where I should ask this...I mean, this site really needs a Windows programming section, doesn't it? Anyways, here goes. I have this DLL trying to call mciSendString (command passed as a parameter). The call works fine in an EXE, but it refuses to do anything on a DLL (I'm testing with "set cdaudio door open"). The function gets called but it hangs. Forever. Stack, if it helps:
ntkrnlpa.exe!ExAllocatePoolWithTag+0x8ab
ntkrnlpa.exe!MmIsDriverVerifying+0xa08
ntkrnlpa.exe!MmIsDriverVerifying+0x12ea
ntkrnlpa.exe!PoShutdownBugCheck+0x32ce
ntkrnlpa.exe!KeSynchronizeExecution+0x10c
ntdll.dll!KiFastSystemCallRet
!WaitForSingleObject+0x12
!waveOutWrite+0x50c
!mci32Message+0x526
!mciSendCommandW+0x10b
!mciSendCommandW+0x48e
!mciSendStringW+0x31
!mciSendStringA+0x87Thanks! :)
It seems to be a "deadlock"... :) (for example, a recursion on the code block, what is protected by a critical section... ...like: mciSendCommand(..)->mciSendString(..)->mciSendCommand(..))
virtual void BeHappy() = 0;
-
It seems to be a "deadlock"... :) (for example, a recursion on the code block, what is protected by a critical section... ...like: mciSendCommand(..)->mciSendString(..)->mciSendCommand(..))
virtual void BeHappy() = 0;
-
May be the analyzing of the stack before the call will help... :)
virtual void BeHappy() = 0;