PxeProviderQueryIndex function

Returns the index of the specified provider in the list of registered providers.

Syntax


DWORD PXEAPI PxeProviderQueryIndex(
  _In_   LPCWSTR pszProviderName,
  _Out_  PULONG puIndex
);

Parameters

pszProviderName [in]

Friendly name for the provider from the call to the PxeProviderRegister function.

puIndex [out]

Address of a ULONG that will receive the index of the provider.

Return value

If the function succeeds, the return value is ERROR_SUCCESS.

Remarks

If a provider wants to insert itself in the list of registered providers in a specific order (that is, wants to service client requests before or after a certain provider), it can query the index of another provider and then use the returned index to decide its own location.

Examples


//
// Suppose Provider wants to handle requests after BINLSVC has rejected them.
//
dwError = PxeProviderQueryIndex(L"BINLSVC", &Index);

if (dwError == ERROR_SUCCESS)
{
 if (PxeProviderRegister(L"MYPROV",
                         L"C:\\MyDir\\MyProv.DLL",
                         PXE_REG_INDEX_BOTTOM,
                         Index + 1,              // Add after BINLSVC
                         &hKey) != ERROR_SUCCESS)
 {
  // Handle Error
 }
}


Requirements

Minimum supported client

None supported

Minimum supported server

Windows Server 2008, Windows Server 2003 with SP2 [desktop apps only]

Header

WdsPxe.h

Library

WdsPxe.lib

DLL

WdsPxe.dll

See also

Windows Deployment Services Server Functions
PxeProviderRegister

 

 

Community Additions

ADD
Show:
© 2014 Microsoft