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,011
questions
0
votes
1
answer
38
views
Where are the COM error numbers for Err.Raise registered?
Err.Raise supports a load of errors clearly nothing to do with VBA:
Where are these error numbers defined? How can I register an error so that running Err.Raise my_number will have a description I ...
0
votes
1
answer
14
views
Why do I get the error "Server Creation Failed: "Class not Registered"?
I am creating a COM server (using actxserver) for CSTStudio using MATLAB, but I'm getting the error
Class not regiestred in feval
which is working inside actxserver. Also when I tried to create COM ...
4
votes
1
answer
43
views
COMInterop - System cannot find file - IDE only
I've an old VB6 program which I have haven't used for several months. The program references numerous C# assemblies (.NetFramework 4.8). Running the programs as binaries, it all works fine.
I have ...
0
votes
1
answer
46
views
Why does the Document_Open Macro not run in Word when opening the document from Delphi using Office Automation
I am trying to use Office Automation in Delphi Tokyo to open a Word document (using Word 2016). The document has a Document_Open macro that prompts the user to optionally run another macro.
When I ...
-1
votes
1
answer
36
views
CreateInstanceLic is failing on Windows Server 2016 but not on Windows Server 2019
I have a console application that crashes on Windows Server 2016 at the CreateInstanceLic() API. But the same application is running fine on Windows Server 2019.
0
votes
0
answers
28
views
Getting RPC_E_WRONG_THREAD when calling the call back method on the .Net object from the native C++
I am getting below error when I call the call back method on the .Net CLR object interface from a C++ application.
"RPC_E_WRONG_THREAD The application called an interface that was marshalled for ...
-5
votes
0
answers
32
views
Wordpress webpage not sure if it's published [closed]
I created a webpage about a question on wordpress app and the website opens externally but if I search the word...wbsite5 it doesn't show. can people see the webpage I published
I can't post images
...
1
vote
1
answer
36
views
Calling IWbemServices.GetObject() with JNA and Java?
I wish to use WMI from Java language with JNA package.
I am able to successfully run a WQL query:
import com.sun.jna.platform.win32.COM.Wbemcli;
Wbemcli.IWbemServices svc = WbemcliUtil.connectServer(&...
0
votes
0
answers
31
views
How can I expose a .NET enum name to COM in the same naming convention as legacy C++ COM components?
I have a legacy C++ component with enums which can be accessed to COM clients. For example:
typedef [v1_enum] [uuid(C04A9760-3555-1555-9555-0DA024B80555)]
[helpstring("Enum in C++")]
enum ...
0
votes
1
answer
42
views
What is stopping win32.Dispatch() from opening Microsoft Office programs?
I am attempting to open Outlook using the following Python code:
import os
import win32com.client as win32
outlook = win32.Dispatch('Outlook.Application')
This does not work, but it doesn't throw an ...
0
votes
0
answers
57
views
in my shell namespace extension context menu differs from the default one("new" and "properties" items are missed)
I have my custom shell namespace extension.
Just want to have a virtual folder mapped to some folder on disk C:/ with the same functionality.
using namespace ATL;
class ATL_NO_VTABLE ...
0
votes
0
answers
37
views
.NET Core: COM delegate throws System.AccessViolationException when trying to call 32-bit dllhost from 64-bit application
I need to pass a delegate function between .NET 6 32.bit COM server and .NET 6 64.bit client to communicate.
I wrote a sample with a 32-bit server, implemented as a C# class in a class library project,...
-1
votes
0
answers
20
views
Override Help Button in ICreateErrorInfo
I want to change the help button behavior in ICreateErrorInfo
it's open a CHM file with some help context, what I want to change is open HTML file
-2
votes
1
answer
93
views
Legacy VC++, Com based Desktop application to Modern web with microservices
I am in the process of moving my existing desktop application to web. The GUI is developed using MFC/VC++ and the buisness logic is written in COM enabled VC++ DLL. This Dll has various ...
-1
votes
0
answers
49
views
Calling COM object function has CLR call FailFast without specifying a reason
This is all I needed to replicate the issue:
#include <Windows.h>
#include <shobjidl.h>
int main()
{
HRESULT hr = CoInitializeEx(NULL, COINIT_APARTMENTTHREADED |
...
0
votes
0
answers
10
views
Getting UpdateNotify error when implementing a python RTD client
I'm trying to implement an RTD client using this project as an example, but without success.
Instance as RTD server the example contained in the win32com package below, and in Excel it works perfectly,...
0
votes
0
answers
22
views
How to debug failed calls to ConvertAssemblyToTypeLib()?
The function ConvertAssemblyToTypeLib from assembly System.Runtime.InteropServices is a black box that is giving me a lot of head aches.
In most cases, this call
ITypeLibConverter tlbConv = new ...
3
votes
1
answer
63
views
How to expose "generic" C# collection to COM
I have an API which I have developed a C# client for which converts HTTP GET requests into C# objects.
I have made the client COM visible as I need it in VB6, the issue here is that generic ...
0
votes
0
answers
20
views
Got an error while installing DCOM component using PowerShell
I have the following PS code which creates a DCOM object and updates the DCOM component:
# install application
$app = $apps.Add();
$app.Value("Name") = $applicationName;
$app.Value("...
0
votes
0
answers
14
views
How to start slideshow in PowerPoint using com32
I am trying to control my PowerPoint presentation using python via com.
There is an article on how to do this here and it suggest I do the following:
app = win32com.client.Dispatch("PowerPoint....
0
votes
0
answers
21
views
Error querying COM interfaces - class not registered
I try to register a COM component in new Windows Server 2012 R2 with REGASM and don't get any errors. However, the COM class doesn't get registered.
Regasm result
On my developer computer, this class ...
-1
votes
1
answer
29
views
RTD #N/A error in Excel 365 only when RTD COM object is registered at the user level
I am developing a COM object that implements the excel RTD interface using .NET c#. It is a x64 bit project and office is also 64bit.
The 64bit RTD COM object works just fine in Office 2016 (also ...
0
votes
0
answers
21
views
Com component in non UI console application [duplicate]
I am using a third party COM component to communicate with hardware device in my .net 6 console application.
Initially when I started implementing the functionality I was getting following error
...
1
vote
0
answers
18
views
MS Excel COM Issue - Unable to get the image out from Clipboard while using excel COM object
Unable to get the image out from Clipboard while using excel COM object Range.CopyPicture method
On my local machine everything is working fine but on server I am facing this issue.
Local machine I ...
3
votes
0
answers
53
views
Inno Setup: Iterate/Enumerate through Firewall Rules / IEnumVariant
I have a similar question like Daniel Rogers about how to declare an IEnumVariant in Inno Setup.
Declare an OleVariant and IEnumVariant in Inno Setup
I'm writing some extra functionality for our setup,...
0
votes
0
answers
22
views
How to create a task pane using C++/COM in MS Office?
I know Office add-ins can be created by
Office.js
VSTO
COM
I implemented an add-in before using VSTO, after searching for the information on how to do that on the Microsoft website, I get nothing. ...
1
vote
1
answer
75
views
Switch focus/activate another Application after opening it
I added an "Edit with Photoshop" button and succeeded opening Photoshop with a file using this code:
Type PhotoshopType = Type.GetTypeFromProgID("Photoshop.Application");
object ...
1
vote
0
answers
45
views
Call .net in ActiveQt
For a project i need to call C# in Qt. It seems that the way to do it is by using COM and ActiveQt.
So i have this very basic C# (.Net Framework 4.8, "Register for COM interop enabled", ...
0
votes
1
answer
39
views
Debug .NET com dll when running from Access
I have a com dll developed in VB.net that provides an interface to eBay api's. Been working for many years. Recently eBay change certificate authority and moved to TLS 1.2. Sorted through that but now ...
0
votes
0
answers
22
views
Class only registered when accessing as Administrator
I am trying to access a COM dll from my .NET application. That dll is registered using regsvr32. When the appication that tries to access the dll is running as a normal user the application quits with:...
0
votes
2
answers
42
views
Autosar: time duration between Full COM request by ComM and Can Interrupt should be less then 20ms
There is customer requirement that time duration between Full COM request by ComM and Can Interrupt should be less then 20m but it when I calculated it is showing 56ms. Is there any parameter in ...
0
votes
2
answers
50
views
"After" parameter of Sheets.Add method
I tried adding 5 sheets after the active using the following code:
Imports System
Imports Microsoft.Office.Interop
Module Program
Dim oxl As Excel.Application
Dim owbs As Excel.Workbooks
...
1
vote
1
answer
84
views
Is It Possible To Use Reflection To Pass A COM Object From C# to C++?
I have a C# assembly that does some work and sends the results of the work back to a C++ core. I am trying to use Reflection to pass it back since the C# assembly runs on a different thread than the ...
1
vote
1
answer
70
views
.NET dll using different TLS versions
We have a Microsoft Access application that consolidates many of our activities on eBay. I do this through several com dll's that Access references. One part of the application posts listings from our ...
2
votes
2
answers
99
views
Count pages in word document via Powershell without com object
I'm trying to write a PowerShell script to count the number of pages in word documents which will end up in a database to be used as a way to assess average number of pages in documents. We have ...
0
votes
2
answers
33
views
I try to access my desktop thru my PowerShell, and its said "Cannot find path 'C:\Desktop' because it does not exist"
how can I fix this?
enter image description here
1
vote
1
answer
34
views
Does COM marshaling work with objects created using CComCoClass::CreateInstance?
Sorry if this is a dumb question, but I was wondering if the COM pointer-marshaling functions will work with objects created using ATL's CComCoClass::CreateInstance. According to the docs, that ...
0
votes
0
answers
38
views
OCX reg-free-com process with manifests
I've a third-party lib (DLLs and a OCX) and my own app (EXE and DLLs).
Problem: Version 1.0 of my app uses lib version 1.0 and my app version 2.1 uses lib version 1.4. Both lib versions are not binary-...
0
votes
1
answer
41
views
How can I get the DateLastModified as an integer when filenames may contain UTF8 characters?
I'm writing Lua (5.3) in a Windows environment; the result will be used in many countries so file handling has to cater for multiple locales (which rules out the lfs and Penlight libraries) and also ...
0
votes
0
answers
29
views
Why did I have to use an int to combine these enum flag values together?
Perhaps someone can just explain the logic behind why this is actually an issue.
In my C# DLL I have a set of flag values that expose via the COM API:
[Flags]
[Guid("~~~")]
[ComVisible(true)...
0
votes
0
answers
30
views
Coloring A Straight Line In Excel Using PowerShell
So, I have created this Excel COM object, made it visible, and drew a straight line on the worksheet. I am trying to determine how to modify that straight line so as to change the color and width of ...
2
votes
2
answers
87
views
How to open the Property dialog of selected objects in Management Console?
I am searching for the possibility to open default property dialogues for particular Windows objects, like:
the property dialogue for a particular service in services.msc
the property dialogue for a ...
2
votes
1
answer
65
views
Pythoncom - Passing same COM object to multiple threads
Hello :) I´m a complete beginner when it comes to COM objects, any help is appreciated!
I´m working on a Python program supposed to read incoming MS-Word documents in a client/server fashion, i.e. the ...
2
votes
0
answers
71
views
How can I get a VB6 program that references a COM-visible .NET library that depends on other .NET libraries to work?
I have created a simple .NET COM-visible DLL 4.7.2 which I successfully exposed to COM via project settings as well as class tags like:
<ComVisible(True), Guid("4420535A-7EDA-4EB1-8CFE-...
0
votes
0
answers
22
views
#import changing the name of an imported function
I've been spending way too much time on this problem.
I am developing a project that uses COM in the Visual Studio 2019 Enterprise edition. I have the following interface defined in my IDL file:
// ...
0
votes
0
answers
72
views
Support for Shell.Explorer.2
I use the Internet Explorer ActiveX component (Shell.Explorer.2) in my applications and my question is - will Windows discontinue support for this component?
I read that Internet Explorer will not be ...
1
vote
1
answer
87
views
Interoperability issue with COM events in Python and a COM object created in .NET Core 6.0
I am currently trying to create a COM object that is made in C# in .NET Core 6.0. The COM object itself works as intended. The issue that I am having is related to the custom events that the COM ...
0
votes
0
answers
28
views
.NET Interface pointer not being recognized in C++ code
I have the following interface created in .NET that is supposed to be used in C++ code:
namespace MainWindow.Host
{
[ComVisible(true)]
[Guid("6B9F2DE8-2A81-40AA-8604-2B90450CEF49")]
...
2
votes
1
answer
71
views
How is the state for COM objects stored?
Consider this example from MSDN of using a File Open Dialog through COM:
#include <windows.h>
#include <shobjidl.h>
int WINAPI wWinMain(HINSTANCE hInstance, HINSTANCE, PWSTR pCmdLine, ...
1
vote
0
answers
69
views
How to correct use SAFEARRAY of Variants in C++/CLI
I have an array of variant data that I need to acquire on the native side and then marshall into the managed size. Some members of the array are themselves an array so I'm trying to populate these ...