com

COM pointer to struct

Hello, I'm using Visual Studio 2008/.NET 3.5. I used VS to make a COM component interoperable in .NET. I added a reference from the application to the COM DLL. The COM DLL is a 3rd party object - part of an SDK. For all methods and events everything is working just fine - COM objects/events are represented as a first class .NET objects...

Tool for creating .NET wrappers for a COM DLL?

Is there any open source tool for automatically generating .NET wrappers for a COM DLL library? Thank you. ...

Find out if item exists in Microsoft.Office.Interop.Word.Styles collection

Hi I'm trying to access an item on the Styles collection of a word document, I was wondering if there's a way to know if an item with a given key exists without it throwing an exception. Right now I'm doing something like: newStyle = _document.Styles.get_Item(ref styleName); This works when the item exists, if it doesn't it will fai...

Temporarily save Word document changes

Hi I'm using Interop to create a "custom word editor", basically I've incorporated MS Word on my application and I allow users to edit a document and insert custom fields from a predefined list. I provide a "Preview" option to see how the document will appear when the data is added. The users can start editing a template on my applica...

event sink for web browser in C++.

gud day!. i am to develop a system that would simply list all URL accessed in a browser with its response time. my probtion is alem is this applica standalone program(not a plug-in to a certain browser) written in c++. every time a user browse, the program then performs certain method. so it is like, my program would listen to the bro...

How to get IUnknown from WDM driver CreateInstance

In documentation (C++ example) LUnknown* pIUnknown = CreateInstance(slot); I try this >> import ctypes >> print type(ctypes.cdll.lcomp.CreateInstance(0)) <type 'int'> How to get IUNKNOWN and QueryInterface? ...

Use .NET in VB6 or classical ASP

Duplicate of Calling .NET methods from VB6 via COM visible DLL Which ways exist to use/call .NET classes/functions/libraries (.net 3.x) in VB6 or classical ASP ? Has anybody experiences with that ? How much effort is necessary to wrap .NET to COM ? Are there tools which help ? ...

Extracting InDesign CS4 Graphics using C# and COM

I'm trying to get details of the graphics in an InDesign file. For technical reasons I'm using COM. Not my favourite, as (discussed elsewhere in StackOverflow) you have to spend half your life casting. In Theory (!), the code snippet belwo should work. Intellisense shows doc.AllGraphics as returning objects. The CS3 scripting ref...

COM - How to create a method that returns a pointer to an interface?

How to create a method in COM that returns a pointer to an interface, this needs to be done inside the IDL file. EDIT: How do I implement this within a class: STDMETHODIMP CBlah::get_Something(IOtherBlah** retval){ return m_protectedvar->QueryInterface(retval); } STDMETHODIMP CBlah::put_Somthing(IOtherBlah* rhs){ m_protectedvar = rhs;...

How can I determine why a call to IXMLDOMDocument::load() fails?

I am trying to debug what appears to be an XML parsing issue in my code. I have isolated it down to the following code snippet: HRESULT CXmlDocument::Load(IStream* Stream) { CComVariant xmlSource(static_cast<IUnknown*>(Stream)); VARIANT_BOOL isSuccessful; * HRESULT hr = m_pXmlDoc->load(xmlSource, &isSuccessful); return (h...

How to call DLL function in vbscript

I am writing VB script in which I have to call a function of a COM DLL. The fuction which I want to use is in structure and thus I want to create the object of that structure to access the required function. e.g. I have a dll 'BasicCom.dll', in which struct abc { bool xyz(); } Now I want to call xyz(). Is any one have any idea, h...

QT Com programming

Greetings: I am new to QT, I want to use WMI classes in QT to get access to it, I actually want to create a system restore point using QT. here is the code which I want to use using QT i.e. Set SRP = GetObject( "winmgmts:\.\root\default:Systemrestore" ) CSRP = SRP.CreateRestorePoint( "Hacked the registry", 0, 100 ) Thanks in advance. ...

Are there open source Common Lisp COM wrappers?

I have an application that is written in SBCL and is deployed as an executable on Windows. The need has arisen for it to interact with Excel via COM and another application via DDE (I know, I know). DDE is simple enough for me to have quickly wrapped what I needed in a very small, simple to maintain C library. COM, on the other hand, se...

Setting an Excel Range with an Array using Python and comtypes?

Using comtypes to drive Python, it seems some magic is happening behind the scenes that is not converting tuples and lists to VARIANT types: # RANGE(“C14:D21”) has values # Setting the Value on the Range with a Variant should work, but # list or tuple is not getting converted properly it seems >>>from comtypes.client import CreateObjec...

Custom COM Implementation?

I'm looking to implement a custom implementation of COM in C++ on a UNIX type platform to allow me to dynamically load and link object oriented code. I'm thinking this would be based on a similar set of functionality that POSIX provides to load and call dll's ie dlopen, dlsym and dlclose. I understand that the general idea of COM is ...

Why won't my Setup Project Perform my Custom Registration Process

I am trying to write an Setup Project/Installer for a class library driver that I wrote in C# using Visual Studio 2008. The driver project has a section of code that looks like this... [ComRegisterFunction] public static void RegisterASCOM(Type t) { Trace.WriteLine("Registration Started."); DoRegistration(tru...

Could 16bit .com executables call win32 APIs?

Any minimal example of 16bit .com display a window GUI using Win32 API on Windows? ...

Access MS-Word spell-checker from (unmanaged) C++

I found a few articles on interacting with the MS-Word spell-checker from C# and managed C++ using .NET. (For anyone interested: this and this) But I couldn't find anything comparable on doing it through standard unmanaged C++ in an MFC app, using COM. I assume the .NET examples are actually using COM meaning it's possible, but is it l...

CoInitialize() / CoUninitialize() calls pairing

I have a single-threaded application that uses COM objects. At the beginning I in effect call CoInitialize(0) twice - once in my code and the second time in the code of another subsystem of the application. The first call returns S_OK, the second returns S_FALSE - exactly as MSDN says. When the application stops it calls CoUninitialize(...

R6034 When Calling SMO ExecuteNonQuery Under Machine.Specifications.ConsoleRunner

I'm using Sql Server Management Objects (SMO) in my integration tests. When I run them from Visual Studio (using TestDriven.NET or Resharper) there's no problem. But when I run from Machine.Specifications.ConsoleRunner.exe the code stops and I get this Windows dialog: R6034 - The application has made an attempt to load the C run...