The DrtOpen function creates a local Distributed Routing Table instance against criteria specified by the DRT_SETTINGS structure.
HRESULT DrtOpen( const DRT_SETTINGS *pSettings, HANDLE hEvent, const PVOID pvContext, HDRT *phDrt );
Pointer to the DRT_SETTINGS structure which specifies the settings used for the creation of the DRT instance.
Handle to the event signaled when an event occurs.
User defined context data which is passed to the application via events.
The new handle associated with the DRT. This is used in all future operations on the DRT instance.
This function returns S_OK on success. Other possible values include:
||phDrt is NULL.|
||pSettings is NULL or the dwSize member value of DRT_SETTINGS is not equal to the size of the DRT_SETTINGS object.|
||cbKey is not equal to 256 bits.|
||The ulMaxRoutingAddresses member of DRT_SETTINGS specifies less than 1 or more than 20 as the maximum number of addresses.|
||The hTransport member in DRT_SETTINGS is NULL or some fields of the Transport are NULL|
||The eSecurityMode member of DRT_SETTINGS specifies an invalid security mode.|
||The pSecurityProvider member of DRT_SETTINGS is NULL.|
||The pBootstrapProvider member of DRT_SETTINGS is NULL or some fields of the bootstrap provider are NULL.|
||The size of the pwzDrtInstancePrefix specified in DRT_SETTINGS is larger than the maximum prefix length (128).|
||The system cannot allocate memory for this operation.|
||The bootstrap provider is already attached.|
||The security provider is already attached.|
||The transport provider is already attached.|
||The certification chain is invalid.|
||Local certificate cannot be NULL in DRT_SECURE_MEMBERSHIP and DRT_SECURE_CONFIDENTIALPAYLOAD security.|
||Transport is shutting down.|
||Trasport is already bound.|
||Bootstrap provider failed to locate other nodes, but may be successful in a second attempt.|
||Transport provider parameter is NULL or invalid.|
||Transport is not attached.|
||An unexpected fatal error occurred.|
After DrtOpen is called, the DRT will begin the bootstrapping procedure and move to the DRT_ACTIVE or DRT_ALONE state, depending on the success of the bootstrap.
|Minimum supported client||Windows 7 Professional [desktop apps only]|
|Minimum supported server||Windows Server 2008 R2 [desktop apps only]|