com

Installing a COM object without privileged access for use in Microsoft Office

Start with a series of MS Office extensions built in C++ as COM objects. Add a user who really badly wants to avoid the requirement of an installer with the necessary privileges to write to HKEY_CLASSES_ROOT. I've seem bits of evidence that MS has created some sort of trick for shadowing HKEY_CLASSES_ROOT from HKCU. Is this, in fact, p...

Calling a running C# application from VBA

I have some VBA code that needs to talk to a running c# application. For what it's worth, the c# application runs as a service, and exposes an interface via .net remoting. I posted a question regarding a specific problem I'm having already (http://stackoverflow.com/questions/2556163/from-vb6-to-net-via-com-and-remoting-what-a-mess) but ...

How do I use a .NET class in VBA? Syntax help!

ok I have couple of .NET classes that I want to use in VBA. So I must register them through COM and all that. I think I have the COM registration figured out (finally) but now I need help with the syntax of how to create the objects. Here is some pseudo code showing what I am trying to do. EDIT: Changed Attached Objects to return an Arr...

Converting C++ string/wchar_t* to C# string ?

Question: I need to call a C# dll from a C++ executable. I use COM, and it works fine for int, long and bool. But I can't get a string along... The IDL file says it's a BSTR, but I can't pass it correctly, and neither retrieve one. I tried using wchar_t* and using sysalloc as I did with VB6, but that doesn't seem to work. Anybody knows...

Is it possible to access a COM Object from Linux

Office is running in Wine, meaning I have a running Version (2003). But when I try to create a new COM object I just get the following error: Fatal error: Class 'COM' not found <?php $com = new COM('Word.Application'); $com->close(); Is there a way to get this working without installing Windows? ...

When does the .NET runtime hold a reference count > 1 for COM objects?

Until recently, I believed that the .NET runtime only increases the reference count of COM objects by 1 when creating a runtime-callable wrapper, and that only one such runtime-callable wrapper is created for any given COM object. If I'm not mistaken, the above implies that Marshal.FinalReleaseComObject and Marshal.ReleaseComObject do t...

How to write an altered COM Structured Storage file to Disk?

I have a COM Structured Storage File reader implemented that can open Storage and stream objects, that's all happy. But now I want to be able to copy things from one archive to another and rename things and then write things back to the disk. I haven't even adressed the copy and rename operations because I can't seem to even write chan...

Making .NET assembly COM-visible and working for VB5

I have an assembly which I have managed to make visible to VB6 and it works, but having a problem accomplishing the same thing with VB5. For VB6, I have built the assembly, made it COM-visible, registered it as a COM object etc., and the assembly shows in VB6's References list, and allows me to use it successfully. The Object Browser...

Hooking the http/https protocol in IE causes GET requests to be sequential

I'm using the PassthruAPP method to hook into HTTP/HTTPS requests made by IE. It's working well for the most part, however I noticed a problem. Only one download thread is active at a time, normally IE uses two download threads. I can see two IInternetProtocol objects getting created, but IE uses only one at a time. This is happening...

How to set Content-Type of a Webbrowser Control?

Is it possible to set the Content-Type of a document in a webbrowser control? For example how can I show an XML document rendered as XML in a webbrowser control by using DocumentText? ...

Regarding to get refrence of IDot11AdHocManager Interface of COM WiFi AdHoc manager Interface

I am Trying to create AdHoc connection and for this i am using AdHoc wifi Interface provided by Microsoft. I have written code :- IDot11AdHocManager *pIAdHocMng = NULL ; HRESULT hr = CoInitialize(NULL); hr = CoCreateInstance(CLSID_Dot11AdHocManager,NULL,CLSCTX_INPROC_HANDLER ,IID_IDot11AdHocManager ,(void**)pIAdHocMng); if(hr == ...

how to create a system-wide independent universal counter object primarily for Database keys?

I would like to create/use a system-wide independent universal 'counter object' that can be called via COM in a thread-safe manner. The counter object will be passed an ID to identify which counter to return, handle the counting, 'persist' the count (occasionally), have reasonable performance (as fast as possible) perhaps capable of 10...

COM Interop - Wait for Excel to Complete Operation

Hello, I am doing some COM Interop work with Excel and other Office Automation Software. A Co-Worker has mentioned to me that I need to wait for these Automation Servers to become ready after issuing a command to them. I, however, cannot see the purpose of this as don't all calls block until the automation server completes the given ...

COM AddIn for Outlook Tries to Install Self on Startup

Hi, I have an outlook addin that I have been developing for some time now, and am experiencing a problem. If I have a computer with two 'administrator' users (call them User A and User B), the addin installs and runs just fine as long as the same user tries to run it. In other words, if User A installs the addin, then User A has no pro...

Disable popup message in php

When i upload a excel file, i have used COM() to open and automate converting it to xml. It works fine, But when i run it, it always shows the message from Microsoft Excel: A file named ''' already exists in this location. Do you want to replace it? I can choose between Yes No and Cancel. normally i would choose Yes. But i dont want us...

Java jump to section in MS Word document

I'm trying to open and jump to a particular section in a Word document from Java. I don't need Java to read the document, but really just open MS word. I know I could launch it using a Runtime exec but I couldn't jump to a specific section that way (I don't think - unless there is a command line arg for that for in Word but I didn't see ...

question on Implementing IQueryCancelAutoPlay in a windows service

Hi, I am implementing IQueryCancelAutoPlay COM interface and registering it with the Running Objects Table from a Windows Service*. My problem is that it never gets called when I insert a mass storage device (or any device really). Here's some more information: My code for registering with the ROT: Text::string clsIdString = Text::to...

Does .net calling COM which in turn calls other .net COM object works when using SxS and manifest files are used

I have a .net application calling to a COM component (C++) which in turn calls to another COM object implemented in .NET. This application is using Windows SxS capabilities and does not register any of it's COM components. Not the one written in C++, and not the one written in .net. This first call to the C++ COM component works fine. ...

Marshal generic return types for com interop

Is it possible to Marshal a generic return type as non-generic for COM interop? Let's say I have the following class: [ComVisible(true)] public class Foo { public IEnumerable<string> GetStr() // Generic return type { yield break; } } I know that IEnumerable<string> implements IEnumerable. Can I force tlbexp.exe (...

What simple methods are there to wrap a c++ based object model with a COM interface

I have a pre-existing c++ object model which represents the business layer tier of an application. I want to be able to expose the object model to applications written in other languages i.e vbscript, VB, javascript etc. I believe the best way of doing this is to wrap the business objects with a COM layer. What fast and effective method...