12,389 questions
2
votes
1
answer
103
views
IWebBrowser2::Quit Do not work on some explorer tabs
I am trying to close the explorer tabs using a folder. To do that from C# I have this beautiful code:
[ComImport, Guid("9BA05972-F6A8-11CF-A442-00A0C90A8F39"), InterfaceType(ComInterfaceType....
Advice
0
votes
4
replies
74
views
Integrating Windows Explorer as a control in Windows 11
Is it possible to integrate Windows Explorer component as a control, created on my window? For instance, as an ActiveX control. It should work in modern Windows 11 (24H2, 25H2).
Back in Windows 9x ...
-2
votes
1
answer
133
views
How to check which files has IFileOperation successfully deleted?
I am using IFileOperation::DeleteItems to delete multiple files—including one that I don't have delete permission to.
Using the standard IFileOperationProgressSink::PostDeleteItem to get a ...
0
votes
0
answers
63
views
IStream audio output data routed from ISpVoice is glitchy [duplicate]
I've managed to stream raw PCM audio data from Microsoft's text to speech engine. The main implementation is here (included below): https://gitlab.com/bgc-nz/windows-com-programming-showcase/-/blob/...
1
vote
0
answers
87
views
COM issues while remote debugging
I have configured my computer for remote debugging: I have the Visual Studio solution and projects on my development computer and the testing is about to happen on a remote testmachine.
On the ...
1
vote
0
answers
147
views
How to register an C# class for COM?
I'd like to create an C# WPF library exposing some class to COM to use the class functionality from separate C++ project.
What I'd like to achieve is to have a WPF class which implements simple form ...
Advice
0
votes
3
replies
73
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
70
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
165
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
129
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
222
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
104
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
108
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
112
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
94
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
128
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
319
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
105
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
145
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
134
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
219
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
219
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
120
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
163
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
254
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
71
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
72
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
85
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
122
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
66
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
78
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
93
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
211
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
84
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
57
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
346
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
200
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
272
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
134
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
105
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
86
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 ...
2
votes
0
answers
137
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
200
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
102
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
98
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
176
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
102
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
93
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
88
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 ...
1
vote
1
answer
75
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 ...