com

Getting 0x80070002 error intermittently when trying to instantiate a COM object in classic ASP

We have a classic ASP page that is instantiating a .Net object through a COM interface. It was working fine for a long time, but over the weekend we applied some Windows updates and it is no longer working reliably in our production environment. Sometimes it works, sometimes it doesn't and it seems random when it works. It doesn't fail i...

How to read from a device's COM Port?

Hello, I´ve a device running Windows CE, which is capable to receive GPS datas. Now I wrote an application (C#, .Net Compact Framework 2.0 using VS2008) in order to receive this data and later on work with it. The support contact of the device told me to use its COM port (number 5) to get the data. As I´m not that experienced in working...

Call a .net dll from VB

whether .net framework required to run a .tlb file generated from c#? ...

How to determine the Window size in IE for a window to be opened from the COM API?

I'm using the IE control embedded in an application. Works as advertised. When a user opens a new browser window I intercept the NewWindow2 event and force it into a new tab. However for a certain class of windows I want to allow a popup. Most notably a few windows legacy applications that use popup windows instead of Ajax for Date or Na...

Run-Time Check Failure #0

Hi folks, I am getting this run time error Run-Time Check Failure #0 - The value of ESP was not properly saved across a function call. This is usually a result of calling a function declared with one calling convention with a function pointer declared with a different calling convention. when using IID_IWebBrowser2 interface of CLSID_...

COM: OLE Viewer unable to create instance of class

Using OLE/COM Viewer I get the following error (when expanding my registered class) CoGetClassObject failed. <No system message defined> severity: SEVERITY_ERROR, facility: <Unknown Facility> ($80131522) The COM Class is a C# class registered with RegAsm. What does this error mean? Edit: See http://www.dotnet247.com/247reference/...

COM types question

I have this vendor-supplied TLB file, which I've used to generate a Ruby proxy class. However, the TLB in question describes 6 interfaces and 3 classes: AcdAutomationServer (I) AcdAutomationServerClass (C) AcdEvent (I) AcdEventClass (C) AcdObject (I) AcdObjectClass (C) IAcdAutomationServer (I) IA...

iTunes COM - How to acess Lyrics

Hi. I have been messing around with iTunes COM from python. However, I haven't been able to access the Lyrics of any track. I have been using python for this. Here is the code: >>> import win32com.client >>> itunes = win32com.client.Dispatch("iTunes.Application") >>> lib = itunes.LibraryPlaylist >>> tracks = lib.Tracks >>> tracks <win...

[python] How to get instance type of a win32com object?

First of all, please excuse me for any incoherence in the tile of this question. It probably has some, but really don't know better. This question was raised in the context of controlling iTunes via COM from python. >>> itunes = win32com.client.Dispatch("iTunes.Application") >>> itunes <win32com.gen_py.iTunes 1.12 Type Library.IiTunes ...

Implementing IUnknown, unresolved external symbol

Hello, I am trying to create a class that implements the IUnknown interface. I have the following code in the header file. #pragma once #include "stdafx.h" #include "Unknwn.h" class Vmr9Presenter : IVMRImagePresenter9, IVMRSurfaceAllocator9 { public: Vmr9Presenter(void); HRESULT Initialize(void); ~Vmr9Presenter(void); STDMETHODIMP ...

Media Foundation: The MFPlay object doesn't have to use MFStartup for the initialization?

Hi, Here is a question about MFStartup function in Media Foundation: According to the article "Initializing Media Foundation" (http://msdn.microsoft.com/en-us/library/ms704682%28VS.85%29.aspx), before using any Microsoft Media Foundation objects or interfaces, you must call the MFStartup function. But there is a sample from "MFPlay Tu...

Media Foundation: another way to call IMFActivate::ShutdownObject?

Hi, Here is a question about IMFActivate::ActivateObject and IMFActivate::ShutdownObject in Media Foundation. According to MSDN, the component that calls ActivateObject is responsible for calling ShutdownObject. But there are two examples not following this rule: http://msdn.microsoft.com/en-us/library/dd388503%28VS.85%29.aspx and ...

How can I detect the type of a dll? (COM, .NET, WIN32)

I need to process a number of dll's and exe files in a folder and determine what type of file I am dealing with: .NET, COM, Win32 or some other alien life form. I've been trying to determine the easiest way to detect the type of a DLL, what do you think of this: COM dll => I do a LoadLibrary, then GetProcAddress for "DllRegisterServer...

Display Excel 2007 Document in Browser using COM

I want to display and edit MS Excel File from client side using ActiveX COM object. The user would be allowed to edit the file and save it to local PC. Then It can be uploaded to remote server. So, can you give me some example of displaying Word, Excel, Powerpoint etc document in Internet Explorer 8.0 using COM. I could not find such oc...

write a com control in c# and use it in MFC

if this possible to write a com control or activex in C# and use it in MFC ? ...

How to use ActiveX/COM from ColdFusion?

Is it possible to use an ActiveX/COM object from ColdFusion? If so, where's the documentation or samples for it? (non ColdFusion programmer, asking on behalf of a ColdFusion programmer) ...

How to pass a SAFEARRAY from C# to COM?

I have an ATL COM Server, where the method for the interface is CVivsBasic::UpdateSwitchPlan(BSTR plan_name, SAFEARRAY* plan) And the IDL for this function looks like typedef struct { LONG time_to_play; BSTR ecportid; } SwitchPlanItem; HRESULT UpdateSwitchPlan([in] BSTR plan_name, [in] SAFEARRAY(SwitchPlanItem) plan) ; ...

Catching COMException specific Error Code

I'm hoping someone can help me. I've got a specific Exception from COM that I need to catch and then attempt to do something else, all others should be ignored. My error message with the Exception is: System.Runtime.InteropServices.COMException (0x800A03EC): Microsoft Office Excel cannot access the file 'C:\test.xls'. There are...

Excel C# Com Chart Multiple Series Problem

Hello All, Please can someone help me with this as it's driving me nuts! I'm creating an excel chart using C# and the COM interface pragmatically. I've created the chart using the chart wizard. I want to then add more series to this chart. I can add the series but the extra data is on new columns and they are not automatically create...

Is it worth checking for null pointer in QueryInterface() implementation?

IUnknown::QueryInterface() is passed a void** parameter denoting an address where to put the retrieved interface. STDMETHOD QueryInterface(/* [in] */ REFIID riid, /* [iid_is][out] */ void** ppvObject) Should the implementation of QueryInterface() check this pointer for being null (and then immediately return E_POINTER) or just write t...