Search DominoPower's 11,443 Lotus-related article archive 
Home
EasyPrint
News details Click here for the RSS feed's XML code. This is not a browser URL.
Articles-only Click here for the RSS feed's XML code. This is not a browser URL.
Twitter Feed Click here for the Twitter feed.
Develop free Windows software for Domino with Borland (continued)

Now create a directory for my sample code and copy the .cpp, .h and .mak files in there. I used c:\projects\chksrv\ for the first utility and c:\projects\tellsrv\ for the second. The "make" files (ending in .mak) that I've written to compile and link these programs have been modified from the Lotus ones. I found the ones in the C++ API 2.1 Toolkit didn't seem to work with the Borland 5.5 compiler, and I suspect they were intended for an earlier version. You'll need to edit the make files using Notepad, but only to modify the four lines that tell the compiler the paths you've used to install your software. These are the lines starting LIB, INCLUDE, BCC55COMPILE, and BCC55LINK near the top of the file. You'll see that I installed my compiler to the directory c:\program files\bcc55 and the Lotus C++ 2.1 toolkit to c:\lotus\cppapi so if you have chosen different paths, please change the four lines appropriately.

Open a Command Prompt window and change to the directory of the first utility using the command cd\projects\chksrv. Now type:

c:\program files\bcc55\bin\make -f borwin32.mak

The program should then compile and link. You may get a couple of warnings, but hopefully no errors. The reason you have to type the full path for the make utility is that you haven't put the compiler program directory c:\program files\bcc55\bin into the system path. It's not necessary to do this, but if you write a lot programs, it might be worth it to save yourself some time.

Testing your new programs
So now you can test out the chksrv program. Copy the chksrv.exe file to the program directory of your Notes R5 client. In my case, it's c:\lotus\notes. Now go to the Lotus C++ toolkit and copy the lcppb21.dll file also to the Notes program directory from c:\program files\bcc55\lib\borwin32 as the API programs need this DLL to run. In your Command Prompt window use cd\Lotus\Notes to get to the place you copied the programs to and type:

chksrv yourserver 10

Use the common name of one of your servers in place of "yourserver". The program should now check this server every 10 seconds and report how long it took to respond. To end the program, press any key on the keyboard.

Now test the tellsrv program. Compile it in the same way as the chksrv program and copy the tellsrv.exe file to the Notes program directory. In the Command Prompt window type:

tellsrv yourserver "show tasks"

The server will respond to your command just as if you were using the remote server console in the administration client.

The tellsrv program is different from chksrv in that it uses C API function calls as well C++ API calls. To enable this, the makefile links an extra library called notes.lib into the program that Lotus supplies with the C++ toolkit. The C++ API contains a function to issue remote server commands, but it has a fatal flaw. The C++ ExecuteServer function returns the server's response into an LNString object. LNString is limited to 64K, and this causes an error if you type "show tasks" on a busy server because the response has more than 64K of text. To get around this, I copied the sample code from the Lotus C API toolkit for the NSFRemoteConsole function instead of ExecuteServer. It works just fine, and this ability to use functions from both toolkits gives you the widest possible access to the inner workings of Lotus Notes and Domino.


« Previous  ·  1  ·  2  ·  3  ·  4  ·  Next »
Other articles you might like
Home > Strategies > Open Source (4 articles)
   Lotusphere 2009 showcases SAP, BlackBerry, Sametime 8.5, and more
   Keep track of your backups with BackupTracker
   Open source alternatives to Notes and Domino: are they real?
Get Weekly Email Updates
Subscribe to our regular weekly email newsletter. It's packed with tips, reviews, deep analysis, and the latest news.
 
Recent DominoPower Articles
Syncing Notes with Android phones
Application development, William Shatner, and the origin of the universe
Learn Domino Designer 8.5 for free
The (near) future of Sametime, Quickr, Connections, and Symphony
Inside the IBM Innovations lab
Lotusphere 2010: Hot fixes and cool news for Notes, Domino, and LotusLive
Lotusphere 2010: mobility and collaboration
Latest Lotus Headlines
Xpages not loading? JVM errors? - Solution
How to implement an iCalendar feed into your Notes calendar with XPages
DWA Hotfixes for Domino 8.5.1FP1 - A Gotcha
IBM Adds DB2 to Lotus Foundations SMB Package
SNTT : XPages onclick Ghosts in the machine
Ports used by Lotus Sametime 8.5 servers
Exploring a Domino Date Bug
>> Read all the news
More from the ZATZ journals
Computing Unplugged: Online safety for virtual learning
David Gewirtz Online: CNN commentary and analysis
OutlookPower: Seek and find: Strategies to locate filed-away emails fast
-- 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 --

Struggling with exporting Notes data to spreadsheets? No More!
Try IntelliPRINT, The world's leading Reporting, Dashboards, and Analysis solution for Notes & Domino

  • Don't spend unproductive time maintaining different versions of the same spreadsheet
  • Preserve data integrity and security in multi-user environments
  • Create reports in minutes INSIDE Notes
  • Get freedom from iterative report requests, deliver self-serve capabilities

Experience Reporting, Dashboards, and Analysis INSIDE Notes.

Try IntelliPRINT NOW!

ZATZ Home  ·  News  ·  Back Issues  ·  Credits/Trademarks ·  Link To Us
Copyright © 1998-2010, ZATZ Publishing. All rights reserved worldwide.
Editor's Login