PxeProviderQueryIndex function (wdspxe.h)

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

Syntax

DWORD PXEAPI PxeProviderQueryIndex(
  [in]  LPCWSTR pszProviderName,
  [out] PULONG  puIndex
);

Parameters

[in] pszProviderName

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

[out] puIndex

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

Requirement Value
Minimum supported client None supported
Minimum supported server Windows Server 2008, Windows Server 2003 with SP2 [desktop apps only]
Target Platform Windows
Header wdspxe.h
Library WdsPxe.lib
DLL WdsPxe.dll

See also

PxeProviderRegister

Windows Deployment Services Server Functions