com

C# COM Class - DISP_E_UNKNOWNNAME

I have declared a COM visible class in C#. The code is as follows: [ComVisible(true)] public class AComVisibleClass : TheParentClass { public bool SomeFunc(string id) { return true; } } This class is instantiated by a factory class, also COM accessible. But if I try to access in a VB script file, a DISP_E_UNKNOWN...

Why most applications create and destroy a camera COM device multiple times ?

I tried to open a camera device in MSN and many other applications, all of them create and destroy the device multiple times before display the video,why? ...

API Hook on a COM object function?

Greetings StackOverflowians, As discovered here, Windows 7 features a bug in which the DISPID_BEFORENAVIGATE2 event does not fire for Windows Explorer instances. This event allows shell extensions to be notified when a navigation is about to take place, and (most importantly for me) have the opportunity to cancel the navigation. I've ...

How to get my IHttpNegotiate implementation called by IWebBrowser??

Hi! I use cwebpage_src code and I need to update some HTTP request headers while clicking on links. As I understand it can be done with self implementation of IHttpNegotiate->BeginTransaction. But how to get my IHttpNegotiate implementation called?? Thanks! ...

How to prevent COM Server EXE to open Command Prompt window

Hi everyone, my question may be simple for you, but I have no experience about it. So, the problem is that I have a COM server and it is started from the context of another EXE, and I need to prevent this COM Server application to open a command prompt window, thanks in advance for your help. ...

D support for COM

Wikipedia says the following: "On Microsoft Windows, D can access COM (Component Object Model) code." What kind of support for COM is present in D? Does it make life easier than using COM in C++. I've found this link on the D page but it doesn't tell me too much. ...

disappearing COM objects while debugging

Hi there, I'm not sure if the title is adequate but here is my problem: I have an app writtten in .NET 4.0 that uses some COM objects. When I set a breakpoint and examine my code too long, when I try to execute a line of code that is related to COM I get an exception. If I step through my code relatively quickly everything is fine. Is...

COM calls from multiple threads

If I call the same COM function from multiple threads to an in proc COM Dll, how thread safe is that? Do all my objects in the COM DLL also need to be thread safe for this to work reliably? ...

Cannot create COM object from ASP.NET (Creating an instance of the COM component with CLSID {} from the IClassFactory failed... error: 8007000e)

I have an API DLL which is a COM object. I’ve used this DLL in a Winforms application successfully. When I use it in ASP.NET application I get the E_OUTOFMEMORY error: “Creating an instance of the COM component with CLSID {} from the IClassFactory failed due to the following error: 8007000e” when I create an instance of the COM object. ...

How to compare BSTR against a string in c/c++?

wprintf(L"Selecting Audio Input Device: %s\n", varName.bstrVal); if(0 == strcmp(varName.bstrVal, "IP Camera [JPEG/MJPEG]"))... The above reports : error C2664: 'strcmp' : cannot convert parameter 1 from 'BSTR' to 'const char *' ...

What is IInternetProtocol->Start default implementation?

I have IInternetProtocol->Start method called and want to change HTTP request headers in there, but the rest of default implementation should be the same. ...

DragDropEffects.Scroll: why -2147483648 not 8?

A standard enumeration in System.Windows.Forms: [Flags] public enum DragDropEffects { Scroll = -2147483648, // // Summary: // The combination of the System.Windows.DragDropEffects.Copy, System.Windows.Forms.DragDropEffects.Link, // System.Windows.Forms.DragDropEffects.Move, and System.Windows.Forms.DragDropEf...

Managing COM type library as a dependency.

We have a win32 unmanaged application that has an API we distribute as a type library. Several other applications we build depend on the TLB from the legacy application being registered to build. Each product is still under active development, including the items exposed/accessible to the type library. While trying to find the best ...

Not able to register proxy stub dll using regsvr32 in Win Server 2008

I have a proxy stub dll built for a COM Server (Outproc) application. I am able to register the dll in Win XP machine using regsvr32. But I am not able to register the same dll on a Windows Server 2008 machine. I am getting the following error: The module "C:\Test\MyCommServerps.dll failed to load". Make sure the binary is stored...

How to build a class DLL (COM) without any .NET parts?

I need to build a COM DLL to do some simple serial port stuff. It has to be a Class DLL (COM); I have no control over that. I also have no control over the fact that it has to run on some very old machines which do not have the .NET framework installed and never will have. Can it be (easilly) done using VB Express 2008? ...

COM - what does _pAtlModule->Lock() lock exactly?

Hi I'm working my way through learning writing a COM control. I've got an example project, and it uses the lines _pAtlModule->Lock() _pAtlModule->Unlock() in the OnCreate() handler and the OnDestroy() handler for the COM control respectively. I realise that the _pAtlModule is an instance of the CAtlModule - the "application" object ...

Getting COM exception when using Interop in a .net app

Hi, I've a C# class which uses a COM component using interop. Here is the sample code: public class MyClass { MyCOMClass myObj=null; try { myObj = new MyCOMClass(); for (int num = 0; num < myArr.Length; num++) { //Call a method on myObj and do some processing } } catch(Exception ex) { //log exception } finally { if (myObj != n...

Direct Show Capture filter "wrapper"

Hello I need to write a DirectShow capture filter that wraps the "real" video device (fitler) and deinterlaces the captured video. From the interface perspective, this has to be a separate video device available in enumerator and when choosen, it connects to a real video device and inserts a transform filter (deinterlace) between v...

IWebBrowser2 interfaces dependency graph

Is there interfaces dependency graph for IWebBrowser2 component? I just want to make it clear what kind of dependencies exist between interfaces and who calls who? ...

Deployment Project not Removing Previous Project COM References

I have a Microsoft Visual Studio Deployment Project that generates a basic setup.exe and appropriate MSI file. I leave the UpdateCode alone, but change the ProjectCode and Version on each build. I've also set the RemovePreviousVersions property to True. However, after I upgrade a machine, it seems as though any class flagged with COM doe...