Questions tagged [atlcom]

27 questions
7
votes
1 answer

How to generate a 64 bit COM Proxy

I have a 32 bit COM server (and the source code for it) The source generates the server and a 32 bit proxy stub. (The MIDL compiler generates the proxy stub code.) I would like to make a 64 bit proxy as well, so that 64 bit programs can talk to my…
xt1
  • 408
  • 3
  • 11
6
votes
2 answers

What simple methods are there to wrap a c++ based object model with a COM interface

I have a pre-existing c++ object model which represents the business layer tier of an application. I want to be able to expose the object model to applications written in other languages i.e vbscript, VB, javascript etc. I believe the best way of…
Rich
  • 4,572
  • 3
  • 25
  • 31
4
votes
2 answers

Can I use the newer versions of Visual Studio to do "old" things?

I have several ATL/COM-based DLLs that I've been using Visual C++ 6.0 on. I require a couple of "old" things out of the generated DLLs: (1) They must be compatible with projects developed in Visual Basic 6.0 (the old VB6, emphatically not…
4
votes
2 answers

Building Proxy/Stub dll in VS 2008

I have a ATL COM project migrated from VC6 to VS 2008. How do I build the PS DLL on VS2008? New ATL projects in VS 2008 have a separate PS project which builds the PS DLL. But the migration from VC6 did not create this project. I tried to invoke…
bobbyalex
  • 2,681
  • 3
  • 30
  • 51
3
votes
1 answer

How to create anonymous IDispatch functions with ATL?

Is there an easy way to create a class that is derived from IDispatch and that can be passed to API like this (this is C++ ): pDOM2->attachEvent(CComBSTR("event"), new DispatchFunction); I know how to create a C++ object that handle an invoke with…
Emmanuel Caradec
  • 2,302
  • 1
  • 19
  • 38
3
votes
1 answer

Access methods from ATL dll file in C#

I've been working with trying to link up some c++ code and wrap it inside a COM object to access via C#. I created an atl project and added a simple method such as Add(double a, double b). The following is the code from my atl.h file: // atl.h :…
user400383
  • 71
  • 1
  • 3
3
votes
2 answers

ATL COM to add a function to excel

I'm trying to build an ATL COM with a c++ class and add it to excel by automation. I found some guides but I have many problems, one is that my dll donesn't compare in automation and if I try to add it excel says there's a problem about not contain…
The Newbie Toad
  • 186
  • 2
  • 15
2
votes
1 answer

ATL: Can't remove a method from a COM interface - ALWAYS reappears like magic

Environment: VS2008, C++ ATL COM, 64Bit, Windows 7 I'm trying to remove a method from an older COM interface. I modify the *.idl, modify the associated *.h and *.cpp implementation files and also remove it from the main project's .h file. I can…
Dale
  • 21
  • 1
2
votes
1 answer

ATLComTime.h is part of what redistributable?

I added functionality to a code base someone else wrote and while the "Not using ATL" flag was set in VS2005 I see that there is #include in one of the files. I have only sent the C-Runtime library (see here) redistributable. The…
wheaties
  • 35,646
  • 15
  • 94
  • 131
2
votes
3 answers

dynamic_cast of a COM object to a COM interface doesn't bump the reference count, does it?

If I have a C++ class, X, which implements the COM interfaces IY and IZ, and I have a pointer y to the IY interface of an object of type X, and I do this: IZ *z = dynamic_cast ( y ); That doesn't bump the object's reference count, does it? I…
Ptah- Opener of the Mouth
1
vote
0 answers

in my shell namespace extension context menu differs from the default one("new" and "properties" items are missed)

I have my custom shell namespace extension. Just want to have a virtual folder mapped to some folder on disk C:/ with the same functionality. using namespace ATL; class ATL_NO_VTABLE CMyShellFolder : public…
1
vote
0 answers

How to fix "The Project needs to include ATL support" in Visual Studio 2019 C++?

I add an ATL project in my main solution, but further on adding a new atl simple object in that project I get the error "The project needs to include ATL support". However if I just open the atl project individually in a new Visual Studio Window, I…
1
vote
2 answers

ATL/COM: Defining a COM interface that won't be available outside of the DLL?

I have an ATL/COM-based DLL, made using VC++ 6.0. It's used for various executables built using VB6. I want to add some COM interfaces that will not be accessible via VB6, for the internal use of the DLL only. I want them to be COM interfaces…
Ptah- Opener of the Mouth
1
vote
1 answer

Closing timers handle from the working thread

best way to ask a question is to first show an example: this is how i create a timer in c++: if (FALSE == CreateTimerQueueTimer(&m_hSampleStarvationTimer, m_hSampleStarvationTimerQueue, …
igal k
  • 1,883
  • 2
  • 28
  • 57
0
votes
1 answer

Regarding SafeArrayPutElement

FYI I am begginer in COM\ATL and unicode I am using SafeArrayPutElement(safearray*,LONG,void*) in my code and the problem is... here, the function works fine when i give the third parameter as L"ItWorks" i.e SafeArrayPutElement(safearray*,LONG,…
Naveen
  • 23
  • 1
  • 9
1
2