This function creates a duplicate of the specified service handle.
Header file: | Msgstor2.h |
Platforms: | H/PC 3.0 |
Windows CE versions: | 2.10 and later |
BOOL TransportDuplicateHandle(HANDLE hService,
HANDLE *phDuplicate);
TRUE indicates success. FALSE indicates failure. To get extended error information, call the function TransportError or TransportErrorMsg.
The transport service provider must implement this function in a DLL registered as a mail service. The Inbox application can then load this DLL and call this function.
Both the original handle and the duplicate handle behave the same. You can use either handle in calls to transport API functions from multiple threads. These calls do not create race conditions on data associated with the service handle.
If a transport service provider does not implement this function, your application cannot perform any multithreading techniques that require two or more handles to the service.