PRB: ATL EXE Server Built On Windows 95 Errors While RegisteringLast reviewed: June 25, 1997Article ID: Q166217 |
The information in this article applies to:
SYMPTOMSWhen building an Active Template Library (ATL) COM EXE server on a machine running Windows 95, you might get the message box that your server is linked to missing export from OLE32.DLL : CoSuspendClassObjects.
CAUSE_WIN32_WINNT is defined in the Stdafx.h file and the problem is caused by the following code in the generated project source file:
#if _WIN32_WINNT >= 0x0400
if (CoSuspendClassObjects() == S_OK)
PostThreadMessage(dwThreadID, WM_QUIT, 0, 0);
#else
PostThreadMessage(dwThreadID, WM_QUIT, 0, 0);
#endif
It is caused by the definition of _WIN32_WINNT in Stdafx.h. In ATL 1.1 for
Visual C++ 4.2, this was not defined automatically, so users had to define
it themselves if they were using Windows NT 4.0 or Windows 95 with DCOM.
The majority of people will be targeting Windows NT 4.0 or Windows 95 with
DCOM, so it is automatically defined.
RESOLUTIONIf you want to develop under Windows 95, you can simply remove the macro from the generated Stdafx.h file. The problem also goes away when DCOM is installed on Windows 95.
STATUSThis behavior is by design.
MORE INFORMATION
Steps to Reproduce Behavior
Linking.... Performing registration A device attached to the system is not functioning. Server registration done!Then the message box pops up informing you that the server EXE is linked to missing export OLE32.DLL : CoSuspendClassObjects.
|
Additional query words: 2.10 CoSuspendClassObjects ATL
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |