com

MFC: how to detect a focus/activation event in a Property Frame?

Alright, this has been bugging me for some time now. I have a Property Frame with 5 Property Pages in it. I created it using this COM method: OleCreatePropertyFrame The basic result is it creates a modal dialog with a tab control built into it with which I can switch from one property page to another. The issue is when I switch to a t...

COM MFC ATL worth studying??

Is it worth studying COM MFC ATL WTL now? ...

Synchronizing COM Threads with .NET

In our C# application we are making use of a thirdparty (Thesycon) COM object which runs threads to write data to a scanning device from 7 files. I start the writing method by calling COM.StartWriting() and I can stop it by calling COM.StopWriting() Now the problem is I'm unable to synchronize the threads. This means out of 7 I a...

Implement OPOS Device in C#

For some interop with a legacy POS application, I was wondering if it was possible to implement a phony OPOS device in C#. Basically I would implement a phony keyboard that took web requests and passed on key presses to the legacy application. Does anyone know if this is possible or where to get documentation? I figured OPOS just call...

Get Object from Windows Handle

If you know an object type, and you have the object's handle (hwnd), is there a way to turn that into a variable?Example:Set myObj = Magic(hwnd) ...

I'd like to call the Windows C++ function WinHttpGetProxyForUrl from Python - can this be done?

Microsoft provides a method as part of WinHTTP which allows a user to determine which Proxy ought to be used for any given URL. It's called WinHttpGetProxyForUrl. Unfortunately I'm programming in python so I cannot directly access this function - I can use Win32COM to call any Microsoft service with a COM interface. So is there any way...

What's the correct way to use win32inet.WinHttpGetProxyForUrl

I'm trying to use a feature of the Microsoft WinHttp library that has been exposed by the developers of Win32com. Unfortunately most of the library does not seem to be documented and there are no example of the correct way to use the win32inet features via the win32com library. This is what I have so far: import win32inet hinternet = w...

Sharepoint: COM exception thrown when navigating to the root of a new site collection

After a fresh install of WSS 3.0 and creation of a new web application and site collection, I receive the following error when I navigate to the newly create site: [COMException (0x80070005): Access is denied. ] System.DirectoryServices.DirectoryEntry.Bind(Boolean throwIfFail) +557 System.DirectoryServices.DirectoryEntry.Bind() +4...

How Can I Create My C# Com Class From JavaScript Using ActiveXObject

I wrote C# class to COM but I could not use it from JavaScript. Example [ComVisible(true)] [ClassInterface(ClassInterfaceType.None)] [ComSourceInterfaces(typeof(ICommandsEvents))] [ProgId("Scripting.Commands")] public class Commands : ICommands { public Commands() { } public int CreateChannel(string channelName) { ...

How to find available COM ports?

How to find available COM ports in my PC? I am using framework v1.1. Is it possible to find all COM ports? If possible, help me solve the problem. ...

using registered com object dll from .NET

Hi all, I implemented a python com server and generate an executable and dll using py2exe tool. then I used regsvr32.exe to register the dll.I got a message that the registration was successful. Then I tried to add reference to that dll in .NET. I browsed to the dll location and select it, but I got an error message box that says: A ref...

How Do I serialize a COM object in .Net?

Hi, I need serialize a Com Object using .net using c# or Delphi .Net is this possible? Bye. ...

CoCreateInstance fails with 0x80040154 on ITaskBarList3...

Does anyone have any idea why CoCreateInstance would be failing on ITaskBarList3 on Windows 7 64-bit? The error code is 0x80040154, which is Class Not Registered. The calling code (VB6) is: Public Const IID_ITaskbarList3 = "{EA1AFB91-9E28-4B86-90E9-9E9F8A5EEFAF}" Public Const CLSID_TaskbarList3 = "{EA1AFB91-9E28-4B86-90E9-9E9F8A5EEFAF}...

How do I use c# to re-implement an old DCOM server without breaking existing clients?

Back in the day, I wrote an out-of-process (i.e. EXE) COM server using VC++ 7.x (Visual Studio 2003 and .Net 1.1) using the ATL library. The server used the Multi Threaded Apartment (MTA) model and is activated by DCOM calls (VB6 clients). Multiple client requests are satisfied by a single process -- which is activated by the first req...

connecting managed event source to an unmanaged event sink

I'm trying to write a managed library in C# that will act as an event source for an existing C++ event sink. The problem I'm having is that when the unmanaged app calls AtlAdvise to get the connection point map for my library it is getting the error "0x80040200" (CONNECT_E_NOCONNECTION) - There are a couple of MSDN articles about that er...

Windows Service COM error?

I've written a Windows service in C# that runs fine on XP, but when I install it on server 2008 I get the following error: Retrieving the COM class factory for component with CLSID {20A80B2B-6D69-40B7-A66A-D63C60B4878C} failed due to the following error: 80040154. Anyone know what this is about? ...

appdomains in COM interop

I have a .Net class that calls a c++ COM object which in turn calls another .Net class in COM. I've found that the two .Net classes are in seperate appdomains (which makes some trouble with log4net). Note they are in the same thread though. Why is this? Is there a way to ensure they will be in the same appdomain? ...

How does the C# compiler detect COM types?

EDIT: I've written the results up as a blog post. The C# compiler treats COM types somewhat magically. For instance, this statement looks normal... Word.Application app = new Word.Application(); ... until you realise that Application is an interface. Calling a constructor on an interface? Yoiks! This actually gets translated into a...

New Version of Third Party COM DLL - How to Install and Keep Old Versions in Delphi?

I need to have my Delphi program use a new version of a third party DLL. I'd like to be able to use the new version but revert to the old version if I need to. Some of the objects are invisible objects on a form in the app. Others I instantiate at runtime. How do I install the new version of the DLL into Delphi while maintaining the ...

Use DLL in PHP?

I'm not going to lie. I'm not all the familiar with Windows and COM objects. That's why i'm here. First of all is it possible to access a DLL from within a PHP script running out of Apache? In my journey around the internets i believe that i have 2 options: compile the dll as an extension for PHP. (i didn't make this dll) access the DL...