4.5 Sample Applications

There are several C3PO sample applications designed to show you how to build a usable C3PO. The code provided with these samples is intended to benefit you as you build your own C3PO software. While these samples have passed a rigorous testing process, they are not necessarily error-free.

4.5.1 C3POPower

A test application that uses a cross-section of Object API objects and tokens to show various ways the GroupWise 8 and later clients can be modified to suit developer and user needs in customizing GroupWise.

This project is not meant for production; it is offered to show how objects and tokens can be used together to perform a task.

The C3POPower sample application uses the following C3PO objects:

  • C3POManager
  • ClientState
  • GWMenu
  • GWMenuItem
  • GWMenuItems

The C3POPower sample application uses the following Object API objects:

  • Attachment
  • Attachments
  • Document
  • DocumentVersion
  • Folder
  • Message
  • MessageList

The C3POPower sample application uses the following tokens:

  • Cancel( )
  • DateAbsoluteGoTo(’+sDay+’;’+sMonth+’;’+sYear+’)
  • Delete( )
  • EnvPrefSavePath( )
  • FilterCreate(Empty!;0)
  • FilterDelete(’+Filter+’)
  • FilterGroupBegin(’+Filter+’;317)
  • FilterGroupEnd(’+Filter+’)
  • FilterGroupMarker(’+Filter+’;316)
  • FilterReset( )
  • FilterSetSource(’+Filter+’;6;1)
  • FilterSetText(’+Filter+’;1;"’ + FromString + ’";165)
  • ItemAttachmentAdd("X00";115;"’ + MsgID + ’")
  • ItemMessageIDFromView( )
  • ItemReply(Sender!;Yes!)
  • ItemSaveMessage("’+Filename+’";"’+t+’"; 269)
  • ItemSaveViewDlg( )
  • NewMail( )
  • EnvUserID( )
  • QueryExecute(;’+Filter+’;FullUserID:"’+RetString+’")
  • TextSetSubject("Fwd: ")
  • ViewHideMenu(Hide!)
  • ViewOpenFile("Ussm_ap.vew")

4.5.2 Customer Tracking (C++ and Delphi)

Lets you track your customers by building a Customer Tracking folder which contains: 1) a company profile; 2) a company contact; and 3) an action profile.

The Object API was used to create the Customer Tracking folder and the C3PO allows this application to interface with GroupWise.

This SDK contains three versions of the Customer Tracking sample application:

  • A DLL written in C++

  • An EXE written in Delphi

  • A DLL written in Delphi

The Delphi .EXE is provided to show you an example of an out-of-process server, while the Delphi .DLL is an example of an in-process server. Registration instructions for all three versions are provided below.

Note that if you run the .DLL applications from a location other than the SDK, you must edit the .REG file for the application to reflect the correct path to the .DLL. For example, if you copy this program with its file structure to your C: drive, you should find the line that ends "...\InprocServer32" in the .REG file, then change the D: in the next line to a C:.

To register the Customer Tracking C3PO in GroupWise,

  1. Open the CTS.REG file and change the path to the C3PO.DLL file to reflect its proper location.

  2. Run CTS.REG.

  3. Copy C3PO.DLL to the WINDOWS directory on your hard drive. This will enable CommandFactory::CustomizeToolbar and IconFactory::GetIcons to find the bitmap and icons in C3PO.DLL.

To register the Customer Tracking C3PO in C++ (C3PO.DLL),

  1. Copy C3PO.DLL to the WINDOWS directory on your hard drive.

  2. Run CTS.REG file to register the C3PO.

  3. Run C3PO.DLL to execute the C3PO.

To register the Customer Tracking C3PO in Delphi (CUSTRACK.EXE),

  1. Copy ICONS.DLL to the WINDOWS directory on your hard drive.

  2. Run C3POAUTO.REG to register the C3PO.

  3. The first time you run CUSTRACK.EXE, include the command line switch /regserver. (For example, CUSTRACK.EXE /regserver)

  4. Copy ICON.DLL to the WINDOWS directory on your hard drive.

  5. Succeeding executions do not require the /regserver switch.

To register the Customer Tracking C3PO in Delphi (CTRACK.DLL),

  1. Copy ICONS.DLL to the WINDOWS directory on your hard drive.



The Customer Tracking sample application uses the following C3PO objects:

  • C3POManager
  • C3POServer
  • ClientState
  • EventMonitor
  • IconFactory
  • GWMenu
  • GWMenuAction
  • GWMenuItem
  • GWMenuItems
  • GWMenuSeparator
  • GWToolbar
  • GWToolbarItem
  • GWToolbarItems

The Customer Tracking sample application uses the following Object API objects:

  • Account
  • Application
  • Field
  • FieldDefinition
  • FieldDefinitions
  • Fields
  • Folder
  • Folders
  • FormattedText
  • Message
  • Messages

4.5.3 Export

Allows a user to export a message or group of selected messages to a file on disk, and then optionally load that file into a viewer of your choice for quick browsing.

After you run setup, the next time you launch GroupWise an Export... option will appear on the context menu of the message window. Selecting this option will bring up a dialog box in which you should specify a filename. Clicking the Preferences button will provide you with a group of options from which you can specify what message data to export as well as additional options for such things as moving the selected items to a folder when the export is complete, or exporting only unread items. Selecting the Export Attachments option will cause all first-level attachments to be saved in the same directory as the specified filename.

Please note that the default viewer is Notepad, which does not support word wrap by default. You can either specify a no robust viewer or choose Edit|WordWrap to turn the option on.

4.5.4 GW Notes (Delphi)

Implements GroupWise "sticky" notes.

You can use GW Notes to annotate GroupWise messages or as a standalone application to create personal notes separate fromGroupWise. It allows users to drag a GroupWise note to the desktop to be a reminder. When you click the desktop Note icon, it opens the GroupWise Note view if GroupWise is already loaded. If GroupWise is not loaded, it loads GroupWise and then displays the note.

This sample application was written using both the GroupWise Object API and C3PO software with Delphi 2.0. To run this application, you must have Delphi 2.0 running on your system.

This sample application illustrates: 1) how to use an in-process C3PO server to communicate with a C3P0 server running as an out-of-process server; and 2) how to use the GroupWise Token Commander to pass macros to GroupWise.

To create and register the GW Notes C3PO,

  1. In Delphi, compile GWNOTES.DPR and GWNTS1.DPR.

  2. Run REGISTER path to GWNTS1.DLL.

To use GW Notes within GroupWise, choose a GW Notes menu option (such as New Note).

To use GW Notes independently of GroupWise, execute GWNOTES.EXE from Delphi or from a DOS prompt.

To unregister GWNTS1.DLL, type REGISTER path to WNTS1.DLL /u .

4.5.5 Skeleton

A Visual Basic project with skeleton classes for all of the corresponding C3PO objects. Programmers can add each class individually to their project or load the C3PO project and add functionality to it.

4.5.6 Tip of the Day

Provides a new GroupWise tip the first time a user opens the GroupWise client each day.