Share via


MTP IP Authentication Functions (Compact 7)

3/12/2014

The following table shows the MTP IP Authentication functions for MTP Responder in Windows Embedded Compact.

Function Description

MTPIPRegisterConnectionNotification

Registers a notification event for a pending TCP/IP connection from an MTP initiator.

MTPIPGetConnectionData

Retrieves information about a pending connection from an MTP initiator.

MTPIPAuthorizeConnection

Allows or rejects a pending TCP/IP connection from an MTP initiator.

Remarks

MTP IP Authentication functions manage incoming connections from MTP initiators over TCP/IP networks. You can use these functions to allow or reject a pending MTP IP connection by performing the following steps.

  1. Create an event object (you can use CreateEvent) and register for connection notification by passing the event object to MTPIPRegisterConnectionNotification.
  2. Wait for MTP Responder to notify you of an incoming connection. You can use WaitForSingleObject to wait on the event object.
  3. Upon notification of an incoming connection, call MTPIPGetConnectionData to return information about the pending connection in an MTPIPCONNECTIONINFO structure.
  4. Verify that the pending connection originates from a valid MTP initiator. To authenticate the connection, you can notify the user of a pending connection (you can display the MTP initiator host name returned in the MTPIPCONNECTIONINFO structure) and ask the user to allow or reject the connection to the device.
  5. To allow the pending connection to complete, call MTPIPAuthorizeConnection, pass in the "nonce" (number used once) that was returned in the MTPIPCONNECTIONINFO structure, and set the fAuthorize parameter to TRUE. To reject the connection, call MTPIPAuthorizeConnection, and set the fAuthorize parameter to FALSE.

See Also

Reference

MTP Responder Reference
MTP IP Authentication Structures