1,338 questions
Score of 0
2 answers
119 views
Win32 C++: Error in CComPtr Release(): ATL::_NoAddRefReleaseOnCComPtr<T> in "atlcomcli.h" is inaccessible
I'm writing a Win32 C++ function to iterate Portable Devices. After successfully opening and connecting to the device, I need to release it. (There's also a Close() but Microsoft's documentation ...
Score of 1
1 answer
218 views
Implement IDispatch-only interface easily in C++
I defined the following IDispatch-only interface in my C# project:
[ComVisible(true)]
[InterfaceType(ComInterfaceType.InterfaceIsIDispatch)]
[Guid("3532C4E8-D320-487C-8BD4-...
Score of 0
1 answer
196 views
How to compile an ATL proxy/stub DLL for ARM64
I'm attempting to compile an ATL proxy/stub DLL for ARM64, but it isn't working.
I don't have any specific code to provide, since I'm really just trying to compile the basic template-produced project ...
Score of 1
2 answers
149 views
Do ATL thunks work cross-platform, including on ARM64?
My understanding is that ATL implements its window "thunks" using some clever assembly language hacks (see this question, for example).
I'm wondering whether these thunks (and really any ...
Score of 0
0 answers
61 views
Numeric Edit Control for ATL/WTL
Here's a demo of Numeric Edit Control for MFC. https://www.codeproject.com/Articles/6296/Numeric-Edit-Control-2
But I'm working on this WTL / ATL control.
template <class TBase>
class CEditT : ...
Score of 4
1 answer
365 views
Is it possible to compile programs that use ATL using GCC (MinGW or otherwise) given it uses __try?
I'm confused how people use MinGW to compile Windows programs.
I tried using it, but headers like atlalloc.h and atlcom.h use __try in a few ways... which no version of GCC appears to support, for ...
Score of 1
0 answers
155 views
Outlook COM based C++ Addin to Capture Sent Items
I am trying to add a record to log file when Email is sent from outlook using com addins. I intialized an interface and registered for Outlook::ApplicationEvents using DispEventAdvise method. The ...
Score of -1
1 answer
60 views
Reading / Enumerating registry path fails "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Telephony\\Country/region List"
I want to enumerate the registry path.
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country/region List
I can open and enumerate
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\...
Score of 1
0 answers
208 views
cmake set UseOfAtl for visual studio generated files
I need to set options in cmake to generate these entries in visual studio .vcxproj file
<UseOfMfc>false</UseOfMfc>
<UseOfAtl>Static</UseOfAtl>
Cmake supports MFC via ...
Score of 1
1 answer
329 views
VS2022 - Enabling C++ Language Standard 20 and using CComPtr gives Cannot Convert error?
I enabled language standard ISO C++ 20 Standard (needed for a new c++ source module) and received errors with some ATL items such as CComPtr and CA2W, I enabled /permissive but it still gives the ...
Score of 0
0 answers
64 views
How to implement using COM interface in Communication between NET and C++
I have a NET Core DLL as below.
using System.Runtime.InteropServices;
namespace ProxyClient
{
[ComVisible(true)]
[Guid("B611D722-8C7E-4F2A-8FBD-36617A49CE90")]
[InterfaceType(...
Score of 2
1 answer
222 views
Which code page is used for the implicit conversion of CStringA to CStringW?
I'm asking this more out of curiosity.
Considering this code snippet:
CStringA narrow;
CStringW wide;
...
wide = narrow; // which code page is used for the conversion
// of the narrow ...
Score of 0
1 answer
96 views
Consume C++ COM class from Python
I have a COM dll which is created using ATL COM with C++. I am creating an Python application which can reuse the existing business logic written in COM C++.
I am looking for a way to consume the COM ...
Score of 1
1 answer
1089 views
Getting compile error in atlbase 'GetThreadLocale': identifier not found
I am trying to build some COM code from this article - https://www.codeproject.com/Articles/9190/Understanding-The-COM-Single-Threaded-Apartment-Pa
I am trying to use code in \SimpleCOMObject2 folder. ...
Score of 0
0 answers
97 views
CSimpleString::SetLength() Exception in Visual C++ Windows Service
I am trying to find the root cause of an COleException being thrown by my service in production environment. I have checked the crash dump file, and the exception is thrown when trying to construct a ...