|
|
|
|
|
|
|
|
|
|
|
|
|
|
Coding Domino server tasks in C (continued)
To install all this software, just follow the instructions. There's no special installation required. On the C API Toolkit, you'll find there's no installer. You just unzip the files to a directory on your machine. If you get a hold of a CD-ROM copy of the toolkit, there's one thing to be careful of. If you use Windows Explorer to copy the files instead of a command line XCOPY, all the files will have the read-only attribute set, and this will cause you lots of problems. Therefore, make sure you read the "readme.pc" file before you start.
Because we're going to use the VC++6 IDE, you don't need to setup any DOS environment variables, whatever the toolkit instructions say. The toolkit sample programs all assume you'll be compiling from the command line, so that's why you need to follow some extra steps when you have completed installing the software listed above to compile and link the sample program.
Creating a VC++6 project As this article is about server tasks, let's start with the C API Toolkit sample program called "addin." Start VC++6 and choose New from the File menu. In the dialog box that pops up, you need the Projects tab. Select the "Win32 Console Application" as a project type. For the purposes of this first test, we're going to set up the project so we use the Lotus sample program in place. So in the "Location" box, navigate to "C:\notesapi\SAMPLES\SERVER". The exact path obviously depends on your own setup, but for this article I'll assume you used c:\notesapi to put the C API Toolkit in. For the Project Name box, type "addin" so that we use the same folder as the sample program. The other settings in this dialog box can be left at the defaults, so "supported platforms" has "Win32" checked and "Create Workspace" is enabled. You can now select the "OK" button.
The next dialog for the application type can be left set to "An empty project," and you can now hit the finish button. You then see another dialog that just confirms that VC++6 will create the project you've just defined. Once you've clicked OK, the project is set up for you. To add the sample code into your project, use the Project->Add to project->Files menu command. You should see addin.c listed as the file type defaults to C and C++ source files. Select addin.c and click OK. If you don't see addin.c, you probably set up the project in the wrong directory. Have a look at the files and directories in Windows Explorer and try to identify what you did wrong. Usually it's specifying c:\notesapi\samples\server\addin as the location when it should be c:\notesapi\samples\server, because VC++6 will put its own files in a subdirectory with the same name as the project ("addin" in our case).
You should now be able to use the left hand frame in VC++6 to select either the "class view" or "file view" and double click (single click doesn't work here for some reason) the class or file listed to see the source code. I tend to work from the "file view," but it's the same code either way.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-- Advertisement --
Learn Notes and Domino 8 at your place and pace!
Learn Notes and Domino in your office and/or home! TLCC's highly acclaimed distance learning courses for users, developers, and admins will enhance your career and your resume.
The many included activities and demos will make you a pro! Expert instructor help is a click away.
Click here to try a FREE demo course!! |
-- Advertisement --
Teamstudio Edition 25 has shipped
It's finally here! Now that Teamstudio Edition 25 has shipped, listen to our latest Tool Time audio program to find out what's changed. Updates to all your favorite Teamstudio tools will be discussed.
Plus, you'll get an introduction to Teamstudio Undo (formerly known as Teamstudio Snapper).
Tap here to get started! |
|
|
|
|
|
|
|
|
|
|