atl

TVN_SELCHANGING not received

China☆狼群 提交于 2019-12-24 15:36:23
问题 I have a WTL81 app. CMainFrame has a child CPaneContainer, that has a child window CTreeViewCtrl. The problem is CTreeViewCtrl doesn't receive TVN_SELCHANGING message. I have "spied" CTreeViewCtrl and his parent (CPaneContainer) and no notification code is received. CMainFrame is implemented from public CFrameWindowImpl<CMainFrame> CPaneContainer is implemented like this class PaneContainerReflectNotif : public CPaneContainer { BEGIN_MSG_MAP(PaneContainerReflectNotif) CHAIN_MSG_MAP

InitializeCriticalSectionEx is not member of global namespace in atlwinverapi.h

给你一囗甜甜゛ 提交于 2019-12-24 14:18:51
问题 I have recently moved from vs 2013 to vs 2017. we have this project that has these preprocessor Definitions: WIN32 DRG_BUILD_DLL WINVER=0x0600 Now in atlwinverapi.h I get this error that InitializeCriticalSectionEx is not a member of global namespace. Any ideas why this problem is happening? #if (NTDDI_VERSION >= NTDDI_VISTA) && !defined(_USING_V110_SDK71_) && !defined(_ATL_XP_TARGETING) // InitializeCriticalSectionEx is available in Vista or later, desktop or store apps return :

_pAtlModule pointer is null when i try to CreateInstance using the CComObject function

与世无争的帅哥 提交于 2019-12-24 13:26:11
问题 I am working on the OPC(OLE process Control)Client program,with the asynchronous CALLBACK methods to get data from PLC using the KepServer.But I encountered the issue: CComObject<COPCDataCallback>* pCOPCDataCallback; // Pointer to Callback Object // Create Instance of Callback Object using an ATL template CComObject<COPCDataCallback>::CreateInstance(&pCOPCDataCallback); and then it stopped at here: _pAtlModule->Lock(); this is in the atlcom.h any ideas of how to solve this issue? 回答1: When

Callbacks in COM objects

为君一笑 提交于 2019-12-24 10:03:06
问题 I have an ATL project which exposes a COM object. I would like my COM object to call a function specified by the consumer from time to time, or via some other means of notifying the consumer from time to time. I have tried adding a method in CerberusNative.idl in order to take void function pointers which I would like to call from the COM instance side of things so that the consumer would just need to tell the COM object upon initialization what its callbacks are: interface ICerberusSession :

Session and APP Scope for COM objects

有些话、适合烂在心里 提交于 2019-12-24 05:45:13
问题 We are going to develop ASP pages for a WIN CE device. The web server running on the system is httpd. I have a few doubts on the scope of com objects Does WinCE(httpd) ASP support Session and App Scope? Does page scope alone is supported in ASP in Wince? What should I do to introduce session and app Scope? Where can I get more information on this? 回答1: Does WinCE(httpd) ASP support Session and App Scope? According to MSDN: Windows CE does not provide support for the Session or Application

_IDTExtensibility2, what DLL to import into ATL project?

不问归期 提交于 2019-12-23 19:27:20
问题 So I'm trying to solve my Office add-in task again; I have created the ATL project, added simple class, and now want to add interface implementation, as http://www.devarticles.com/c/a/Cplusplus/Writing-an-MS-Word-Addin/1/ proposes; However, available type libraries list has no listed Extensibility to add; I checked under Program Files, but the Extensibility.dll found there was a .NET assembly without exposed COM classes. 回答1: Type library is {AC0714F2-3D04-11D1-AE7D-00A0C90F26F4} , named

How to prevent coclass implementations from being exposed in an ATL type library

别来无恙 提交于 2019-12-23 18:04:04
问题 I am building an ATL type library with a type of class factory. Something sorta like this: [ object, uuid(...), ... ] interface INumber : IDispatch { [propget, id(0)] HRESULT Value([out, retval] LONG* pVal); } [ object, uuid(...), ... ] interface INumberFactory : IDispatch { [id(1)] HRESULT GetNumber([in] BSTR numberName, [out, retval] INumber* pVal); } [ uuid(...) ] coclass NumberFactory { [default] interface INumberFactory; } The user can then get an instance of a class that implements the

How to access COM objects from different apartment models?

三世轮回 提交于 2019-12-23 17:04:10
问题 I have a multi-threaded C++Builder GUI app, which communicates with a third-party app via COM. I need to call methods of the COM object from several threads, and I'm protecting access with a mutex. Apparently, the main GUI thread must use STA model, but my worker threads need to use MTA. The COM object is constructed in an MTA thread. Everything works fine except access to the COM object from the GUI thread, due to the MTA/STA mismatch. I've read a bit about marshalling, but haven't tried to

Selected range of Excel cells passed to an argument “as Variant” of a VBA function, then passed to an method of an ATL object in c++

我与影子孤独终老i 提交于 2019-12-23 04:31:44
问题 This question arose from the following question : Chaining methods of ATL/COM objects Let's say I have a instance MyObj1 of an ATL/COM class TheClass of a dll exposed to vba, and a method TheMethod of TheClass . In VBA, I have a function Public Function func(x as Variant) as Variant '... something MyObj1.TheMethod( x ) '... other things End Function This function is used in excel, and I pass an excel range of cell to it. At debug in VBA, x is seen of vba type " Variant/Object/Range ", and has

Selected range of Excel cells passed to an argument “as Variant” of a VBA function, then passed to an method of an ATL object in c++

懵懂的女人 提交于 2019-12-23 04:31:42
问题 This question arose from the following question : Chaining methods of ATL/COM objects Let's say I have a instance MyObj1 of an ATL/COM class TheClass of a dll exposed to vba, and a method TheMethod of TheClass . In VBA, I have a function Public Function func(x as Variant) as Variant '... something MyObj1.TheMethod( x ) '... other things End Function This function is used in excel, and I pass an excel range of cell to it. At debug in VBA, x is seen of vba type " Variant/Object/Range ", and has