MTP IP Authentication Functions (Windows Embedded CE 6.0)

1/6/2010

The following table shows the MTP IP Authentication functions for MTP Responder in Windows Embedded CE 6.0 R3.

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.

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.

Community Additions

ADD
Show: