DrtOpen function (drt.h)
The DrtOpen function creates a local Distributed Routing Table instance against criteria specified by the DRT_SETTINGS structure.
Syntax
HRESULT DrtOpen(
[in] const DRT_SETTINGS *pSettings,
[in] HANDLE hEvent,
[in, optional] const PVOID pvContext,
[out] HDRT *phDrt
);
Parameters
[in] pSettings
Pointer to the DRT_SETTINGS structure which specifies the settings used for the creation of the DRT instance.
[in] hEvent
Handle to the event signaled when an event occurs.
[in, optional] pvContext
User defined context data which is passed to the application via events.
[out] phDrt
The new handle associated with the DRT. This is used in all future operations on the DRT instance.
Return value
This function returns S_OK on success. Other possible values include:
Return code | Description |
---|---|
|
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. |
|
Transport 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. |
Remarks
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.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 7 Professional [desktop apps only] |
Minimum supported server | Windows Server 2008 R2 [desktop apps only] |
Target Platform | Windows |
Header | drt.h |
Library | Drt.lib |
DLL | Drt.dll |