Microsoft DirectX 9.0 SDK Update (Summer 2003) |
Enumerates the list of available devices on which the Network Address Translation (NAT) Resolver can be started.
Syntax
HRESULT EnumDevices(
DPN_SERVICE_PROVIDER_INFO *const pSPInfoBuffer, PDWORD const pdwBufferSize, PDWORD const pdwNumDevices, const DWORD dwFlags );
Parameters
- pSPInfoBuffer
- [out] Pointer to an array of DPN_SERVICE_PROVIDER_INFO structures that will be filled with service provider information.
- pdwBufferSize
- [out] Pointer to DWORD, which is filled with the size of the pSPInfoBuffer buffer.
- pdwNumDevices
- Pointer to DWORD which is filled with the number of DPN_SERVICE_PROVIDER_INFO structures returned in pSPInfoBuffer.
- dwFlags
- [in] Reserved. Set to NULL.
Return Value
Returns DPN_OK if successful, or one of the following error values.
DPNERR_BUFFERTOOSMALL The supplied buffer is not large enough to contain the requested data. DPNERR_INVALIDFLAGS The flags passed to this method are invalid. DPNERR_INVALIDOBJECT The Microsoft® DirectPlay® object pointer is invalid. DPNERR_INVALIDPARAM One or more of the parameters passed to the method are invalid. DPNERR_UNINITIALIZED The requested object has not been initialized.
Remarks
If the value at pdwBufferSize indicates the buffer is too small to hold the list of devices, the size required is placed in pdwBufferSize and DPNERR_BUFFERTOOSMALL is returned. Otherwise the size written is placed in pdwBufferSize