Microsoft KB Archive/199087

= HOW TO: Debug the Sample Gateway as a Console Application =

Article ID: 199087

Article Last Modified on 3/4/2004

-

APPLIES TO


 * Microsoft Exchange Development Kit 5.5
 * Microsoft Exchange Development Kit 5.5
 * Microsoft Exchange Server 2003 Software Development Kit

-



This article was previously published under Q199087





IN THIS TASK
SUMMARY
 * Configure the Sample Gateway Application



SUMMARY
This step-by-step article explains how to configure the sample gateway application to run as a console program. This arrangement makes it easier to run the gateway in the debugger and to step through the code. It is assumed that you have already installed the sample gateway.

In order to run the sample gateway as a console application rather than as a service, it's necessary to link the sample gateway with WinWrap.lib. You will also need to provide the command line arguments notserv and Long Name of the Service.

back to the top

Configure the Sample Gateway Application

 * 1) Compile Winwrap using debug build configuration. Winwrap is found at \MSSDK\Samples\Dbmsg\Exchange\Libsrc\Winwrap.
 * 2) Move the Winwrap.lib to the Mssdk\Lib directory.
 * 3) Open the sample gateway project in Visual C++. The gateway sample application is found at \MSSDK\Samples\Dbmsg\Exchange\Gwsample\Gwsample.dsp
 * 4) Add Winwrap.lib to the Link tab of the Project Settings.
 * 5) Locate the Long Name of the Service in the registry under HKLM\System\CurrentControlSet\Services. It appears as a key name. For more information, see the following Note.
 * 6) Select Projects Settings on the Debug tab, set the program arguments to "notserv ".
 * 7) Verify that IPM_OUT.dll and IPM_IN.dll are located in the (windir)\System32 directory.
 * 8) Build the sample gateway project.
 * 9) Set a break point and Debug-Go.

NOTE: If your sample gateway was installed according to Microsoft Knowledge Base article Q200669, then the key name will be equal to the value of the /service parameter supplied on the Servinst command line. If your sample gateway was installed with GWSetup, then the key name will be a GUID under HLM\System\CurrentControlSet\Services. If multiple GUIDs are present, it may be necessary to examine the DisplayName and ImagePath values to find the correct key.

back to the top

Additional query words: kbDSupport kbGrpMsg kbMsg kbEDK kbEDK500 kbEDK550 kbEDK400 kbXchge kbXchge500 kbXchge550

Keywords: kbhowto kbhowtomaster kbmsg KB199087

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.