I know how to publish a const of a simple type in IDL, for example:
const long blah = 37
But I want to publish consts of complex types, with methods, or at least readable struct-like member fields. For example, perhaps a type called CarType, which has accessor fields like "get_Make", "get_Model", "get_Year", "get_BasePrice", et ceter...
I'm trying to create a date-picker-like control using ATL which derives from a combobox. The idea being that I trap the CBN_DROPDOWN message and display a dialog containing (among other things) a calendar control. The dialog class is derived from CDialogImpl and just uses a dialog resource, e.g.
IDD_DIALOG1 DIALOGEX 0, 0, 112, 94
STYLE ...
I am converting an ATL-based static library to a DLL and am getting the following warning on any exported classes that use the ATL CString class (found in atlstr.h):
warning C4251: 'Foo::str_' : class
'ATL::CStringT'
needs to have dll-interface to be used
by clients of class 'Foo'
I am correctly declaring the Foo class as exp...
In visual studio 2008 I can create an MFC activex project and it presents a wizard to create a single activex control. I now want to create new controls within this project.
I can't find any way to do this.
...
I need to implement a simple ATL COM object that implements a specific interface for which I have been given both a .tlb file and a .idl file. The interface is very simple and only consists of a single method. I have created many ATL objects in the past but never one that has to implement a specific interface. What do I need to achiev...
Hi
according to Non-Admin ActiveX Controls, it is possible to register activeX under current user (that will not require admin right during the installation).
I have crated ATL project (VS2008, native) and added some ATL Control that does nothing.
I created an inf file:
[version]
signature="$CHICAGO$"
AdvancedINF=2.0
[Add...
Hello,
I need to access a component in JScript. I found the Wcript.CreateObject(progid) as well as "new ActiveXObject(progid)" would create an instance of the component. The component should draw graphics in a own window to show, what the JScript script is doing.
The operation systems supported must include Windows XP 32 bit as well a...
Hey folks,
I am currently working on an ATL project with a simple UI.
In this UI I have a couple of static text controls and I want them to have ellipsis at the end when the text is to long. So I set the word ellipsis property in the designer to true (which also triggers end ellipsis and path ellipsis to true).
However during run-time t...
hi,
I need to use tree structure inside a ATL COM server.
I thought of using stl::map<> for this purpose as follows.
BaseMap[k1,NextLevelMap[k2, NextLevelMap[k3, Value]]]
But I need to know, whether using such a structure inside ATL is safe
and possibility of debugging support with maps.
Thank you
...
I am using ATL (VS2008, so ATL9 IIRC) to create COM objects and have been using the CComVariant class (defined in atlcomcli.h) to manage VARIANT types. However, there is also another VARIANT wrapper called _variant_t. Is there any difference between CComVariant and _variant_t and which one should I be using?
Similarly, there are two B...
I have an ATL COM object which needs to expose a collection of other COM objects, so clients can find out how many objects are in the collection (via a simple Count property which I can provide) and access the objects using its index. This collection of objects is dynamic - the count is not fixed - and I don't know how many there will b...
Running on XP. I have a client that calls calls CoInitializeEx(NULL, COINIT_MULTITHREADED), loads a (local) DCOM object, and attaches an event interface so the DCOM object can send back events. The client looks a lot like notepad with a multi-line textbox covering the client area to display event messages. Here are the calls that create ...
I am converting an old VB COM object (which I didn't write) to C++ using ATL. One of the methods, according to the IDL, takes an IDispatch* as a parameter and the documentation and samples for this method claim that you can pass either a string (which is the progid of an object that will be created and used by the control) or an IDispat...
I have been running in to an issue where a COM dll that I am distributing with my application fails to register because the atl.dll is not registered on the machine.
The quick fix is to have the run regsvr32 on the dll, but I want something a little cleaner then that.
I don't have much experience with deployment and I was wondering if...
In the MSDN documentation for CComSafeArray::MultiDimSetAt, alIndex is documented as follows:
Pointer to a vector of indexes for each dimension in the array. The rightmost (least significant) dimension is alIndex[0].
In the documentation for CComSafeArray::MultiDimGetAt, alIndex is documented differently:
Pointer to a vector of...
The CComSafeArray::SetAt method provides a parameter to control whether the referenced variable is copied:
HRESULT SetAt(
LONG lIndex,
const T& t,
BOOL bCopy = TRUE
);
... but the CComSafeArray::MultiDimSetAt method does not offer the same parameter:
HRESULT MultiDimSetAt(
const LONG * alIndex,
const T& t
);
Two questions:
1.) Is...
I have a simple ATL Service in which I have included the following statement.
AfxBeginThread(WorkerThread, this, THREAD_PRIORITY_NORMAL, 0, 0);
But the compiler complains that
error C2065: 'AfxBeginThread' :
undeclared identifier
But in MSDN i found that AfxBeginThread is found in AFXWIN.H
If I include AFXWIN.H, the compiler...
I created a ATL windows less control and the class definition is like this:
class ATL_NO_VTABLE CRSPClient :
public IObjectSafetyImpl<CRSPClient, INTERFACESAFE_FOR_UNTRUSTED_CALLER|INTERFACESAFE_FOR_UNTRUSTED_DATA>,
public CComObjectRootEx<CComSingleThreadModel>,
public IDispatchImpl<IRSPClient, &IID_IRSPClient, &LIBID_a...
hi,
I'm trying to pass a UDT as a parameter to a ATL event.
IProxy_MyInterface::OnMyATLEvent ([in] MyUDT* pVal);
I used the ATL wizard for generating code for the Event. However, in the generated code, the "pVal" is simply assign to a CComVariant. Also, when I compile the code, it shows a warning
: warning C4800: 'MyUDT *' : forcin...
I created a customized ActiveX control and exposed a method called "getDesktopWindows". Then I use the following javascript to call it:
var plugin = document.getElementById("myPlugin");
var wins = plugin.getDesktopWindows();
So far everything works just fine. Then I wrapped the code into a javascript function and use a flex application...