HOWTO: Debug the Sample Gateway as a Console Application

ID: Q199087


The information in this article applies to:


SUMMARY

This 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.


MORE INFORMATION

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". Follow the preceding steps:

  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 <Long Name of Service>".


  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.

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


Keywords          : kbEDK kbXchge kbXchge500 kbXchge550 kbMsg kbEDK400 kbEDK500 kbEDK550 kbGrpMsg kbDSupport 
Version           : WINDOWS:4.0,5.0,5.5
Platform          : WINDOWS 
Issue type        : kbhowto 

Last Reviewed: July 15, 1999