com

Display an Adorner over a WebBrowser control

I'm using the System.Windows.Controls.WebBrowser for various things in my app and I've noticed that adorners are cut off when they are supposed to appear over a WebBrowser. I realize that the WebBrowser control is really a wrapper around a COM component and probably renders differently, but I wondered if anyone figured out how to solve ...

How to pass generated image/bitmap/GDI objects to other process?

I have a process A that generates HBITMAP GDI objects to be painted on the screen. I have another process B which wants to display the content of images that process A creates. I plan to do the communications/talking using Point-to-Point message queue or by using other message passing; and use shared memory (along with mutex and or even...

What is the difference between AxInterop and Interop?

I've added an .ocx to the toolbox in VS. Two .dll's were created: Interop.NNN.dll, AxInterop.NNN.dll. What is each one? Are they both required? ...

Help with PHP and COM

What is the best way to communicate with another process in PHP? Update: Using Windows, PHP 5, calling COM assemblies, COM may or may not be needed, I don't really care. Update: I am trying to send a command from PHP to Ascom (a control program). I mainly need to execute methods and pass small parameters. I also need to be able to get ...

Can I use / access the app.config from .net code, when called via COM

I have an existing set of .net libraries that I wish to call from Excel VBA (that part is working fine). These libraries rely on settings in the app.config. I know I can enter these settings in a excel.exe.config file (placed in the same directory as the excel.exe), but this doesn't really seem like a very manageable solution to me, as I...

What is COM error 0x80070012 all about then?

Hi there. A client of ours is having trouble with a SharePoint site. They are seeing the following error (or something similar) appear when they navigate to any pages: There are no more files (0x80070012) Does anyone know what on earth is this error trying say? I've tried to Google for this, but I could not find anything conclusiv...

CComVariant vs. _variant_t, CComBSTR vs. _bstr_t

I am using ATL (VS2008, so ATL9 IIRC) to create COM objects and have been using the CComVariant class (defined in atlcomcli.h) to manage VARIANT types. However, there is also another VARIANT wrapper called _variant_t. Is there any difference between CComVariant and _variant_t and which one should I be using? Similarly, there are two B...

Need to find beginning and ending points of an Excel Range in C#

I'm trying to read an excel file from C# using COM, and can get it opened and loaded just fine. However, I don't want to use all of the data on the sheet (it expands monthly), just a certain subset that starts below the top of the sheet (row 3 for headers, row 4 for data) and goes to the end. I can currently get a range representing th...

Problems invoking methods on a COM thread from a WinForms GUI thread?

I'm having trouble with my COM component written in .NET throwing warnings that look like: Context 0x15eec0 is disconnected. No proxy will be used to service the request on the COM component. This may cause corruption or data loss. To avoid this problem, please ensure that all contexts/apartments stay alive until the app...

Marshal.GetActiveObject throws error from C++/CLI but not C#

I am trying to get access to an running instance of an application, Rational Rhapsody, through COM. I am trying to use the C++/CLI COM calls. From C++ calling: rhapsody::RPApplication^ App = safe_cast<rhapsody::RPApplication^>( Marshal::GetActiveObject("Rhapsody.Application")); Causes a COM Exception : 800401E3 (Operation Unavailable...

How to find out Lotus Fields DataType ?

I have following code to access Lotus Form's Fields(COM Interop), But i am unable to get its dataType.(e.g. : Text , Number , DataTime) NotesSession notesSessionClass = new NotesSession(); notesSessionClass.Initialize(pPassword); NotesDatabase pNotesDatabase= notesSessionClass.GetDatabase("", pDatabaseName, fals...

IronRuby: Cannot call method on a COM Object with one or more arguments.

When I try and call any method on a COM Object that takes one or more arguments, I get the following error on the last argument: Could not convert argument 0 for call to Open. (ArgumentError) Everything works fine when calling a method that takes no arguments, or getting/setting a property. Here is the code that gives me the error abo...

Integrating First Data (previously YourPay and LinkPoint) payment gateway with custom ASP booking system

Hiya, I’m trying to integrate a simple booking system (developed in ASP) with this payment gateway: https://www.firstdata.com/ My site is hosted on a shared server and I was hoping to pass the transaction details to firstdata and have all the secure data entered and processed on their system (as in a Form Purchase token type model). ...

Is there any way to configure trac to use a custom mailing tool?

Is there any way trac could be made to work with a custom mail tool? For example, imagine a command line script which takes all of it's arguments from it's command line arguments: script -s sender -t title -to [email protected] -b body The tool is configured to use COM for email sending, and I think it would be impossible to define ...

ASP.NET 2.0 and COM Port Communication

ASP.NET 2.0 and COM Port Communication Hello Guys, I have a managed DLL which communicates with the devices attached on COM/Serial ports. The desktop Winforms application sends requests on ports and receives/stores data in memory. In Winforms app I have added a reference to DLL and I am using the methods. This works well. Now, there is...

Render webbrowser control offscreen (or hidden)

I have a small application which embeds webbrowser controls. In that application I have created a popup class. This popup is used to display server generated error messages. I want to be able to resize the popup to suit the message. This is so a short message is not contained in an oversize form and a large message is not in an undersiz...

Question about COM Release() method

I am learning about COM and reading about this code: STDMETHODIMP_ (ULONG) ComCar::Release() { if(--m_refCount==0) delete this; return m_refCount; } My question is, if the m_refCount==0 and the object is deleted, how could the instance member variable *m_refCount* still exist and be returned? Please forgive me if my questio...

How could a member method delete the object?

I am currently studying COM and the following code confused me. STDMETHODIMP _(ULONG) ComCar::Release() { if(--m_refCount==0) delete this; // how could this "suicide" deletion be possible? return m_refCount; } I am wondering how could it be possible to delete an object instance within its member method? So I made the following...

Performance of passing data between .Net and COM assemblies

I am in the process of migrating a legacy VB6 app to .Net, however since it is a high-profile business critical application, it is being done piece by piece. In the interest of improving performance, there is one method which gets hit a lot,thousands of times during the application life, and I was wanting to rewrite it in .Net (C#) to s...

Send a break byte with windows com-port

Here is a copy of the datasheet from a microcontroller: Break characters are a full character time of logic 0 (including a 0 where the stop bit would be normally). This is what I want to generate with the windows COM port (Windows SDK). The problem is I don't see a way to have the stop-bit set to zero. Any ideas?` SetCommBreak...