Questions tagged [com-interface]

33 questions
1
vote
0 answers

Unable to call methods of public COM interface in legacy code

I have a C# DLL that has "Register for COM interop" set to true. Everything worked fine until I added a new interface in this DLL and changed name of one of the methods in an existing interface. Now after doing this, I recompile and try to use these…
WAQ
  • 2,556
  • 6
  • 45
  • 86
1
vote
2 answers

How to pass IUnknown argument to a COM interface using C#?

I have a COM interface defined like this interface Client : IUnknown { [id(1)] HRESULT GetSomething ( enum SomeID someID, [out] IUnknown **pUnknown ); }; How can I pass IUnknown object using C#?
1
vote
1 answer

Python: How to (not) keep a COM-object persistent in memory after closing the parent application?

i am working on a (pretty big) Python/Tkinter-application (Python 2.7 under Windows 7) which (among many other things) calls Matlab via the COM-interface. The basic structure of the Matlab/COM-part is like this: import Tkinter import…
1
vote
0 answers

Root folder in task scheduler is wrong in Windows 7

My custom task scheduler is working fine in Windows XP, but it throws an Access Denied error in Windows 7. The reason is that Windows 7 is not storing the tasks under C:\Windows\Tasks. It stores it under C:\Windows\System32\Tasks. But my task…
Ruby David
  • 11
  • 1
1
vote
0 answers

What is the meaning of 'Let' in a com interface?

This might be a really stupid question - I am new to com-interface. I couldn't find any information by googling ("let" is too common a word). I am trying to automate PDF creation by calling the PDFCreator COM interface via the Jacob-library. I am…
Reto Höhener
  • 5,419
  • 4
  • 39
  • 79
1
vote
1 answer

p/invoke operation ends up with executing another function

Not sure why this is happening, but when i execute one of my c# function, which could be defined by the following c# interface: [ComImport, Guid("EA5435EA-AA5C-455d-BF97-5F19DC9C29AD"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] public…
igal k
  • 1,883
  • 2
  • 28
  • 57
0
votes
1 answer

Convert bytes from "OpenSavePidlMRU" into "ITEMIDLIST"

I want to extract a path from the following registry key: HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\ComDlg32\OpenSavePidlMRU I didn't find any documentation, but it seems that the value contains some IDLIST that can be…
Jerome
  • 15
  • 4
0
votes
2 answers

Binding a Pidl with function BindToObject?

Here is my Rust code: use std::mem::ManuallyDrop; use windows::core::ComInterface; use windows::Win32::System::Com::*; use windows::Win32::UI::Shell::Common::ITEMIDLIST; use windows::{core::Result, Win32::UI::Shell::*}; struct Com; impl Drop for…
Jerome
  • 15
  • 4
0
votes
0 answers

Releasing a collection of COM interfaces by calling IUnknown::Release()

In my application I need to defer releasing of COM interfaces until a later point. Therefor, I'm storing the interface pointers in std::vector COMInterfaces and later I loop through all the pointers and call Release() like…
rashmatash
  • 1,699
  • 13
  • 23
0
votes
2 answers

How do I set up a COM Server interface with Excel?

Versions Excel 2003Windows XP SimaPro 7.3.0 Developer Version Using a Work computer but was made administrator on this machine Libraries referenced in Excel/VBA: Visual Basic for Applications; Microsoft Excel 11.0 Object Library; OLE Automation;…
SimaPro
  • 1,164
  • 4
  • 14
  • 28
0
votes
1 answer

Opening corrupted Excel file with Python via COM interface

I'm trying to open an excel file using COM interface in Python. Normally it's easy but this time I have problem with opening the file that is corrupted. Error I get looks like this (partially in Polish): com_error: (-2147352567, 'Wyst\xb9pi\xb3…
drafa
  • 81
  • 1
  • 7
0
votes
1 answer

How to retrieve entry/exit/do property from state operations

I want to use the Automation Interface of Enterprise Architect (EA) to generate code from my StateMachine diagram according to my company's StateMachine framework. With each state I want to know exactly it's operation is Entry or Exit action. Please…
van con Nguyen
  • 101
  • 1
  • 5
0
votes
1 answer

How to declare Classic COM Interface IBindCtx in C#?

I am currently poking around C# and COM interfaces. COM Documentation in C# is sparse because C# came after COM (perhaps we at SO can fix). I discovered the C# compiler can give informative error messages. One can read the C# syntax version of…
S Meaden
  • 8,050
  • 3
  • 34
  • 65
0
votes
0 answers

C# to COM define interface

I have a function in a COM dll that returns a string and takes a string. I tried this interface, while it compiles, when called it doesn't work. Not sure how to define it? [return: MarshalAs(UnmanagedType.HString, SafeArraySubType =…
Ivan
  • 7,448
  • 14
  • 69
  • 134
0
votes
2 answers

How can I define this struct in my COM library?

I created a new ATL project in Visual Studio 2015. I added a new simple ATL object, inside of the library I am trying to define a struct so that I may pass this struct around in my COM implementation. Here is my CerberusNative.idl definition, with…
Alexandru
  • 12,264
  • 17
  • 113
  • 208