com

Classic ASP with COM throwing "Data source name not found and no default driver specified" on Windows Server 2008 R2

We have a classic ASP application that connects to a COM component. The COM component reads a connection string from the registry and connects to a datasource. We exported the COM package out of a 2003 box and imported into a 2008 R2 box. We've reviewed every setting to ensure its correct. When we hit the classic ASP site, we get the fol...

C++: Convert wchar_t* to BSTR?

I'm trying to convert a wchar_t * to BSTR. #include <iostream> #include <atlstr.h> using namespace std; int main() { wchar_t* pwsz = L"foo"; BSTR bstr(pwsz); cout << SysStringLen(bstr) << endl; getchar(); } This prints 0, which is less than what I'd hoped. What is the correct way to do this conversion? ...

What is the best OO Design Pattern for handling Windows Registry (or filesystem) objects?

I'm building a class or two based on StdRegProv to handle Windows Registry via PHP's COM class. For reference to all known StdRegProv methods and types, see: http://msdn.microsoft.com/en-us/library/aa393664%28v=VS.85%29.aspx. (Don't even get me started on the fact that I have to know what Reg type a named value is just to get or set i...

events in COM object

hi, i wrote a COM interface in C#, i need to declare events, how i should to it? one more question i user thid COM in Jscript how can i debug the code of the COM (not the Jscript)? thanks ...

Building a COM object vtable in x86 assembly

I am building a COM object in x86 assembly using NASM. I understand COM quite well and I understand x86 assembly pretty well, but getting the two to mesh is getting me hung up... (by the way, if you're thinking of attempting to dissuade me from using x86 assembly, please refrain, I have very particular reasons why I'm building this in x8...

VB6 and Com debug issues after XP Service Pack 3 install

My company recently upgraded our PCs to XP service pack 3. We still have some vb6 apps that connect to an EJB server via a JCOM bridge. These apps still work as compiled exes but i noticed that during debugging the IDE hangs when it tries to create a JCOM object. I suspected it was as a result of the XP upgrade and was able to confirm t...

how to use event of comObject in javascript????

hi i wrote a comObject in c# this object have function and methodes i want to use this comObject in Javascript-there us no problem to use the function but i do not success to use the event how can i register to the event??? i fount conflintied opnion un the web what the best way?? ...

COMException when creating COM object for Excel Automation in C#

I've got this error when I create a COM object in order to use Excel automation. Any one knows why I am getting this error? System.Runtime.InteropServices.COMException(errorCode = -2146959355) Message: Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 8008...

install (and use) a COM component in delphi application as I run the exe

I am trying to solve the doc to pdf conversion as described here. Since there is no a Delphi component (with source code) that creates pdf from doc, I was wondering how it is possible to "register the COM at runtime". I AM NOT USING AN INSTALLER, I just deploy the exe. So the idea was to simply put the ActiveX dll in the resources and ...

Creating a C++ COM client for C# COM server

I have a C# ComServerProject that implements an out-of-proc COM server, and I've selected the option "Make assembly COM-visible" on server project's "Assembly Information" dialog. In the same solution I have a C++ ComClientProject that should use the COM interface defined in ComServerProject. However, I don't know how to actually use th...

Registration free COM: VB6 Executable referencing VB6 DLL

So, I've got a single VB6 executable that references multiple VB6 COM DLLs. Is it possible for me to generate, on-the-fly, a manifest for the executable as well as a manifest for each of the referenced DLLs? If so, then how? I would like to perform this operation as part of our build process without having to register the COM DLLs a...

Result of IWebBrowser2->GetDocument() doesn't implement IHTMLDOMNode

I have a Browser Helper Object and want to do some operations on the DOM of a website. I am struggling on one strange thing right now, I hope somebody knows what is happening here. Let's assume I have the following code snippet somewhere in my Browser Helper Object and m_pBrowser holds the current IWebBrowser2: if (m_pBrowser) { CCo...

WIA interop deployment through VS ClickOnce

I have an application that allows me to scan images on my development PC which works successfully. It uses the Microsoft Windows Image Acquisition COM ActiveX dll. I am running VS2008 on Windows 7 64 bit. I am having problems trying to deploy the Interop dll using ClickOnce. This component is referenced through the VS project in the no...

how to consume a vb.net COM dll in vc++

Hi i have a vb.net generated Dll with Com interop enabled. in my Vc++ 6.0 project i have included the .tlb and tried to create object for the class but it is failing for me. CoInitialize(NULL); //initialize COM library HRESULT hresult; CLSID clsid; hresult=CLSIDFromProgID(__uuidof(SHandler), &clsid); //retrieve CLSID of component SHa...

Why can't I access my class through COM?

I have a class library that I have written in C#.net. I want to register it with COM on my 64 bit windows machine so that I can create instances of it using CreateObject() in scripts (javascript, vbscript, whatever). So I created a setup project. I set the Target Platform of the setup project to x64. The class library project's Target pl...

Is it possible for the .NET WebBrowser control to use IE9?

I realise it's an early release and unstable. I wouldn't dream of swapping out the default webbrowser control for IE9 in any other project, but in this case I specifically need IE9 to compare alongside other versions. I'd like to have the .NET WebBrowser control use IE9 instead of the default version of IE on the machine. I have full co...

Making a DLL COM accessible

I have a class library written in .Net that I would like to make available to VB6/VBA. What I tried did not work (obviously as I am asking this question). Here is what I did: I Created a Class Library Project in Visual Studio 2010 Express and put the code in a Class Module. I opened the project properties and went to "Assembly Informat...

Error When Instantiating an Object

I am in the middle of (trying) to create a Class Library available for use in VB6/VBA. With some assistance received here I have now done the following: Created a Class Library Project in Visual Studio 2010 Express and put the code in a Class Module. Learned I needed this wonderful thing called an "Interface"... Made one of those:) I o...

C# - How to test at runtime which COM coclass was used to instantiate an interface?

Suppose you have a COM interface ICOMInterface that is implemented by coclasses Coclass1 and Coclass2. Neither of these coclasses have interfaces of their own (for simplicity's sake and to illustrate my issue). In C#, you can create an instance of a COM interface from a coclass like so: ICOMInterface myComInterface = new Coclass1(); ...

PHP Convert word to html with COM

Hi, Here is my code: $file='C:/a.doc'; $saveas=__DIR__.'/tmp/a.html'; $word=new COM('word.application'); $document=$word->Documents->Open($file); $document->SaveAs($saveas,8); $word->Quit(); $word=null; echo file_get_contents($saveas); ...