ATL中的BUG,在没有COM的服务中,使用_ATL_NO_COM_SUPPORT。

并在服务中添加下面的代码

#if defined(_ATL_NO_COM_SUPPORT)
    HRESULT PreMessageLoop(int nShowCmd)
    {
        SetServiceStatus(SERVICE_RUNNING);
        return ATL::CAtlServiceModuleT< CMemoryDBModule, IDS_SERVICENAME >::PreMessageLoop(nShowCmd);
    }
#endif

 

 

posted on 2013-12-04 23:40  缘生梦  阅读(1293)  评论(2编辑  收藏  举报