12,400 questions
Advice
0
votes
3
replies
58
views
Is it possible to connect the New Outlook for Windows to our own server?
I have a COM C++ plugin which is developed using MAPI, which gets installed on Outlook and then it talks to my sever, I create a Mail profile providing server, user and pwd and it connect to server ...
0
votes
1
answer
43
views
Setting Excel_Application.Calculation property (via Delphi & OLE)
I am trying to read and set the calculation mode in Excel. I have
type
TXlCalculation = type LongWord;
const
xlCalculationAutomatic:TXlCalculation = TXlCalculation(-4105);
xlCalculationManual:...
Best practices
1
vote
4
replies
129
views
What are the strengths and weaknesses of using VTable/COM-centric APIs?
I'm currently designing a library,
I want this library to maintain a stable interface for old applications,
However, it should be expandable.
It acts as a hardware abstraction layer.
The graphics ...
0
votes
0
answers
104
views
Do STA threads always need to pump messages?
Some components like DirectWrite or WIC don't do UI, and as the caller I can ensure that I never use them across apartments, thus no marshaling is required. Can I use them on a worker thread without ...
0
votes
0
answers
106
views
Suitable Pandas installation on 32-bit Python (3.10, 3.11)
I am trying to use the Kiwoom OpenAPI (for making automated stock trading program), which requires a 32-bit Python environment. However, to successfully use Kiwoom Open API I need to set up pandas in ...
0
votes
0
answers
88
views
How to pass null as ActiveX control parameter
ActiveX control was registered from dll file using regsvr32:
cd \windows\syswow64
regsvr32 "C:\mapp\mycontrol.dll"
FoxPro object is created from it using
ofiscalprinter=CREATEOBJECT('...
0
votes
1
answer
90
views
How to get the contents of a SAFEARRAY on one line in the watch-window
Since recently, I'm working in C++ with COM technology, which means using SAFEARRAY objects. One of the first challenges is seeing the contents of such an object: in the watch-window, such an object ...
1
vote
0
answers
81
views
How to replace a COM Interop with the ComWrapper Source Generator?
I am currently using a COM Interop DLL, generated with tlbimp, to access a proprietary COM library from C# (net8), so no source code available (TLB embedded in DLL). It works, but stops me from using ...
-1
votes
1
answer
63
views
COM CCertRequest via CSWin32
I'm currently using a COM component to initialize an instance of CCertRequest from CertCliLib.
I would like to move to CSWin32 with that, but it seems the CCertRequest does not implement any ...
1
vote
0
answers
112
views
Powershell Com Object Issues
I have a simple script to make file transfers between a local directory and an MTP device. For the MTP device, I created a ComObject and traversed to the desired directory. Then, I use the CopyHere ...
0
votes
1
answer
306
views
Can MMC 2.0 Automation Object Model run MMC32 in 64-bit Windows?
When launching MMC in 64-bit Windows, MMC64 will start, then if the -32 switch was passed in the command line, MMC64 will try and start MMC32 and, if succesful, MMC64 will terminate.
When creating an ...
1
vote
0
answers
99
views
How to consume COM events with C# dynamic without COM registration
I can use an out-of-process COM server that is not registered with C# dynamic, and this works fine, but I cannot get events to work.
My code basically is something like this:
Process.Start("path\\...
0
votes
1
answer
96
views
How can I get intellisense working in vsvode for python win32com objects?
I've recently started doing a bit of Python coding, using VS Code, to create macros / applications for CATIA (using it's COM interface). In CATIA itself, I can use the included VBA editor to write ...
0
votes
0
answers
86
views
CANoe Python COM Automation: Server Busy popup when calling exported CAPL function with GetFunction/Call
I'm migrating an automated test workflow from Vector VtestStudio to a Python-based tool. Previously, in VtestStudio, we could execute a separate .can CAPL script in the middle of a test without issues....
3
votes
0
answers
209
views
Is Windows Explorer's handling of delete on paste buggy?
The documentation on delete on paste states:
If the target does not do an optimized move, it calls the IDataObject::SetData method with the CFSTR_PERFORMEDDROPEFFECT format set to DROPEFFECT_MOVE. ...
3
votes
1
answer
177
views
C# Native AoT - How to get pointer to Managed class to pass as parameter to Com Object
I have implemented INetworkListManagerEvents interface to get network connectivity state changes as a C# class.
In my project, the INetworkListManagerEvents is code generated via CsWin32 source ...
0
votes
0
answers
80
views
Problem with COM login (IBSesja) in Comarch ERP Optima – error 8007000E
I'm building a Windows Service in C# (.NET Framework 4.8) that should automatically import sales receipts from XML files into Comarch ERP Optima.
The service is supposed to create a COM session using ...
2
votes
1
answer
150
views
Where does an exception with an empty call stack come from?
I'm debugging an older Winforms application running on .NET 4.8 which is using some COM components. Occasionally, it throws this exception and then crashes:
System.IO.FileNotFoundException: 'Could ...
0
votes
2
answers
218
views
C# COM DLL example - Problem building for .NET 5.0 target on 32bit Windows 10 / .NET Framework 4.8
Though I've got built example from msdn-docs on how to Expose .NET Core components to COM with C:\COMServerDemo>dotnet build build.proj after changing in *.proj files of Server & Client <...
2
votes
1
answer
70
views
Error link 2001 on CLSID from my another DLL
I have 2 DLLs. I want create instance of class in my second DLL that I declare at .idl file of first library. But I get Error Link 2001 on CLSID, when try to link second DLL. I'm linking with first ...
0
votes
1
answer
60
views
Excel COM: .PivotCache().SourceData throws 0x800A03EC despite valid range
I am trying to update Pivot Tables in Excel using PowerShell.
The PivotTable is based on a normal range, and I'm writing:
$newSource = "'Sheet1'!R1C1:R${lastRow}C7"
$pivotSheetNames = @(&...
1
vote
1
answer
78
views
Custom Explorer InfoTip using .NET 8 COM Hosting
I'm trying to wrap my head around on how to make a .NET 8 dll callable as a COM host in order to create a custom InfoTip on Explorer for a specific extension (.t1k).
I know that SharpShell is a very ...
1
vote
0
answers
111
views
How to use void pointer as parameter type in interface definition?
I am creating a COM server using native C++. And I need to use void pointer as a parameter type in the server interface.
[
dual,
oleautomation,
uuid(E62A1CB0-86A7-40AE-AFE4-75562C32A498)
]
...
0
votes
0
answers
65
views
C# Entity Framework COM Object accessed from Delphi Error [duplicate]
After installing Windows 11 Update 24H2, I have not been able to work with a COM Library developed with C# and accessed from Delphi. The failure occurs when I do a Where filter using a numeric ...
0
votes
1
answer
67
views
CreateObject on .NET-Framework-based COM object fails if (a) the COM object is registered in HKCU instead of HKLM and (b) UAC is off [sic]
Yes, you read the title correctly - this is an issue that only occurs when UAC is off (for example, with the built-in Administrator account on Windows Server systems).
Repro steps:
Create a COM-...
1
vote
1
answer
86
views
What makes Notepad (and others) open behind my program when invoked through an IExplorerCommand?
I've written a Windows Explorer clone, and while it's been an adventure, most of the stuff is now working fine.
But, I have this problem: when I right-click an item and the Windows 11-style Explorer ...
1
vote
1
answer
181
views
Implement IDispatch-only interface easily in C++
I defined the following IDispatch-only interface in my C# project:
[ComVisible(true)]
[InterfaceType(ComInterfaceType.InterfaceIsIDispatch)]
[Guid("3532C4E8-D320-487C-8BD4-...
0
votes
1
answer
74
views
How to get the Sid as a String of a Token group in C#?
I was using the following code for years and it worked fine. The Code was used as a Com-Component in vba from ms-Access. Now since we updated to Windows 11 and Office 365 IsValidSid is returning false ...
1
vote
1
answer
53
views
How can I obtain the error message texts for (NetworkDirect) HRESULT Status Codes that Visual Studio is showing?
I would like to convert Windows status constants to human-readable error messages, and I seem to be failing.
The following code is little helpful:
#include <Windows.h>
#include <comdef.h>
...
2
votes
1
answer
249
views
How to create and register an object via ComWrappers in native AOT
There is a test project that shows the contents of a notepad, in perspective the contents of other window elements:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
&...
0
votes
2
answers
184
views
How do I create a generic wrapper that can call other functions that have arbitrary and arbitrarily many inputs?
I have a series of functions and objects in C++ that will be called/invoked by Lua, I already have existing code that does exactly this (using the MFC COM dispatch) for VBScript (see the bottom of ...
-6
votes
1
answer
256
views
Windows Explorer thinks that my Namespace Extension is a Storage Provider?
I have a Namespace Extension (NSE) that presents distributed data as "files" with the root of my NSE under alongside OneDrive, etc. Most functionality works as expected.
While debugging ...
2
votes
1
answer
124
views
setting an excel column to autofit using c++ and com automation fails
I try to set an excel column to autofit width using com automation. I get an access violation when calling Invoke. I know that the range that points to the column is ok, because I can use it to change ...
0
votes
0
answers
99
views
VBA: Launch a child process and stream its stdout and stderr to the main thread via 2 child threads with IAgileReference
I'm writing twinBASIC, which is basically VB6 successor code. The purpose of my program is to connect to a language server over STD I/O (like deno.exe lsp).
I'm trying to achieve this in the following ...
2
votes
0
answers
84
views
How to implement in Java a callback to be called by a COM object?
I'm integrating in Java with a DLL that allows me to add an instance to be notified.
I have tried several solutions and in none of them was the COM object able to notify me. I suspect that the way I ...
0
votes
0
answers
51
views
I am using IFolderView SelectAndPositionItems in c# and it's throwing an application exception [duplicate]
Here is the C++ definition and the C# definition:
HRESULT SelectAndPositionItems(
[in] UINT cidl, //# of items
[in] PCUITEMID_CHILD_ARRAY apidl, //pointer to array of ID's
[in] ...
2
votes
0
answers
129
views
File Explorer leaks instances of shell namespace extension class when Explorer window is closed
If you navigate Explorer into a shell namespace extension, and then navigate away from the namespace extension into some other folder branch, then Explorer will release all instances of the namespace ...
2
votes
1
answer
153
views
Are there significant differences between using COM directly or using an interop in PowerShell?
I am automating the creation of Excel workbook with PowerShell scripts.
I can create an Excel instance with either
add-type -assembly Microsoft.Office.Interop.Excel
$xls = new-object Microsoft.Office....
0
votes
0
answers
95
views
Delphi 10.4 Initiated VBA code - not able to debug - fails with Out of memory
I have recently upgraded my application from Delphi 7 to Delphi 10.4. My application launches VBA 6.5, which kind of is hosted within Delphi (i.e. it vanishes along with the main application).
I am ...
1
vote
1
answer
76
views
Using WinRT Interface in Python
ref: ISystemMediaTransportControlsInterop
I compiled a dll about ISystemMediaTransportControlsInterop::GetForWindow.
I use IDA to decompile it.
Then I wrote the C-like code as Python.
I believe that I ...
1
vote
1
answer
150
views
Enumerate redirected PnP devices with the Remote Desktop ActiveX Control
I've tried a few different ways of enumerating redirected USB devices using the Remote Desktop ActiveX control in PowerShell but haven't been able to figure out a way to achieve this.
That is, USB ...
0
votes
1
answer
74
views
Writing proxy/stub dll for msix packaged COM Server
I have an out of proc COM server packaged as an MSIX. I also have the following idl file,
declare_guid(CLSID_ComServerProxyStub, BA5A4D3C-56D8-4F3D-885D-C30B2405BDA5);
[
object,
uuid(FA601A80-...
0
votes
0
answers
47
views
CoCreateInstance returns E_NOINTERFACE for simple msix packaged out of proc COM server
I am trying to develop a very basic HelloWorld example, where an unpackaged (exe based) client is trying to talk to a out of proc COM server which is packaged as an msix.
I am using windows template ...
0
votes
0
answers
84
views
Several Thumbnails on Taskbar for runtime created windows
I try to make Windows show several thumbnails for forms created at runtime in the group with the main form. So, when the mouse hovers over the icon of the main form, I want to see the thumbnail for ...
0
votes
0
answers
46
views
COMException: 0x80040200 dotnet core COM
I have a c# COM wrapper class
[Guid('XXX')]
public Class A : CoClassWithEvents {
public event OnDoMeDelegate OnDoMe;
public void CallMe(){
}
}
idl file
coclass CoClassWithEvents
{
...
1
vote
1
answer
62
views
Is there any way to control the values within a signal controller program from a VISSIM COM interface?
For instance, I would like to be able to iterate through all the programs in a signal controller and have the green time start 3 seconds later. I cannot figure out how to change any attributes of a ...
0
votes
0
answers
45
views
How can I match python function to COM DLLs b/c when the function passes 'self', the number of arguments don't match?
I am writing a python program and need to interact with existing com dll objects written in C++. I can access the Dispatch interface of the dll using the comtypes module and get the correct function ...
1
vote
0
answers
56
views
How to call IKnownFolderManager::Redirect in PowerShell?
I want to write a Powershell script to modify my Shell Folder
I tried the following code:
$CLSID_KnownFolderManager = "4df0c730-df9d-4ae3-9153-aa6b82e9795a"
$KnownFolderManagerType = [Type]::...
2
votes
1
answer
86
views
How to glue COM server to methods in C++
I have a lot of experience in C++ but am new to COM, MFC and MIDL. I'm trying to create a 32 bit COM server from an IDL file supplied by a third party. The IDL section looks like this:
[uuid(3CA6AC95-...
0
votes
1
answer
156
views
How to compile an ATL proxy/stub DLL for ARM64
I'm attempting to compile an ATL proxy/stub DLL for ARM64, but it isn't working.
I don't have any specific code to provide, since I'm really just trying to compile the basic template-produced project ...