Connect:Direct for Microsoft Windows SDK Overview

Use the IBM® Connect:Direct® for Microsoft Windows Software Development Kit (SDK) to extend an application to include the automated file transfer capabilities of Connect:Direct for Microsoft Windows. SDK uses a 32-bit interface for C and C++ as well as an OLE automation server for Visual Basic applications. SDK also provides ActiveX controls for Submit Process and Select Statistics commands.

  • C API functions—Standard and registry API functions. The standard functions allow you to connect to a Connect:Direct node, execute Connect:Direct commands, manage command response data, and retrieve error information. The Registry API functions store and retrieve client connection information to and from the Registry. The C API is implemented using the C++ Classes.
  • C++ Class interface—Provides the foundation for the other Connect:Direct interfaces and provides Visual C++ programmers an object-oriented interface to Connect:Direct.
  • ActiveX control interface—Uses the CDSubmit and CDStatistics functions to submit Processes to the server and display statistics from the statistics database.
  • Direct Automation Servers—Provides an automation wrapper around the Connect:Direct SDK C++ classes. They provide direct automation support for languages like Visual Basic. The Connect:Direct Automation Servers provide the following primary classes that map directly to the CDNode, CDProcess, and CDStatistics classes in the SDK C++ classes:
  • User exits—Provides a way to customize Connect:Direct operations. User exits are user-defined dynamic link libraries (DLLs) that are loaded and called when the user exit is enabled through an initialization parameter. Two user exits are provided: one for enhanced security and one for automated file opening.

Before you can use the SDK tools, you can run the Client Connection Utility to configure server access information, such as TCP/IP information. Alternatively, you can let your SDK application specify the access information. Some SDK languages also support the Logon Configuration Utility (LCU files).

Distribute an Application

The following SDK files are required to be included when distributing an application developed with this SDK.

  • For C++ applications:
    • CdCore.dll
  • For C applications:
    • CdCore.dll
    • CdCapi.dll ("C" wrapper for cdcore.dll)
  • For VB - Automation Server
    • CdCore.dll
    • CDAuto.dll
    • CdAuto.tbl
  • For VB - Active X
    • CdCore.dll
    • CDStats.ocx
    • CDSubmit.ocx
DLL files are loaded by using the following algorithm:
  1. The directory containing the .exe that is loading the .dll
  2. The current directory
  3. The system directory (system32)
  4. The Microsoft Windows directory
  5. The directories list in the PATH environment variable.
Also, the OCX files must registered in the following manner:
  • regsvr32 "C:\Program Files\Sterling Commerce\Connect Direct v4.7.0\SDK\CDSubmit.ocx"
  • regsvr32 "C:\Program Files\Sterling Commerce\Connect Direct v4.7.0\SDK\CDStats.ocx"
Or you may use the "/s" option to do so without bringing up a dialog box:
  • regsvr32 /s "C:\Program Files\Sterling Commerce\Connect Direct v4.7.0\SDK\CDSubmit.ocx"
  • regsvr32 /s "C:\Program Files\Sterling Commerce\Connect Direct v4.7.0\SDK\CDStats.ocx"
In addition, when using the automation server, you also need to register CDAuto.dll. For example:
regsvr32 "C:\Program Files\Sterling Commerce\Connect Direct v4.7.0\SDK\CDAuto.dll"
If you are using the automation server, you must also register your Type Library files (.TLB) using regtlib.exe. Regtlib.exe is distributed with Visual Studio 6 and above and has updates available in the service packs or in other Microsoft Windows Library updates.
Note: CDCoreD.dll and CDCapiD.dll are debug versions and do not need to be distributed with the application.

Applications may also require the Microsoft Visual Studio Redistributable Runtimes. Not every system has this installed by default.

For checking about required DLLs, Microsoft's Dependency Walker (depends.exe) is the tool to use. It lists in detail all DLLs required by an application. The tool is included in the Resource Kit, Microsoft Windows 2000 Support Tools, Visual Studio and other packages.