[wdmaudiodev] using CreateFile for creating multi handles for an device

  • From: Karthik Gurumurthy <karthik.gurumurthy@xxxxxxxxxxxxxx>
  • To: wdmaudiodev@xxxxxxxxxxxxx, ntdev@xxxxxxxxxxxxx, "swapnil.kamble" <swapnil.kamble@xxxxxxxxx>, swapnil kamble <swap.kamble@xxxxxxxxx>
  • Date: Mon, 8 Jun 2009 11:50:51 +0530

Hi,
      I am using
LPCWSTR Device = L"\\\\.\\XXXXXXXX";

hFile = CreateFile(Device,
            GENERIC_READ |  GENERIC_WRITE,
            FILE_SHARE_READ | FILE_SHARE_WRITE, NULL,
            OPEN_EXISTING, 0, NULL);

For the creation of handle it is working File, Now if i try to create
another handle with

hFile = CreateFile(Device,
            GENERIC_READ |  GENERIC_WRITE,
            FILE_SHARE_READ | FILE_SHARE_WRITE, NULL,
            OPEN_EXISTING, 0, NULL);

This is failing with ACCESS_DENIED

what is the problem here? \\\\.\\XXXXXXXX has been created in device driver
sucessfully.

Other related posts: