MultiOE

Description

This one is really more of a utility tool, than a programming demonstration. It launches new copies of Microsoft Outlook Express (OE), overcoming that application's stubborn insistence on being a single instance. What's cool about this, from a programming perspective, is that it shows how to call a DLL function in a file that resides at an unknown location at compile time.

Most API functions reside in DLLs that are on the system path. Outlook Express supplies msoe.dll, which can be used to start new instances of OE, but installs it into its own application folder. So the trick is plumbing the registry for the location of this file, then changing our applications active directory to OE's, then finally making the call. Kinda slick.

WARNING: Neither Microsoft or I suggest you will be 100% safe running multiple instances of Outlook Express! Do you understand that? If you haven't taken all the standard steps to stabilize OE (such as turning off Background Compaction), you will be really hosed by running multiple instances of it.

If you've been sent here simply for the tool, and have no interest in programming, the download below includes an EXE that's been compiled using VB5. Your computer must already have the VB5 runtime, which is available on the tools page of this site.

Published

This sample hasn't been published anywhere except here on this website, but first rights to such publication are jealously guarded - you have been warned. <g>

APIs Usage

This sample uses the following API calls:

Module Library Function
MStartOE.bas advapi32



kernel32




msoe
RegCloseKey
RegOpenKey
RegOpenKeyEx
RegQueryValueEx
ExpandEnvironmentStrings
FreeLibrary
GetModuleHandle
GetProcAddress
LoadLibrary
CoStartOutlookExpress

Don't see what you're looking for? Here's a complete API cross-reference.

Download

Download MultiOE.zip   Please, enjoy and learn from this sample. Include its code within your own projects, if you wish. But, in order to insure only the most recent code is available to all, I ask that you don't share the sample by any form of mass distribution.

Download MultiOE.zip, 27Kb, Last Updated: Thursday, February 3, 2005