com

How to Call ATL Error() in a normal cpp

Hi, I'm trying to call Error("My Test") in normal cpp class (Not a COM object, but this class will be used by COM). In the compilation, I get error saying 'Error': identifier not found I have included #include in the cpp file. Please explain why it does not work. NOTE: I can use Error() inside COM object successfully Thank you ...

How do you find a COM's interfaces without typelib?

Is it possible to find all interfaces (classes, parameters, ect..) normally registered with Component Object Model's (COM) TypeLib even though the TypeLib is completely empty? If so how would you go about doing this? I believe another term for this is an "Anonymous COM". I am sure that accessible interfaces exist for this COM because i ...

problems with singleton COM servers and windows services

Hi, I am using Windows XP SP2, VS 2008 SP1 like this: brought up 2 singleton COM servers out of process in c++ one GUI app in c++ The GUI app used to instantiate both singleton COM servers and then two other programs used to load each singleton COM server - one server for the first prog, the other for second prog. All went well mi...

How to use an out-of-process COM server without its tlb file

It is about Window COM component. Server.exe: an 32bit out-of-process COM server CLSID_Application: The GUID of a COM object in Server.exe Client.exe: a 64bit client application which use Server.exe in a registry-free way. As we know, an exe can't be used as a registry-free COM component, to mimic such behavior, I start the Server.ex...

ActiveX component installation is blocked by IE.

HI I have created a ActiveX componed and packed into a cab file 1) Created the setup for Class Library that I would like to be exposed for COM access. 2) Create the CAB setup project taking the Project output from the setup created in the setup 1. 3) Embedded the object tag in a sample html file Now when I launch the sample html...

How to Insert my Code Between Zoom Text and Windows?

I am writing an application whose users will use ZoomText and a tablet PC. ZoomText is screen magnification software. However ZoomText has a bug that prevents tablet tracking from working correctly, meaning finger and pen interaction with the screen is incorrect. When you zoom in on a rectangle in the screen and tap on something, you are...

Unable to get IApplicationAssociationRegistration::QueryAppIsDefault working

So I'm trying to use IApplicationAssociationRegistration, which has been introduced with Windows Vista. I am using Windows 7 x64. However, every call that receives a ProgId (aka AppRegistryName, e.g. "FirefoxHTML") returns a HRESULT of 0x80070002 which means "The system cannot find the file specified". Calls like QueryCurrentDefault tha...

Using COM dll in my C++ program. problem :(

Hi all. I wish to use a COM dll in my C++ library. The way I figured going about it, is to #import the dll's .tlb file, which I did : #import "mycom.tlb" no_namespace The problem is , I don't quite know where to place this declaration. should it be inside the H file or the CPP file? or maybe the stdafx.h file? I tried placing it in ...

Call a COM DLL dynamically

I have an application in VC++ which needs to execute a function provided to it (function name entered in a text box) from a COM DLL (file name provided in another text box). I have seen code for loading a Win32 library using LoadLibrary and GetProcAddress. How can this be done for a COM DLL file (created in Visual Basic 6.0)? Is there...

.NET Object from VB6 without use of regasm.exe?

Hello, The software company I'm working for builds software for schools, and so our client machines are usually locked down in such a way it makes it pretty impossible for us to install anything on it. Our old system is primarily based on a (very large) MS Access project and so it gets around the access problems by just running from a...

Register a C#/VB.NET COM dll programatically

Question: I have a .NET dll which I use from a C++ program. Now I have to register the dll programmatically on a deployment computer. How do i do that (programmatically! not using regasm) ? I remember, when I once called a VB6 dll from a C++ dll, I had to use DllRegisterServer and DllUnregisterServer. Is that still so with a .NET dll...

how to use .Net localization framework when embedding a winforms control in internet explorer

I have a standalone winforms application localized in 4 languages. For authentication and security reasons, I had to embed the main control in internet explorer (to be able to use an authentication session cookie created earlier when the user sign-in with his browser). I embedded the control in IE by making my assembly and main control ...

Call was rejected by callee PowerPoint Automation

Hi, I have a commandbar model which automates powerpoint. i recently faced a strange problem that when powerpoint is opened through my application, and the data is being loaded through my application to populate the menu, if a user right clicks on powerpoint i get the error message: "Call was rejected by callee powerpoint" how do i re...

MAPI Windows 7 64 bit

I've got a legacy application that creates an email message with an attachment. The code uses the MAPI interface to create the message. This code has worked for quite some time. When the application is run on a Windows 7 64 bit machine, the call to MAPILogon fails with a generic error code. Is there an incompatibility with MAPI and Win...

COM interop reference counting guidlines

Recently I spent quiet some time writing various Visual Studio Extensions projects. Even though the projects are all managed code to access the core VS services it is still necessary to work with the old style COM interfaces. Here is an example : var selectionTracker = (IVsMonitorSelection)serviceProvider.GetService(typeof(SVsShellM...

C4772 even when the type library is registered and present

I have a set of Visual C++ 9 COM component projects dependent on each other. ComponentA publishes its typelib into ComponentA.tlb. ComponentB imports ComponentA.tlb into ComponentB.idl and publishes ComponentB.tlb. Methods signatures in ComponentB.idl contain parameters of types defined in ComponentA.tlb. Both ComponentA and ComponentB ...

ComCtl32.dll Version 6 with Qt

I'm trying to implement a balloon tip. By following the instructions on this page: http://msdn.microsoft.com/en-us/library/bb760252%28VS.85%29.aspx I managed to implement the balloon, but the balloon is not using the appropriate theme under Win7. I read somewhere else that for the balloon to use the right visual style, ComCtl32.dll Ver...

Vb6 project files and source safe

A part of the application that I am working on is a legacy Vb6 Windows forms application. All the files in the project are under source control (VSS) except the Vb6 project file. From what I can establish from the other developers working on the project the reason for this is that the com components used in the projects have different ...

Worksheet.Unprotect - Office Interop - Difference between 2003 and 2007

I have a .NET winforms app that automates Excel and checks for a worksheet password. The requirements are to be able to detect 1) that the protection is turned off 2) that the password is removed (protected but there is no password) 3) that the password matches the correct password from a database To meet the second requirement the prog...

Calling C# From Unmanaged C++ Passing Or Returning "Complex" Types

Hello, I'm after help on how to use complex objects either as return values or passed as parameters to C# class methods exposed to unmanaged C++ as COM components Here's why: I'm working on a project where we have half a dozen unmanaged C++ applications that each directly access the same Microsoft SQL Server database. We want to be ab...