54 Chapter 2 Customizing the client
311644-J Rev 00
For the alttype command line switch, use one of the following:
• CN_RFC822_NAME 1
• CN_DNS_NAME 2
• CN_DIRECTORY_NAME 4
• CN_RESOURCE_LOCATOR 6
• CN_IP_ADDRESS 7
• CN_REGISTERED_ID 8
A sample command line string to launch the client and get a message posted back
to the launching application is:
Extranet.exe -h 1234 -m 1225 -a MyExtraNetConnection
Following the example above, when the tunnel either connects or fails to connect,
the IPsec client responds:
PostMessage(1234, 1225, (IPsec Hwnd), True/False).
When the message is posted back to the Windows handle of your application,
lParam indicates success or failure.
When the tunnel is established, lParam is True; when tunnel establishment fails,
lParam is False. The server does not report additional error handling, because the
IPsec client tells the user why the connection failed.