Platform SDK: MAPI |
The IMAPIFormFactory::LockServer method keeps an open form server in memory.
See IMAPIFormFactory : IUnknown.
HRESULT LockServer( ULONG ulFlags, ULONG fLockServer );
Form viewers call the IMAPIFormFactory::LockServer method to keep an open form server application in memory. Keeping the form server in memory improves its performance when forms are created and released frequently.
The LockServer method is very similar to the IClassFactory::LockServer method. Essentially, this method maintains a count of how many times it has been called and as long as that count is greater than 0, prevents the form server from being unloaded from memory. You can use the OLE function CoLockObjectExternal to implement this. See the OLE Programmer's Reference for details.