com

.NET equivalent of Delphi IStream initialization

I have the following Delphi code: var Stream: TMemoryStream; StreamI: TStreamAdapter; OleStream: IStream; begin Stream:= TMemoryStream.Create; Stream.LoadFromFile(filename); StreamI:= TStreamAdapter.Create(Stream, soOwned); VSPDFViewer1.LoadStream(StreamI as IStream, ''); end; Which actually passes an IStream object to a COM c...

How I determine if an xref is clipped and also how do I get it's clipping boundaries

In the AutoCAD .NET API you can access xrefs through BlockReference entities in the BlockTableRecord. You know that they are an xref if their parent block table record has the IsFromExternalReference or IsFromOverlayReference property set to true. How do you determine if the xref is clipped? How do you determine what that clipping bou...

Where can I find documentation on the C# MSTSCLib, specifically the MsRdpClient classes?

I would like to figure out how to create a C# Remote Desktop client and the documentation on the internet varies from sparse to non-existent. Or if you have this information, please let me know. I will compile as much info as possible and post it up somewhere I'd like to learn the following information: How do I connect programaticall...

Find fully qualified .NET assembly name programmatically (from simple name, for given .NET version)?

My goal is to display a .NET Windows forms message box from a pure C++ native Windows API-level program (not managed C++ or C++/CLI). That is, for learning purposes I want to implementing the C# code shown in the comment below, in pure C++: /* // C# code that this C++ program should implement: using System.Windows.Forms; n...

Browser plugins | technologies for COM port communication

Hi, I am looking to develop a specialized browser plugin that will interface with the local COM port (mainly read input). I assume this can be easily achieved with ActiveX technology, but want to make sure Firefox/Safari/Chrome browsers (let alone, Linux & Mac OS) don't get left behind. Which technologies are available that can serve ...

Default IMarshal implementation?

I am trying to implement registry-free COM explicilty in my code (can't use registry-free COM via an app manifest since that only works on the exe level): I create a static class that loads the COM dll, calls DllGetClassObject, then IClassFactory::CreateInstance(). Works just fine to a point. Implementation details are at http://www.dim...

Late binding of COM->NET call with enum value argument(s)

First, note that this is just a learning exercise for me. The intent is to produce a .NET messagebox using nothing but pure C++ (not C++/CLI) and late binding as necessary. This works fine with just a title and text in the messagebox. However, when I try to specify buttons I get back 2147942487 "The parameter is incorrect". On the .NET...

How to call functions of a COM DLL (In VC++) from a VC++ .EXE application?

I have a COM DLL (say, xyz.dll) coded in VC++. I want to create a calling EXE application (calling.exe) which will call the functions of the COM DLL (xyz.dll). I followed the steps in the link http://www.codeproject.com/kb/DLL/XDllPt1.aspx. But I am not able to connect the DLL and EXE and hence not able to call the functions of the COM...

COM Threading Model - Perpetual Confusion

Hi, I have been reading MSDN articles about COM Threading Model. In one of those (http://msdn.microsoft.com/en-us/library/ms687205%28VS.85%29.aspx), I came across following line: "Like other servers, in-process servers can be single-threaded, apartment-threaded, or free-threaded.". I am confused about what (COM Client thread and COM S...

any possibility to call C# function with javascript ?

I wrote an office addin and with which there is a function : openFile(String path) and in the office addin I embed a browser object and with that I can embed a webpage on the office addin, and now I hope I can call the C# function "openFile" and pass in a path in the webpage with javascript, and let office open the designated file for me...

Getting print cancelled notification in IE using IOlecommandTarget::QueryStatus.

Hi everyone.. Is it possible to be notified if a user selects cancel button from the printing prompt in IE ? Basically I want a print-cancelled kind of notification. I read somewhere that IOlecommandtarget interface can be used to be notified for our own controls, but can the same be used for system controls like print ? Can anyone help...

Overlapped WSARecv() Callback Not Being Called in MFC App

I have a COM component, implemented in C++ with ATL, that uses overlapped socket I/O. Right after the connection is made to the server, it starts an overlapped read on the socket, with code like this: // Pass pointer to this instance as hEvent parameter, for use by callback m_recvOverlapped.hEvent = reinterpret_cast<HANDLE>(this); int...

PHP/Apache crash when PHP call COM objects

I am working on calling COM object method from my PHP application, but often Apache/PHP CLI crashes when I launch the script. This one for example $domainObject = new COM("Excel.application"); foreach ($domainObject as $obj) { echo $obj->Name . "<br />"; } or this one $o=new COM("NeoScope2InterOpCOM.NeoScope2InterOp"); $o-...

What is the Equivalent of "object of C# " in VC++?

In C# we have a datatype object which can hold any type of data. Same thing I want to achieve in VC++. Can anyone kindly let me know VC++ equivalent of "Object of C#". IN C#, in the calling appl program (say call.cs) object ob=null; ob=(object)str; funct(ref ob); Here str is empty string. This thing I want to achieve in VC++. ...

.net assembly interop exceptions handling

I am calling a .Net assembly from a Delphi project using COM interop. Can I catch .Net exceptions in Delphi thrown by the assembly? ...

Error 80040154 (Class not registered exception) when initializing VCProjectEngineObject (Microsoft.VisualStudio.VCProjectEngine.dll)

Hello, I'm trying to run this tool in order to convert a Visual C++ project to makefile. The project I'm trying to convert project is written in VS2008, so I'm using a reference to Microsoft.VisualStudio.VCProjectEngine.dll from version 9. It fails in this line: VCProjectEngine vcprojEngine = new VCProjectEngineObject(); With the fo...

Not able to CALL the functions of COM DLL from a VC++ application?

Hi i have explained the scenario in one of my earlier questions in the link, http://stackoverflow.com/questions/4008156/how-to-call-functions-of-a-com-dll-in-vc-from-a-vc-exe-application/ and also the answer helped me to a great extent. . My calling application is building perfectly. But I am encountering problem, when I am debugging th...

Getting IP Address using UPnP InvokeAction not returning anything, help?

Basically, when i use vb.net or c#.net to do this, it works perfectly, but when i use vb6, it doesn't work, in my for loop where the relevant service in the relevant device is captured, here is the code that returns no result... ' serv is properly declared and instantiated by the for loop. Dim xins(0) Dim xouts(0) ...

Does Reg-Free COM work with Interop?

What is the consensus here? I have a VB6 app using Interop to utilise .NET assemblies. Could I use Reg-Free COM to 'register' the .NET assemblies? ...

Get PID of COM server

I create a com object in powershell like so: $application = new-object -ComObject "word.application" Is there a way to get the PID (or some other unique identifier) of the launched MS Word instance? I want to check if the program is blocked e.g. by modal dialogs asking for passwords, and I can't do it from whithin PowerShell. Thx! ...