[wdmaudiodev] WCOS: CM_Open_DevNode_Key with KEY_SET_VALUE fails when called from APO

  • From: "Edward Abramian" <edwabr123@xxxxxxxxx>
  • To: <wdmaudiodev@xxxxxxxxxxxxx>
  • Date: Tue, 3 Mar 2020 15:59:44 -0800

Hi,

 

I am having a problem using CM_Open_DevNode_Key to make our APO compatible
with Windows Core OS. It returns CR_ACCESS_DENIED when called from APO with
KEY_SET_VALUE access requested. KEY_QUERY_VALUE and KEY_NOTIFY work fine. We
need to be able to write some persistent values from within APO. Please
advise.

 

if ((cfgRet = CM_Locate_DevNodeW(&devInst, (LPWSTR)DeviceID.c_str(),
CM_LOCATE_DEVNODE_NORMAL)) == CR_SUCCESS) {

  HKEY devKeyHandle;

  if ((cfgRet = CM_Open_DevNode_Key(devInst, KEY_SET_VALUE, 0,
RegDisposition_OpenExisting, &devKeyHandle, CM_REGISTRY_SOFTWARE)) ==
CR_SUCCESS) {

    // Never gets here because of CR_ACCESS_DENIED

    RegCloseKey(devKeyHandle);

  }

}

 

Thanks,

Edward

 

Other related posts:

  • » [wdmaudiodev] WCOS: CM_Open_DevNode_Key with KEY_SET_VALUE fails when called from APO - Edward Abramian