ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

CONFIGRET WINAPI CM_Get_DevNode_Custom_Property_ExW ( DEVINST  dnDevInst,
PCWSTR  pszCustomPropertyName,
PULONG  pulRegDataType,
PVOID  Buffer,
PULONG  pulLength,
ULONG  ulFlags,
HMACHINE  hMachine 
)

Definition at line 1850 of file cfgmgr.c.

Referenced by CM_Get_DevNode_Custom_Property_ExA(), and CM_Get_DevNode_Custom_PropertyW().

{
    RPC_BINDING_HANDLE BindingHandle = NULL;
    HSTRING_TABLE StringTable = NULL;
    LPWSTR lpDevInst;
    ULONG ulDataType = REG_NONE;
    ULONG ulTransferLength;
    CONFIGRET ret = CR_SUCCESS;

    TRACE("%lx %s %p %p %p %lx %p\n", dnDevInst,
          debugstr_w(pszCustomPropertyName), pulRegDataType, Buffer,
          pulLength, ulFlags, hMachine);

    if (dnDevInst == 0)
        return CR_INVALID_DEVNODE;

    if (pszCustomPropertyName == NULL ||
        pulLength == NULL ||
        *pulLength == 0)
        return CR_INVALID_POINTER;

    if (ulFlags & ~CM_CUSTOMDEVPROP_BITS)
        return CR_INVALID_FLAG;

    if (hMachine != NULL)
    {
        BindingHandle = ((PMACHINE_INFO)hMachine)->BindingHandle;
        if (BindingHandle == NULL)
            return CR_FAILURE;

        StringTable = ((PMACHINE_INFO)hMachine)->StringTable;
        if (StringTable == 0)
            return CR_FAILURE;
    }
    else
    {
        if (!PnpGetLocalHandles(&BindingHandle, &StringTable))
            return CR_FAILURE;
    }

    lpDevInst = pSetupStringTableStringFromId(StringTable, dnDevInst);
    if (lpDevInst == NULL)
        return CR_INVALID_DEVNODE;

    ulTransferLength = *pulLength;

    RpcTryExcept
    {
        ret = PNP_GetCustomDevProp(BindingHandle,
                                   lpDevInst,
                                   (LPWSTR)pszCustomPropertyName,
                                   &ulDataType,
                                   Buffer,
                                   &ulTransferLength,
                                   pulLength,
                                   ulFlags);
    }
    RpcExcept(EXCEPTION_EXECUTE_HANDLER)
    {
        ret = RpcStatusToCmStatus(RpcExceptionCode());
    }
    RpcEndExcept;

    if (ret == CR_SUCCESS)
    {
        if (pulRegDataType != NULL)
            *pulRegDataType = ulDataType;
    }

    return ret;
}

Generated on Wed May 23 2012 05:15:35 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.