12,399 questions
-1
votes
0
answers
116
views
How to debug the C# COM class? [closed]
I have a simple C++ project which uses the CoCreateInstance to access and use some C# code (com-exposed class). The simple code looks like:
// ...
hr = CoCreateInstance(
CLSID_rclsid,
NULL, ...
0
votes
0
answers
74
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('...
1
vote
0
answers
57
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
51
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 ...
0
votes
1
answer
296
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 ...
0
votes
1
answer
86
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 ...
3
votes
0
answers
207
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. ...
0
votes
0
answers
75
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 ...
0
votes
2
answers
208
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 <...
0
votes
1
answer
53
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
0
answers
104
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
1
answer
65
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
170
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-...
1
vote
1
answer
46
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>
...
0
votes
2
answers
173
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 ...
2
votes
1
answer
119
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 ...
2
votes
0
answers
80
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
127
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 ...
0
votes
0
answers
91
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
139
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
0
answers
46
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
42
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
{
...
0
votes
0
answers
41
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 ...
2
votes
1
answer
84
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-...
-1
votes
3
answers
345
views
Why does my `NLog` logging command not log anything (despite NLog.config)?
I'm using NLog library for logging purposes.
I have declared the following class:
public partial class FenetrePrincipale : Form
{
#region NLog
private static readonly Logger logger = ...