IPluggableTransport::CreateConnection
Use the CreateConnection method to establish a T.123 connection for a NetMeeting 3 call.
HRESULT CreateConnection(
BSTR *pbstrConnectionID, // For placing a call and closing connection
PLUGXPRT_CALL_TYPE eCaller, // Caller versus recipient of call
DWORD dwProcessID, // Used for DuplicateHandle
HCOMMDEV hCommLink, // Handle to communications file handle
HEVENT hevtDataAvailable, // ReadyToRead event (data available)
HEVENT hevtWriteReady, // ReadyToWrite event
HEVENT hevtConnectionClosed, // Connection closed, possibly unexpectedly
PLUGXPRT_FRAMING eFraming, // Framing of bits sent on link
PLUGXPRT_PARAMETERS *pParams // OPTIONAL framing-specific parameters
);
Parameters
- pbstrConnectionID
[out] Pointer to a unique connection identifier (ID) later used by CloseConnection to disconnect. - eCaller
[in] A value from the PLUGXPRT_CALL_TYPE enumeration that identifies whether the call request is from caller or recipient of call. - dwProcessID
[in] Used to retrieve the source process handle. Used in conjunction with hCommLink to create local file handles. Also used with hevtDataAvailable, hevtWriteReady, and hevtConnectionClosed to create local event handles. - hCommLink
[in] Handle to communications file. Used in conjunction with dwProcessID to create local file handles. - hevtDataAvailable
[in] ReadyToRead event (data available). This must be reset automatically. Simulates FD_READ in Windows Sockets. - hevtWriteReady
[in] ReadytoWrite event. This must be reset automatically. Simulates FD_WRITE in Windows Sockets. - hevtConnectionClosed
[in] Connection closed, possibly unexpectedly. This must be reset automatically. Simulates FD_CLOSE in Windows Sockets. - eFraming
[in] A value from the PLUGXPRT_FRAMING enumeration specifying the framing of bits sent on the communications link. - pParams
[in] Optional parameter that is a pointer to a PLUGXPRT_PARAMETERS structure that lists framing-specific parameters.
Return Values
- S_OK
This connection has been created successfully. - E_POINTER
The parameter pbstrConnectionID is NULL. - E_INVALIDARG
The parameter dwProcessID or hCommLink is NULL or both. - E_ACCESSDENIED
The process cannot be opened or there would be duplicate handles. - E_OUTOFMEMORY
There has been a memory allocation failure.
Remarks
CreateConnection is designed to work seamlessly with INmManager::CallConference and INmManager::CreateCall. For example, when the address type is NM_ADDR_TRANSPORT, pbstrConnectionID for CreateConnectionpoints to a bstrAddr value needed for one of the INmManager methods.
Both the application calling and the application receiving the NetMeeting call need to invoke the CreateConnection method.
Requirements
** Windows NT/2000:** Requires Windows NT 4.0 SP3 or later.
** Windows 95/98:** Requires Windows 95 or later. Available as a redistributable for Windows 95.
** Version:** Requires NetMeeting 3.0 or later.
** Header:** Iplgxprt.idl.