次の方法で共有


IMAPIFormFactory::LockServer

This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

Keeps an open form server in memory.

HRESULT LockServer(
  ULONG ulFlags,
  ULONG fLockServer
);

Parameters

  • ulFlags
    [in] Reserved; must be zero.

  • fLockServer
    [in] TRUE to increment the lock count; otherwise, FALSE.

Return Value

  • S_OK
    The call succeeded and has returned the expected value or values.

Remarks

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 frequently created and released.

Notes to Implementers

The IMAPIFormFactory::LockServer method is very similar to the IClassFactory::LockServer method. Essentially, the IMAPIFormFactory::LockServer method maintains a count of how many times it has been called; as long as that count is greater than 0, the method prevents the form server from being unloaded from memory. You can use the CoLockObjectExternal function to implement this.

See Also

Reference

IMAPIFormFactory : IUnknown