C Tips

Wildcard Pattern Searching
Getting a List of Databases Using the Notes C-API


Wildcard Pattern Searching
November 18, 2002

This is the source code for a small routine in C that allows you to match a string against a wildcard pattern that uses * and/or ? as wildcard characters. It should work just like filename filtering using the DIR command at the DOS prompt (like how *.bat matches all batch files, and a*.??? matches all file names that begin with 'a' and have a three-letter extension). I also included the source for a small tester program that shows you how to call the function.

wildcard.zip


Getting a List of Databases Using the Notes C-API
November 18, 2002

The NSFSearch function in the Lotus Notes C API allows you to step through all the databases on a Notes client or server, and run a function against each one. However, this function is a bit complicated to use, and is kind of bulky to include in a program.

Below is the source code for a set of wrapper functions that allow you to easily get a list of databases so you can process them with your Notes API programs. Also included is the source for a small test application that utilizes several of the functions, written by Ian Cherrill at 4nf.co.uk.

GetDbList.zip