atlcom

Building Proxy/Stub dll in VS 2008

I have a ATLCOM project migrated from VC6 to VS2008. My question is, how do I build the ps dllon VS 2008? New ATL projects in VS2008 have a separate PS project which builds the ps dll. But the migration from VC6 did not create this project. I tried to invoke nmake on the ps mk file but that gives a redefinition error for an enum type w...

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<IZ *> ( y ); That doesn't bump the object's reference count, does it? I don't have to do a Release() to account for it, right? If it matters, I'm using ATL/COM...

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 rather than just C++ interfaces due to the fact that I'll be using them on objects which I on...

Support of ATL WebBrowser controls in Windows mobile 7.0

Hi All, Just being curious, we would like to know the support for ATL webbrowser control (IWebBrowser2) is available on next windows mobile 7.0 version. Can anybody confirm the same. Thanks, Ramanand ...

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 <ATLComTime.h> in one of the files. I have only sent the C-Runtime library (see here) redistributable. The client can not get the code to worktheir machines. They receive a "DLL entry point not foun...

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 VB.Net). (2) They must be compatible with old operating systems - minimum Windows 98 SE. To be c...

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 doing this is to wrap the business objects with a COM layer. What fast and effective method...

How do I pass an array of structs (containing std:string or BSTR) from ATL to C#. SafeArray? Variant? COM interface question.

Hi, I have an ATL COM object that I am using from C#. The interface currently looks like: interface ICHASCom : IDispatch{ [id(1), helpstring("method Start")] HRESULT Start([in] BSTR name, [out,retval] VARIANT_BOOL* result); ... [id(4), helpstring("method GetCount")] HRESULT GetCount([out,retval] LONG* numPorts); ... [id(7)...

How is MFC app commiting to virtual memory?

I am working on an MFC app that seems to be automagically committing to ~160MB of virtual memory. The app typically runs at 10-14MB of memory usage so this level of committed memory seems excessive. Additionally there is no where in the code where VirtualAlloc is called... COM & ATL are also being used. The memory shows as committed t...

Access methods from ATL dll file in C#

Hi, 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 : Declaration of the Catl #pragma once #include "resource.h" // main symbols #inclu...

How to convert from BSTR to DATE

COleVariant var(bstrString); var.ChangeType(VT_DATE); DATE date = var.date; not seems to be working. Any ideas will be appreciated. Thanks. ...

How to pass COM pointer from one process to another?

I have an interface pointer to an COM object sitting within process 1. I would like to get access to the same object from another process. How can I achieve this purpose? I believe directly passing over the pointer wouldn't work due to different address spaces. I know it involves the marshaling/proxy/stub stuff. But I don't know details....