C# Class Microsoft.Protocols.TestSuites.Common.RpcAdapter

A class that implements RPC communications by calling native methods generated from IDL.
Mostra file Open project: OfficeDev/Interop-TestSuites Class Usage Examples

Public Methods

Method Description
Connect ( string server, string domain, string userName, string userDN, string password, string userSpn, MapiContext mapiContext, string options ) : IntPtr

It establishes a new Session Context with the server by calling native methods.

Disconnect ( IntPtr &cxh ) : uint

It calls the native method EcDoDisconnect that closes a Session Context with the server. The Session Context is destroyed and all associated server state, objects, and resources that are associated with the Session Context are released.

RpcAdapter ( ITestSite site ) : System

Initializes a new instance of the RpcAdapter class

RpcExt2 ( IntPtr &pcxh, byte rgbIn, byte &rgbOut, uint &pcbOut ) : uint

Sends remote operation (ROP) commands to the server with a Session Context Handle.

Private Methods

Method Description
Connect_Internal ( IntPtr &pcxh, string userDN, MapiContext &mapiContext ) : uint

The Connect method establishes a new Session Context with the server.

GetErrorCodeMeaning ( string errorCodeHexString ) : string

Get meaning of the error code based on description in [MS-OXCRPC] section 3.1.4.11.

RpcExceptionCode ( SEHException e ) : uint

Get the RPC Exception Code

RpcExt2 ( IntPtr &pcxh, uint &pulFlags, byte rgbIn, uint ropRequestLength, byte &rgbOut, uint &pcbOut, byte rgbAuxIn, uint auxInLength, byte &rgbAuxOut, uint &pcbAuxOut, uint &pulTransTime ) : uint

It calls native method EcDoRpcExt2 that sends remote operation (ROP) commands to the server with a Session Context Handle.

Method Details

Connect() public method

It establishes a new Session Context with the server by calling native methods.
public Connect ( string server, string domain, string userName, string userDN, string password, string userSpn, MapiContext mapiContext, string options ) : IntPtr
server string The server name.
domain string The domain the server is deployed
userName string The domain account name.
userDN string User's distinguished name (DN).
password string >user Password.
userSpn string User's SPN.
mapiContext MapiContext The default parameters for rpc call, such as authentication level, authentication method, whether to compress request.
options string proxy attribute
return System.IntPtr

Disconnect() public method

It calls the native method EcDoDisconnect that closes a Session Context with the server. The Session Context is destroyed and all associated server state, objects, and resources that are associated with the Session Context are released.
public Disconnect ( IntPtr &cxh ) : uint
cxh System.IntPtr On input, contains the CXH of the Session Context that the client wants to disconnect. /// On output, the server MUST clear the CXH to a zero value.
return uint

RpcAdapter() public method

Initializes a new instance of the RpcAdapter class
public RpcAdapter ( ITestSite site ) : System
site ITestSite An instance of ITestSite
return System

RpcExt2() public method

Sends remote operation (ROP) commands to the server with a Session Context Handle.
public RpcExt2 ( IntPtr &pcxh, byte rgbIn, byte &rgbOut, uint &pcbOut ) : uint
pcxh System.IntPtr On input, the client MUST pass a valid Session Context Handle that was created by calling EcDoConnectEx. /// The server uses the Session Context Handle to identify the Session Context to use for this call. On output, the server MUST return the same Session Context Handle on success.
rgbIn byte This buffer contains the ROP request payload.
rgbOut byte On success, this buffer contains the ROP response payload.
pcbOut uint On input, this parameter contains the maximum size of the rgbOut buffer.On output, this parameter contains the size of the ROP response payload.
return uint