com

VB: get compiled DLL's calling application info; COM security

Through COM, one can potentially gain absolute control over a target system. For example: using javascript's ActiveXObject object in IE, one can create certain objects which were designed to have direct access or interaction with system properties and files. One would think common sense dictates users disable ActiveX features in IE imm...

Is there a good ActiveX/Com component to send e-mails with attachments?

For an application written in Centura, I need the abbility to send e-mails with attachments. At the moment this is done by calling Outlook, but this doesn't work anymore in Windows 7. My first idea is to write something in .Net and let Centura call it, but in that case I have to write a mail-component myself. The second idea is to buy/...

[C++]Does my COM server require synchronization?

Hi everyone, I have developed my first COM component (yes, a newbie in the realm of COM development), initialization is done with COINIT_MULTITHREADED. Also, this COM component is a local server executable. But, I did not add any synchronization code to this component. What do you think: do I have to add CRITICAL_SECTIONs to code or MS C...

Is there a tool for exploring/testing COM objects?

I'm trying to automate a process by using a COM object from Python (win32com), but I'm not getting the expected results... Is there a tool to explore/test COM objects without having to write a specific program? I mean, is there something that allows e.g. to instantiate a COM object and call its methods? (Basically I'm trying to find o...

Does WaitForMultipleObjects cause problems in a thread creating STA COM objects?

I have a thread which creates COM objects that use the STA model. This thread's Run function puts it in an infinite WaitForMultipleObjects. Is it possible that the infinite WaitForMultipleObjects could prevent other threads from marshaling calls to the COM objects owned by this thread? Basically, I'm asking if WaitForMultipleObjects ...

How to get pointer to IUnknown in C#

.NET interop wraps COM objects into .NET objects (runtime-callable wrappers, RCWs), which hide the usual interface querying. In order to register a COM object representing a filter graph with the Running Objects Table, I need the (native) address of its IUnknown interface (see How can I reverse engineer a DirectShow graph?). So the ques...

Cant load interop.PRNADMINLib in c# on Windows 7 64 bit

Hi have a project that uses the functions in prnadmin.dll, in order to the use them I reference the interop.PRNADMINLib.dll It all works fine on 32 bit but I get the following error on 64 bit: Could not load file or assembley 'Interop.PRNADMINLib, version=1......... I have registered the prnadmin.dll on the 64 bit system using regs...

Unable to cast COM Object - Exception

Hi everyone, Ive been trying to develop a COM Client application, but without success. My goal is to create an application that can open reports in Cognos Impromptu. Ive got Cognos Impromptu installed on this machine and im using Visual Studio 2008 to develop the client. I created my project as a consoleapplication in Visual Studio. Ne...

How to communicate to a client side application with silverlight.

I'm currently developing a silverlight application with prism. From this application I need to be able to send a command or keystrokes to a client-side application. What is the best way to accomplish this? Things I'm considering: Javascript can use an ActiveX object to use DDE. (Limits to IE only) Javascript can interact with a java a...

MsgWaitForMultipleObjects sometimes returns WAIT_FAILED with no GetLastError value

I have a thread that creates COM objects that require a single threaded apartment. Originally, this thread's main function put it into a WaitForMultipleObjects loop. Evidently this is a problem, because it prevents the COM message pump from doing it's job. I replaced this with MsgWaitForMultipleObjects as a solution, but now I'm runnin...

does visual studio 2008 professional have a built in graphing library?

i am moving a vb6 application into c# the vb6 app was using csXgraph graphing library. i have no clue how to access COM objects using c# and dont know if it is even the best idea to do it this way. so i would like to know whether visual studio already has some kind of built in graphing library that i can use with a sql server database h...

Using 32bit COM addin under MS Office 64 bit

Hi, I am struggling to apply an existing 32bit COM addin to 64bit Microsoft Word 2010. To make the addin visible to Word, I have used the dllsurrogate-method, as it described here. The problem is that now addin caused some strange exception when tries to add its toolbar and menu to office's. I cannot figure out, what it is, it seems, ...

WMI Exception: "COM object that has been separated from its underlying RCW cannot be used"

I'm subscribing to a WMI event and receiving a "COM object that has been separated from its underlying RCW cannot be used" error when my application closes. This question has been asked before, but it is quite different from my circumstances. I am calling this code from my main thread: string strComputer = @"."; ManagementScope scope =...

Excel invokes .NET automation server from two different AppDomains?

I have an Excel plug-in (written in C#) with a static variable that is at the heart of a singleton data cache: static DataCache _instance; This is accessed via three different code paths: Event handlers on a VSTO ribbon-bar initialize the instance, and also read it for display in helper dialogs An RTD server (a class that is declare...

memory leak when using COM IDispatch::GetTypeInfo() in C#

I have the following function in a COM dll (C#, .NET framework v2): public void Leak(object jsObject) { Type comType; IDispatch disp = (IDispatch)jsObject; disp.GetTypeInfo(0, 0, out comType); // this line causes the leak Marshal.FinalReleaseComObject(disp); Marshal.FinalReleaseComObject(jsObject); disp = null; ...

What is XPCOM? XPCOM vs COM?

Hi all, I have trouble understanding XPCOM. How is it different from COM? What makes it cross platform? Is it a framework with a set of libraries that you can use to do some jobs? Also, does Component Object Model means every functionality is implemented in component so we can use it without knowing the detail implementation? Can y...

Make a IPC call to COM object?

I have a plugin based application developing with ESRI ArcGIS Engine in C#.I have to rewrite it to a out of process plugin architecture because of 2/3G virtual memory limitation of 32-bit operating system(WindowsXP). In old source code almost every plugin call MapControl object(a COM object in ESRI ArcGIS Engine software) directly. There...

.NET COMException Interface non registered

I can't understand this. I want to use an OCX from this vendor http://www.mobyt.it/ to send SMSs. It is a dll and they provide usage examples in Vb, .NET, Visual C, etc. The exception I get is: System.Runtime.InteropServices.COMException (0x80040154): Interface not registered. (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))...

cannot launch Visio 2010 application from Sharepoint 2010 featureactivated code

Dear members ! Require Your Assistance whith following issue : I am developing Sharepoint feature which should launch Visio 2010 application. Sharepoint is 2010 , OS is Windows 2008 R2 this line of code app = new Application(); raise error System.UnauthorizedAccessException {"Retrieving the COM class factory for component with CLSID {0...

wscript.exe silently dies with no messages in event log for com object that uses rfc

I have com object written in c# that relies on c++ library that has rfc calls inside. Com object exposes single method (let it be DoSomeRfcStuff) that returns string. It's implementation is wrapped by try/catch block: string DoSomeRfcStuff() { try { .. Do Some Rfc calls ... } catch(Exception ex) { return ex.ToString(); }...