Questions tagged [atl]

0

votes
0

answer
5

Views

Is there any example on how to migrate from atldbcli to nanodbc?

I do have an old C++ desktop application to apply SQL SELECT commands agains a database (access defined via a connection string) and store the result to the DBF (FoxPro, free tables) to feed the legacy application. Technologically, it uses OLE DB Consumer Templates (C++) (including atlcli.h, adding...
pepr
1

votes
1

answer
75

Views

windows header control and MSAA

I am trying to operate the common header control (click on a column) via IAccessible. I have this simple piece of code that works up to windows XP and win7, but for windows 10 it does nothing CComPtr iacc; hr = AccessibleObjectFromWindow(hw, OBJID_CLIENT, IID_PPV_ARGS(&iacc)); CComVariant col(1); //...
nikos
1

votes
0

answer
45

Views

Escape from a iterate loop (ATL helpers)

Is there a way to escape an iterate loop in helper like break in Java , in my example : helper context activity!Activity def : print(s : String,s1:OrderedSet(String)) : String = s1->iterate(a; acc1 : String = '' | acc1+ if...
Hadjer Kharrachi
1

votes
0

answer
90

Views

C++ ATL COM : Function CallBack

I’m trying to create a function Callback in ATL COM project that has the following declaration: int Dll16Exp NSetNewPartGeomHandleCB proto ((N_GET_NEW_PART_GEOM_CB)); typedef int (*N_GET_NEW_PART_GEOM_CB) proto((LPSTR,int(*)proto((int,int,int,LPSTR)))); I was able to create a Callback function for...
Annabi Gihed
1

votes
0

answer
35

Views

ATL control display image with Bitblt SRCAND not correct in word 2013

I created a ATL project with following code: LRESULT OnCreate(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/) { const LONG_PTR exStyle = GetWindowLongPtr(GWL_EXSTYLE); SetWindowLongPtr(GWL_EXSTYLE, exStyle | WS_EX_TRANSPARENT); return 0; } HRESULT OnDrawAdvanced(ATL_DRAWINFO...
Jay
1

votes
0

answer
32

Views

Application hangs when hosting managed control as CWnd

My application has ATL-based GUI (CWnd, CDialog,...) and it consists of multiple pages (CDialog). One of these pages is otherwise empty but it has a placeholder frame (CWnd) that resizes with the dialog. Everything is built as x64. When the page loads, it asks for a control handle from managed (C#)...
Simo Erkinheimo
1

votes
0

answer
108

Views

ATL COM 32-bit dll to 64-bit non-COM dll

I have a 32-bit dll library project written in C++ ATL COM. How do you convert a ATL COM project to pure C++ non-COM 64-bit? I believe ATL COM, or COM, doesn't support 64-bit. Are there any instructions/guidelines on how to strip away the ATL COM part of such a project and replace it with managed or...
Johan A
1

votes
0

answer
26

Views

Implementing and using MSR service layer using CCO's in POS application

I am trying to create OPOS Service layer for MSR POS Application, that would allowed us to use the functionality of MSR through OPOS Control object. So far, I had implemented OPOS Service layer for MSR using Atl component and I am trying to call ActiveX Object(.ocx) using CCO's of MSR in my Service...
Akash Goyal
1

votes
1

answer
404

Views

Why can't I find a Control ID in my Resource file in ATL?

Since I need to do some checks depending on which control is on focus in my app, I am getting the focused control ID like this: HWND controlOnFocus = ::GetFocus(); int controlID = ::GetDlgCtrlID(controlOnFocus); I am getting consistent IDs, but I can't find them in the resource file! Can I rely on t...
JohnIdol
1

votes
1

answer
1.5k

Views

In what situations is the ATL CSimpleArray a better choice than CAtlArray

The documentation says that CSimpleArray is for dealing with small numbers of objects. What is small in this context? Is CSimpleArray ever a good choice or should I always use a different collection class such as CAtlArray?
1

votes
2

answer
471

Views

C++ ATL Member Variable access help

I am not familiar with this, and can use a kick start. I am using ATL (unmanaged C++) user control and would like to use the ShockWave ActiveX object. I need to know how to declare it so that I can set a property or call a method. For instance, if I could assign a variable to it, then I would like t...
Jason
1

votes
1

answer
1k

Views

How do I use OLE-DB to access a dbf file in an COM/C++ ATL application?

How to access the data contained in a dbf file in COM/C++ application (created via ATL)?
mmutilva
1

votes
1

answer
2.2k

Views

What's the difference between calling CComModule.RegisterServer, _AtlComModule.RegisterServer, and LoadTypeLibEx for TypeLib registration?

In my DllRegisterServer method of my COM dll, I previously had code that called LoadTypeLibEx(module, REGKIND_REGISTER, &pTypeLib) to register my COM classes and their corresponding TypeLib's. My COM DLL is a 64-bit. I've noticed that on my 64-bit Vista system, under HKCR:\\TypeLib\{myguid}\1.0\0 I...
Zach
1

votes
3

answer
3.8k

Views

How do I use WTL in a DLL?

I'm trying to use WTL within an in-process COM server DLL (an IE BHO), but am struggling with _Module. My DLL needs CMyModule derived from CAtlDllModuleT: class CMyModule : public CAtlDllModuleT< CMyModule > { public: DECLARE_LIBID(LIBID_MyLib) DECLARE_REGISTRY_APPID_RESOURCEID(IDR_MYPROJ, '{...}')...
Mat
1

votes
2

answer
845

Views

Search Outlook Contact using COM?

I want to add support for searching for local Outlook contacts to my ATL/WTL app. Does anyone know of the Outlook COM interface (Office 2003 or greater) allows you to search for contacts? I already have LDAP lookup support but users want to be able to search their private contacts as well. Any inf...
Rob
1

votes
2

answer
676

Views

CoCreateInstance for EnvDTE without an AddRef()?

This is somewhat related to another question that I've asked that I've pretty much figured out. The last piece of the puzzle is using CoCreateInstance() instead of GetActiveObject(). I don't want to use an existing instance of EnvDTE, so I call CoCreateInstance, which properly fires off a new instan...
Amir Ebrahimi
1

votes
1

answer
2.7k

Views

Handle HTMLElementEvents2 when DWebBrowserEvents2 has been handled using ATL's macros

I'm creating a Browser Helper Object using VS2008, C++. My class has been derived from IDispEventImpl among many others class ATL_NO_VTABLE CHelloWorldBHO : public CComObjectRootEx, public CComCoClass, public IObjectWithSiteImpl, public IDispatchImpl, public IDispEventImpl { . . . BEGIN_SINK_MAP(CHe...
GotAmye
1

votes
1

answer
826

Views

handle keyboard events / shortcuts in hosted web browser control

I am hosting a web browser control, and I don't know how to fetch hotkeys such as [F1] when the control has focus. My primary need is displaying custom help when the user presses F1, however, generally being able to provide additionla shortcuts would be nice. (additional information is available at...
peterchen
1

votes
2

answer
223

Views

Error: MFC projects cannot define _ATL_NO_EXCEPTIONS

I'm extending an open source project. After including afxcoll.h in a new C++ file in order to use CStringArray, I get this error: Error: MFC projects cannot define _ATL_NO_EXCEPTIONS I suspect I'll be able to fix the error by adding #defines or changing or rearranging the inclusion of headers, or, i...
Brian
1

votes
1

answer
914

Views

RegisterClassObjects() Doesn't Find Classes To Register

I'm in the process of converting an application from Visual Studio C++ 6.0 to Visual Studio 2008 and am running into problems with ATL. I've been having a whole host of issues, but this is the first call that differs in return values between the two different compilers. The following line, when comp...
RunOfTheShipe
1

votes
1

answer
771

Views

Does CAtlList::RemoveAt invalidate existing POSITIONS?

I'm looking at this, where m_Rows is a CAtlList: void CData::RemoveAll() { size_t cItems = m_Rows.GetCount(); POSITION Pos = m_Rows.GetHeadPosition(); while(Pos != 0) { CItem* pItem = m_Rows.GetAt(Pos); if (pItem != 0) delete pItem; POSITION RemoveablePos = Pos; pItem = m_Rows.GetNext(Pos); m_Rows.R...
Scott Langham
1

votes
2

answer
837

Views

Convert IDispatch* to a string?

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...
Rob
1

votes
1

answer
588

Views

How to use visual leak detecter ( vld ) for com/atl dll projects?

I included vld.h file in my activex dll project. when i try to compile my project from visual studio 2008.I am getting the following error, 1>Registering output... 1>Project : error PRJ0050: Failed to register output. Please ensure you have the appropriate permissions to modify the registry. How to...
1

votes
2

answer
511

Views

ATL “Implement interface wizard”

I created ATL COM-server in VC++ 2005. I want to realize some interface defined in some library (*.olb). I know I will see the interface if I #import this olb (in .tlh.tli). But I cannot create stub realization for the interface with 'Implement interface wizard' because this interface is absent in '...
1

votes
1

answer
1k

Views

How to return an [out] variant with VT = VT_RECORD without creating memory leak in ole32.dll?

Purify is pointing memory leak in ole32.dll while returning a Variant with VT set to VT_RECORD as OUT parameter. I am using User Marshalling by generating proxy/stub dll from IDL. Can you suggest how to avoid this memory leak? Struct defined in IDL: { BSTR m_sFirst; BSTR m_sSecond; VARIANT m_vChildS...
picarodevosio
1

votes
1

answer
858

Views

E_NOINTERFACE returned

I have a COM Client and a COM Server, the COM Server holds an Interface exposed by the client, now the client is actually just an EXE, how do I make sure that the Interface exposed by the client is visible to the Server? Because when I call CoCreateInstance now on that interface in the server I get...
Tony The Lion
1

votes
1

answer
133

Views

ATL macros only working on devel-computer

i use ATL macros like A2T and A2CW. on the devel-computer everyhting works fine. when i use the application (visual studio 2008 pro) on another computer - the output of the ATL-macro-conversion is not readable. i hope someone can help me to solve this problem. my application is finished - only the A...
dotlike.net
1

votes
1

answer
920

Views

Fastest OLEDB read from ORACLE

What would be the fastest way of retrieving data from the Oracle DB via OLEDB? It should be portable (have to work on Postgres and MS SQL), only one column is transfered (ID from some large table). Current performance is 100k rows/sec. Am I expecting too much if I want it to go faster? Clarificatio...
Daniel Mošmondor
1

votes
1

answer
189

Views

Does using atlbase.h makes my compiled app to have some extra dependencie?

I would like to know if including atlbase.h in my c++ project will make the compiled application to have a dll dependency or something like that.
jarkam
1

votes
1

answer
79

Views

Can I use streaming structures in ATL?

Hi I'm developing a COM component in an ATL project. I want to use std::ostringstream for logging some trace by log4cxx. Unfortunately seems that ATL doesn't support std::ostringstream and derivatives. Does any of you have an idea how can I use streaming classes in an ATL project or any alternative...
tguclu
1

votes
1

answer
468

Views

GetInterfaceFromGlobal() call fails with an out-of-process COM server in Visual Studio 2010

I have an Out-of-process COM server executable which was developed using Visual Studio 6.0 and it has been working fine for the past 10 years. Now I converted this project to Visual Studio 2010 and encountered a problem with GetInterfaceFromGlobal(). I'm using the GIT to hold IDispatch pointers to e...
Harish
1

votes
1

answer
926

Views

Calling a custom COM interface from a ATL project

How do I call a COM interface from an ATL project? I was following the example at http://www.codeproject.com/KB/COM/comintro.aspx but they use the IActiveDesktop class which is defined in wininet.h. How do I call a custom component where I do not have the interface definition. How do i generate it?...
Jan
1

votes
1

answer
298

Views

ATL & COM - Multiple servers, one binary?

I have two COM DLLs. Both of which implement ATL::CAtlDllModuleT. From my understanding, this class does the dirty work of registering and unregistering the COM objects. Is there a way to merge these two into one? class CFoo : public ATL::CAtlDllModuleT< CFoo > { public : DECLARE_LIBID(LIBID_FooLib)...
MarkP
1

votes
1

answer
616

Views

ATL templates for IDispatch derived classes

Tomorrow I have planed to do some IDispatch related work, and I will have to create a class that supports this interface. I have been using ATL classes for a while to create COM objects and manage COM pointers, so I would like to use them for my class as well. But research so far, and discussions wi...
Coder
1

votes
2

answer
1.9k

Views

COM ATL Threading Model or not

i am a little confused about COM threading models. I got a C++ COM DLL. It is defined as single apartment model: _ATL_APARTMENT_THREADED My test app is written in C# and does the following: start thread 1 thread 1:setName start thread 2 thread 2:setName since my dll is ATL I would expect the name at...
juergen d
1

votes
1

answer
345

Views

Mysterious global variables - COM/STA Apartment Object

Here's the scenario: -COM DLL, loaded into the address space of the process that uses the DLL. -Inside the DLL couple global variables exist (lets say var a, var b) and a global function. -Process starts up, calls the global function and initializes globals a, b and calls CoInitialize(NULL) - The th...
ActiveX
1

votes
1

answer
311

Views

CAtlHttpClient - Navigate to an IP6 address seems not to work

I'm using the ATL Server CAtlHttpCLient to send HTTP requests to a server. Basically my code looks like this: ATL::CAtlHttpClient client; ATL::CAtlNavigateData navigateData; navigateData.SetSocketTimeout(60000); navigateData.SetMethod(ATL_HTTP_METHOD_POST); BX_TString jmfmime = 'application/vnd.ci...
kvd
1

votes
2

answer
864

Views

TVN_SELCHANGING not received

I have a WTL81 app. CMainFrame has a child CPaneContainer, that has a child window CTreeViewCtrl. The problem is CTreeViewCtrl doesn't receive TVN_SELCHANGING message. I have 'spied' CTreeViewCtrl and his parent (CPaneContainer) and no notification code is received. CMainFrame is implemented from...
cprogrammer
1

votes
1

answer
2.2k

Views

How Can i load third party .dll (COM DLL) in ATL Application with WinCE 5.0 RTOS?

I got the answer and need to understand the following : I have a WinCe 5.0 ATL application. This application is using third party COM dll and 3rd party application(.exe).As per my understanding on WinCE and Dll loading is as following: WinCE: All the dll exported functions should be written in '.Def...
JRR
1

votes
1

answer
468

Views

Create IE addon using VC++ 2010 express edition

I need to create an addon for IE using VC++ 2010 express edition. It requires to work on BHO and create dll files. So can any one please provide me the steps to follow and references. Also I came to know that it requires sdk and wtl/atl so please help me regarding the same. I have downloaded and ins...
Atul Tiwari

View additional questions