Questions tagged [com]
Component Object Model (COM) is a component technology from Microsoft, featuring remoting, language independence and interface-based programming. For questions about the COM serial port, you should use the [serial-port] tag instead.
12,197
questions
0
votes
0
answers
15
views
Problems with using a COM object in VB6
I have a VB6 program from many years ago. It has an 'out of process' COM exe that the main program starts and sends messages (API calls). The program and installer have worked fine for a number of ...
0
votes
0
answers
15
views
RTD formula not working after migrating from .NET 4.x to .NET 7
I have an implementation of RTDServer working fine in .NET Framework 4.x and I am trying to upgrade to .NET 7 but still have problems.
This is my basic example in .NET 7, Server.cs:
using System;
...
0
votes
1
answer
15
views
Com Port for Scilab / Xcos
What is the easiest way to get a Block in Xcos that can communicate via Com Port.
I implemented a PID Controler in XCOS. Now I would like to switch from Model to the real world.
Before I start ...
0
votes
0
answers
20
views
Why shell extension DLL for folder background context menu not working / not loading at all?
Shell Extension Context Menu Win32 DLL not working
Context -
Hi, It's my first COM shell extension win32 DLL project in C++. I'm using this video tutorial series. https://youtu.be/ih3NuiUACnI , only ...
0
votes
1
answer
28
views
How do you use the ActiveX RDP Client in MFC C++ Application?
I can't seem to find a working example of how you're supposed to use the ActiveX RDP client. I found Using the Remote Desktop ActiveX control but it doesn't explain how it's to be used. I was able ...
2
votes
2
answers
72
views
Interfaces and multiple inheritance
I want to design my code somehow like Microsoft's COM, meaning:
I have my dll with different objects implementing different interfaces,
I only expose the interfaces to the client (this part is not ...
0
votes
0
answers
18
views
Reading Autodesk Inventor dialogs with Python
I am working on a project with a lot of .iam (Inventor Assembly) files. Sometimes these files are missing, causing the following dialog to show up when I try to open files that use this assembly:
I ...
0
votes
1
answer
57
views
Is possible to wrap an external C# dll into a COM interop and use it from C++?
The background is that I have an external C# dll distributed as a private nuget package from colsultants, this library should be consumed by C# .net 4.x projects (and here no problem at all) but also ...
0
votes
0
answers
20
views
Why do generated DispID start at 0x60020000?
When extracting a TLB out of a .NET-COM-Server (using tlbexp.exe or dscom) each member of a dual (or disp) Interface gets attached a dispatch identifier (DispID). You can define one by yourself ...
0
votes
0
answers
41
views
create dll for MaxImDL VB.Net - mainly solved
Found partial Solution:
I ran Visual Studio 2019 as administrator. Then I copied Interop.MAxIm.dll to the program directory that contains Maxim_dl.exe.
The plugin can now be loaded manually and adds ...
0
votes
0
answers
48
views
How to track unreleased COM interfaces in a Visual Studio C++ project?
In my Visual Studio C++ project code, I obtain references to various system provided COM interfaces. I would like to make sure that I never forget to call Release() on each object when I no longer ...
0
votes
0
answers
15
views
COM events, C# to JNI with binary compatibility
Replacing a VB6 OCX project with C#. Basic functionality is present, but events are not forwarding to JNI listeners. The VB6 control provides two proxies to COM objects defined in C++, a manager and a ...
0
votes
0
answers
70
views
Access violation in CoCreateInstance creating a COM Object
I'm trying to communicate with a research spectrometer of a manufacturer I rather not say.
The manufacturer has provided some DLLs and example projects in Visual C++ 6 but apperently the support for ...
0
votes
0
answers
20
views
DLL Instance error in several calls to a WebAPI
i am trying to solve an error in a WebAPI that uses a COM Dll for a third party functions in a BMS software (Sage200)
The problem is that after many calls to the API, eventually it throws an Exception ...
0
votes
0
answers
22
views
VSTO comment RCW points to the wrong comment
I've come across a very strange behavior in Word VSTO. I don't know why it is happening or how to avoid it. I can demonstrate it with the following code. If _comment is set, then show its content in a ...
0
votes
0
answers
46
views
how to listen to events of COM object in rust (windows-rs)
I can use windows-rs to get IDispatch and use it to get prop or call method, but i cannot listen to events. For example, i get a IDispatch 'app', how to listen to it's event 'Close'?
I tried ...
0
votes
1
answer
69
views
Why Win32 COM example has a public constructor and private destructor
I'm trying to understand this example of asynchronous callback:
https://learn.microsoft.com/en-us/windows/win32/medfound/using-the-source-reader-in-asynchronous-mode
The callback interface has a ...
-1
votes
0
answers
48
views
How to access HCL Notes COM Objects from C#
I am trying to use the HCL Notes COM object from a .Net 7 x86 console application, the Notes client is also x86
I did manage to get it working using an external interop DLL and code I found here
but ...
0
votes
0
answers
48
views
How can I access a logging block in CANoe configuration with the help of python COM?
I want to get access to the logging block of a CANoe configuration from the Python COM. I want to use the status of the logging block to start and stop the measruement of test modules.
I have tried to ...
0
votes
1
answer
52
views
C++ Builder built COM module fails to link because __stdcall _com_issue_error(long) is unresolved
I have a module that uses WMI to get the smbios data. WMI though COM interface, nothing fancy. It compiled fine but when I use the static library created in the application the link fails with:
[...
0
votes
0
answers
41
views
Typesafe COM component with late binding in dotnet
I have some libraries in x32 that I need to call from x64 process. Googling around, I found the best way to do this is using COM components. I created 3 projects in c#:
WinForms project that is X64
...
0
votes
0
answers
28
views
Error trying to use LibreOffice COM library `com.sun.star.ServiceManager': Access denied
I am trying to use the libreOffice library using PHP.
When I run the code from the console it works fine, but when I run it via the browser it fails. The error is "Failed to create COM object `...
0
votes
1
answer
61
views
Distinguishing two COM Objects with the same CLSID / temporarily overwriting a COM Object registration
This is quite a long story so let me begin with what my goal is here:
The company I work for has its own reporting software which generates reports in MS Excel, this is done using C# and the normal ...
0
votes
0
answers
12
views
How do I debug the AllowAutoPlay procedure not being called in a WPF app
Reference: How to prevent autoplay and run my own app when inserting an USB-Flash drive
From a WPF app I need to suppress Autoplay for digital cameras I attach with a USB cable.
Thomas provided a good ...
2
votes
1
answer
160
views
How can I edit a Word Document using the windows-rs rust crate?
I developed some code using the python pywin32 package to insert citations into Microsoft Word, and while it does work, I'd like to convert this code into a much more compact and efficient rust ...
0
votes
0
answers
104
views
How to force j-interop using ncalrpc for localhost?
Our applications cannot poll OPC DA server (running on the SAME MACHINE) ONLY in asynchronous mode, because of (got from Windows Event Viewer -> Windows Logs -> System)
The server-side ...
0
votes
1
answer
68
views
Implications for COM Interfaces that don't inherit from IUnknown
I am trying to implement some COM interfaces that can be used while exporting Word documents as PDF. Some of these interfaces don't inherit from IUnknown, for instance:
#undef INTERFACE
#define ...
1
vote
0
answers
43
views
How do I handle LabVIEW strings over COM to python
I want to call LabVIEW functions from a python script and try to understand the memory handling of strings and arrays.
Let's say that I have a COM API created by LabVIEW with a function that look like ...
0
votes
0
answers
106
views
COM class factory for component CLSID{ID}failed due to the error: 80080005 Server execution failed (0x80080005 (CO_E_SERVER_EXEC_FAILURE))
I have created a web application in dotnet core 6, I have given COM reference of FANUC SDK. Application is working in debug mode but after publish I am getting below error after publishing the website ...
0
votes
1
answer
16
views
How to check my if connection through a comport to a device is connected with JavaScript
First, I'm very new to JavaScript. I have written a few working scripts that will read and write through a UART, then capture a part of the returned string and use it. I also have written a lot of ...
1
vote
2
answers
58
views
UN identified and Unregistered library,. but not on all machines
Two Windows 11 machines; One runs my VB6 App, the other beeps once and aborts with "Object library not registered" Note it does not identify the culprit.
I've tried deleting and re-...
0
votes
0
answers
36
views
How can I prevent my C# COM client from spawning a separate instance of my C++ COM server, which is already running as a Windows service?
I'm updating some legacy code that involves an old custom COM server installed as a Windows service. While I was able to compile the code on a modern version of Visual Studio and rewrite the client, I'...
0
votes
1
answer
44
views
error LNK2001: unresolved external symbol _IID_ICatalogObject with Visual C++ 6 + Windows Server 2003 Platform SDK
I have a utility that I need to run on a Windows 2000 machine. It includes <comadmin.h> In Visual Studio 2019 it compiles fine and I didn't need to specify any additional .lib files. I removed ...
0
votes
0
answers
56
views
WPF changes the Resolution and scaling of the owner window
I am currently creating a class library using C#. This library will be referenced using VBA in a win32 application CATIA. In the C# Solution, I have also a WPF project. Whenever I am calling a WPF UI ...
0
votes
0
answers
55
views
How does Microsoft::WRL::ComPtr do the type conversion
I am getting an error for the following code:
struct __declspec(uuid("9DAD7B57-D626-4AB6-B844-910DE46DAC01")) IHen : public IUnknown
{
virtual void Cluck() = 0;
};
struct __declspec(...
0
votes
1
answer
101
views
What to do with System.Runtime.InteropServices.COMException?
I am trying to write web application in C# for ATEM Mini using their SDK.
Finally i can switch video output, but only 5 times. After that, this error was showed:
The code where this error is looks ...
0
votes
0
answers
139
views
winrt::init_apartment and COM STA initialization
Working on a win32 desktop application that uses WinRT APIs. The app also calls COM APIs i.e. com client. As per C++/WinRT documentation, I am supposed to call winrt::init_apartment, which by default ...
0
votes
1
answer
41
views
REGDB_E_CLASSNOTREG Class not registered
I have two applications built using VS19 and both are calling the same dll that calls CoCreateInstance to create an object of the class associated with an CLSID. The CLSID is registered.
One ...
0
votes
1
answer
86
views
What is the correct, modern, c++ to call the Office automation COM APIs
I haven't used c++ much in years, and have no experience with using COM from c++. I've written some code in c# using Office interop to work with Word, Excel, and PowerPoint, but am struggling to port ...
0
votes
0
answers
35
views
Can't find Com-Object of Microsoft Print to PDF
In our tool we use a Com-Object of a PDF Printer to print our stuff.
To replace the printer, the easiest way would be to connect another PDF printer via COM.
I can't find any information on whether ...
0
votes
1
answer
80
views
DLL Access Error: 8007007e The specified module could not be found - QuickBooks SDK
I have an ASP.NET application that interacts with the QuickBooks SDK for desktop.
When the following code is executed on our target server (at a hosting company):
QBSessionManager SessionManager = new ...
0
votes
1
answer
62
views
How to get all the interfaces which are supported by the Delphi instance which is accessible from IDispatch?
Motivation: I got IDispatch pointer as a result of my efforts that I have described in my previous question How to access workbooks from the ExcelApplication Delphi COM reference, currently there is ...
0
votes
0
answers
82
views
How to perform operations after the shell complete the drag&drop in a COM Drag&Drop Handler?
On Windows, I want to have a folder named Automatic Folder. When I drag and drop something in it, the folder rename itself Folder 1 and a new empty Automatic Folder is created. Ending up with two ...
0
votes
0
answers
33
views
How can i call a DLL from PHP (that DLL doesn´t contains a dllregisterserver())
I have bought a device, which comes with the SDK, it is a DLL file and I need to use it in my PHP application, but I am unable, since the DLL file does not contain the dllregisterserver() function, so ...
0
votes
1
answer
86
views
How to get targeted file/folder information when implementing a COM object using IContextMenu interface
I want to customize the menu you get when you right-click on a folder on the windows desktop and windows explorer. As The text displayed by my menu should be dynamic (depending of the folder path), I ...
2
votes
1
answer
124
views
How do you format a list of Python values to be compatible with the COM SAFEARRAY format?
I am sort of surprised this hasn't been covered before.
The calling for the method (in C) is:
SetValues(BSTR Keyword, SAFEARRAY * Data)
I have tried:
handle = win32com.client.Dispatch("My....
0
votes
1
answer
47
views
Changing .NET 6 COM host's publisher/other information?
I am writing a COM application in C# and I am curious if it is possible to change the VERSIONINFO of a .comhost.dll that is generated alongside the one with all the .NET code. So there are two DLL ...
0
votes
0
answers
50
views
IExecuteCommand keeps launching a new Process/Com Server?
I'm working on Shell Integration in Windows, using the MS sample below:
https://github.com/microsoft/Windows-classic-samples/blob/main/Samples/Win7Samples/winui/shell/appshellintegration/...
1
vote
2
answers
47
views
Is it possible to use Redemption.dll without admin rights?
I have downloaded the redemption.dll and it needs to be added with regsvr32.exe, however lacking the admin rights to do so, I'm wondering if there's any other way to access Redemption in Outlook's VBA?...
0
votes
0
answers
27
views
Wierd thing happens in my test of COM Hijacking
I currently test the validity of COM Hijacking in win10, follow like this https://github.com/leoloobeek/COMProxy. I can success in doing COM Hijacking(clsid-hijack) in my computer-A, by adding hkcu:\...