atl Questions
5
Can any one explain, What is the use of CComPtr over CComQIPtr in COM?
CComPtr<ISampleInterface> Sample1;
CComQIPtr<ISampleInterface> Sample2;
Reprehension asked 27/7, 2011 at 13:16
1
I'm using out-of-proc COM server (COM singleton "Engine" implemented using DECLARE_CLASSFACTORY_SINGLETON), it works in STA (CComSingleThreadModel, _ATL_APARTMENT_THREADED).
COM server clients:
...
Nonconcurrence asked 5/2, 2013 at 8:58
1
Solved
I'm migrating a Visual C++ project which uses ATL/MFC from VS2010 to VS2013. The project compiles with /J ("assume char is unsigned"), and there is too much code that may or may not rely on that fa...
Bluh asked 2/12, 2014 at 9:40
3
Solved
When I try to register the 32 bit version of my C++ / ATL project with
regsvr32 project.dll
i'm getting this error:
LoadLibrary("project.dll") failed - The specified module could not be found
...
4
So I tried moving my project to Visual C++ Express 2010 on Windows 7 from a previous version on Windows XP. I got all sorts of errors where atlbase.h was not found. This isn't so much a question bu...
Tseng asked 21/4, 2010 at 7:32
1
Solved
Using smart pointer CComObject I create a COM object by calling its static method CreateInstance. But when I leave my program, at least in VS13, that object remains running. Here is my code:
CComO...
Emersed asked 1/9, 2014 at 14:38
1
Solved
I'm building an application using Qt 5.3.1 in Visual Studio 2012. I also want to use a hardware library which requires me to add a simple ATL object to the project. This can be done by using a Visu...
1
Solved
When including atlwin.h from the Microsoft ATL libraries in Visual Studio 2013 building may result in numerous complier errors about undefined elements.
HMONITOR is not defined
This does n...
Gaylenegayler asked 13/5, 2014 at 20:16
1
Solved
I have a C++ project that uses the ATL library. In Visual Studio 2012, I used to see the following two files:
Program Files (x86)\Microsoft Visual Studio
11.0\VC\atlmfc\lib\Atl.lib
Program Files ...
Brunhild asked 6/1, 2014 at 23:32
5
I am swapping machines (between two Windows 8.1 laptops) and have just loaded the project I'm working on from TFS. On one machine it compiles, on the other it does not and gives the first error
er...
Bookstand asked 11/12, 2013 at 17:35
1
I have two COM objects written in C++ and ATL. There are in one library and I know their IIDs and CLIDs.
I can't find an example of doing this simple communication between two simple COM objects. ...
Plait asked 1/3, 2011 at 15:29
1
Solved
Some time ago, I had to modify an old COM DLL (Visual C++ 2010, ATL) migrating it from "Apartment" threading model to "Both", i.e. it can now be called from both STA and MTA threads without seriali...
Libeler asked 20/9, 2013 at 8:49
1
Solved
I have a window based on the CAxWindow. In this window I create WebBrowser control. When the DISPID_DOCUMENTCOMPLETE happens I do:
void __stdcall document_complete( LPDISPATCH pBrowser, VARIANT* )...
Vulturine asked 10/9, 2013 at 11:56
3
Solved
I have a COM function that should return a SafeArray via a LPSAFEARRAY* out parameter.
The function creates the SafeArray using ATL's CComSafeArray template class.
My naive implementation uses CCom...
1
Solved
I am trying to get the message loop from a ATL::CAppModule in my project, there seems to be none, so:
I've tried defining CAppModule, with extern CAppModule _Module; in "stdafx.h" and CAppModule ...
3
Solved
Using ATL (VS2008) how can I enumerate the available methods available on a given IDispatch interface (IDispatch*)? I need to search for a method with a specific name and, once I have the DISPID, i...
3
I have read it in a couple of places that avl tree search faster, but not able to understand. As I understand :
max height of red-black tree = 2*log(N+1)
height of AVL tree = 1.44*logo(N+1)
Is it ...
Churning asked 20/5, 2011 at 21:12
2
Solved
I have checked out the answer at: How can I return both an error string and error code to VB6 from an ATL activex control?
I am able to return custom negative error codes, ie with the severity bit...
1
Solved
I've got a small C++ library which is made as ATL Project in Visual Studio. I want to make it crossplatfrom. It will be used in Windows and Linux. It will be included in my project, which uses Qt 4...
Baur asked 22/4, 2013 at 9:0
3
I've created a Windows service (an exe based on the Visual Studio ATL wizard) which exposes a COM interface. No problems running as an in-proc server or a Windows service. I need a Windows service ...
2
Solved
From book ATL Internals, I knew BSTR is different from OLECHAR*, and there are CComBSTR and CString for BSTR.
According MSDN Allocating and Releasing Memory for a BSTR, I knew memory management re...
1
Solved
When using COM, I typically rely on ATL smart pointers, like ATL::CComPtr and ATL::CComBSTR, for resource management. But some of the methods I'm calling use output parameters to return pointers to...
Wilsonwilt asked 14/3, 2013 at 20:36
2
Solved
We have a DLL project which has existed for a long time (maybe as far back as Visual Studio 6) which has been updated for each new version of VS. The project contains a number COM classes implement...
Loath asked 21/12, 2011 at 18:54
3
I have an vector<BYTE> that represents characters in a string. I want to interpret those characters as ASCII characters and store them in a Unicode (UTF-16) string. The current code assumes t...
Ululant asked 20/2, 2013 at 15:52
3
I am using ATL in VisualC++10 to host browser control.
My code is similar to this example: http://msdn.microsoft.com/en-us/library/9d0714y1(v=vs.80).aspx
Difference is I have main window and then ...
Shippen asked 25/11, 2011 at 20:27
© 2022 - 2024 — McMap. All rights reserved.