Click here to Skip to main content
15,889,849 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
In windows DDK'S MSVAD virtual audio driver, in IDMAChannel:copyto function I added the code for writing the audio data to WTS virtual channel. After the installation of driver the device is listing in the device manager with error code 7 (Filtering Failed - Possible problem in Device Driver Code) and a new speaker is not getting added for MSVAD driver in volume control.

Here is the code.
C++
STDMETHODIMP_(void)
CMiniportWaveCyclicStreamMSVAD::CopyTo
(
    IN  PVOID                   Destination,
    IN  PVOID                   Source,
    IN  ULONG                   ByteCount

)
{
    ULONG BytesWritten;
    BOOL bWritten1;
    UNREFERENCED_PARAMETER(Destination);
    UNREFERENCED_PARAMETER(Source);
    UNREFERENCED_PARAMETER(ByteCount);
 
  
   HANDLE m_handle = WTSVirtualChannelOpen(WTS_CURRENT_SERVER_HANDLE,          WTS_CURRENT_SESSION, "Remote");
 bWritten1 = WTSVirtualChannelWrite(m_handle,reinterpret_cast<pchar>(Source),  ByteCount, &BytesWritten);

} // CopyTo
</pchar>

If I remove the code for WTS virtual channel, device is listing in device manager without warning. In volume control also a new speaker is added.

Can anybody suggest me why virtual audio driver is not functioning if I use WTSVirtualchannel APIs and how to resolve it....

Thanks a lot.
Posted
Updated 24-Jun-11 9:49am
v2
Comments
Sandeep Mewara 24-Jun-11 15:50pm    
Next time please format the code part using PRE tags.. it makes the code more readable.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900