Platform SDK: DirectX |
The IDirectPlay4::SecureOpen method creates or joins a secure session. When joining a secure session, use this method to supply logon credentials.
When creating a new session, the host computer can specify an alternate security package to use. When joining a session, a computer can specify a user name and password.
HRESULT SecureOpen( LPCDPSESSIONDESC2 lpsd, DWORD dwFlags, LPCDPSECURITYDESC lpSecurity, LPCDPCREDENTIALS lpCredentials );
If a session is to be created, then the application must completely fill out the DPSESSIONDESC2 structure with the properties of the sessions to be created. The guidInstance will be generated by DirectPlay. Note: The DPSESSION_SECURESERVER flag must be set to indicate that all computers attempting to open the session must be authenticated.
If you don't specify the DPSESSION_SECURESERVER flag when filling out the DPSESSIONDESC2 structure, SecureOpen will open an unsecure session, just as if you had called Open.
Returns DP_OK if successful or one of the following error values:
This method DPERR_LOGONDENIED after being called with invalid creadentials or without credentials when credentials are required. The application must collect the user's credentials and call SecureOpen again.
When joining a session, first call SecureOpen with no credentials. If the method returns DPERR_LOGONDENIED, then the application must collect the user name and password from the user and call SecureOpen again, passing in the user's credentials through the lpCredentials parameter. If the method returns DP_OK, then the player was able to logon with the credentials he or she had specified earlier during system logon (network logon in NTLM).
Windows NT/2000: Requires Windows 2000.
Windows 95/98: Requires Windows 95 or later. Available as a redistributable for Windows 95.
Header: Declared in dplay.h.
Import Library: Use dplayx.lib.