com

Using Python COM to select files in windows explorer?

Hi, Is it possible using Python COM to select files inside of the windows explorer? For example, I am trying to get all "*.txt" files inside of windows explore highlighted without having to select them with the mouse, or without other keyboard gymnastics. thanks in advance. ...

C++ and Scripting.Dictionary from scrrun.dll

Hello. I have some trouble with Scripting.Dictionary in C++. I'm trying to use interface IDictionary via smart pointer but methods of creating object don't work and I can't understand why. CoInitialize(NULL); IDictionaryPtr dict; dict.CreateInstance(__uuidof(Dictionary)); _variant_t num1 = 1; _variant_t num2 = 2; dict->Add(&num1, &num...

ATL and types from scrrun.dll

Hello. I have interface in ATL project which must contains member with parameter of Scripting::IDictionary** but in MIDL file with description of my interface it's not possible because Scripting library is not presented in default library. I always have scrrun.tlb and trying to use it in MIDL but it's not work Code is here: midl-code ...

How to call interface API from within COM server

I have one com server with some interfaces exposing some API's COM class looks like below class ATL_NO_VTABLE CTask : public CComObjectRootEx<CComSingleThreadModel>, public CComCoClass<CTask, &CLSID_Task>, public ITask { public: STDMETHOD (Task)(); STDMETHOD (ABC)(); ... } Now this com server also contains one more cla...

Can I use manifests to consume a COM server without specifying its version?

Two of our programs use the same COM server (also made by us) with the same class ids. Each program when installing copies the COM server files into its folder and regsvr32s the COM server. The problem is how to install the COM server so that the user can install either one or both of our programs into different folders in any order and...

Can I use manifests to specify an optional dependency on a COM server?

I'd like to use manifests to specify a dependency on a COM server (reg-free COM). The consumer application will mostly work fine without the COM server - only something like 1,7% of its functionality uses the COM server. So with plain old regsvr32 it would start and work fine until the user would do something that would trigger CoCreate...

Is it possible to have an out-of-process COM server where a separate O/S process is used for each object instance?

I have a legacy C++ "solution engine" that I have already wrapped as an in-process COM object for use by client applications that only require a single "solution engine". However I now have a client application that requires multiple "solution engines". Unfortunately the underlying legacy code has enough global data, singletons and thre...

Problem catching OnClick event using HTMLDocumentEvents2 in a BHO

I am running a BHO and i am trying to catch OnClick events using HTMLDocumentEvents2 however, the events never seem to reach the handler this is what i am doing: class ATL_NO_VTABLE CBlastBhoBHO : public CComObjectRootEx<CComSingleThreadModel>, public CComCoClass<CBlastBhoBHO, &CLSID_BlastBhoBHO>, public IObjectWithSiteImpl<CBlas...

how can i use COM & USB ports within cygwin

hi, i want to send/receive data from my arduino board with a python script. I would like to do it using python and its pySerial module which seems to fit my needs. So i installed python and pySerial within cygwin (windows XP behind)) the python script is rather straight forward : $ cat example.py #print "testing my COM26 port using p...

Any drawbacks in using LoadLibraryEx() instead of CoCreateInstance() for reg-free COM component consumption?

Our program needs to consume the COM server which is also made by us. The scenario is the following: the installer will copy both the program files and the COM server files into the same folder on each install. Currently we use regsvr32 to register the COM server, but this is not very good - if we develop another unrelated program that ...

"com.jacob.com.ComFailException: Can't find moniker" Why?

I use jacob last version and jacobgen. I put all need dll in c:\windows\system32 I generated wrapper about dll by jacobgen. But I got an exception. Google didn't help. :( com.jacob.com.ComFailException: Can't find moniker May be need registy dlls in windows registry? ...

How to debug without Visual Studio?

Hello, Python -> c++ dll -> c# dll I have a com interop c# dll that is loaded in a wrapper c++ dll throught the .tlb file generated in c# to be used in a python project. When I run in my computer it works fine but when I run in a computer that just got formated it gives: WindowsError: exception code 0xe0434f4d I have the redistribut...

.NET interop COM DLL behaves differently in VB6 debugger

I have a .NET v2.0 Dll that exposes a few classes to COM. The assembly is called BLogic.DLL I'm calling these classes from a legacy visual basic 6.0 application. I can generate and EXE file and if I have Blogic.dll in the same folder as the EXE, the program runs without a hitch. However If I try and launch the same program within the V...

COM Pointers and process termination

Can an unreleased COM pointer to an external process (still alive) cause that process to hang on destruction? Even with TerminateProcess called on it? Process A has a COM interface pointer reference to Process B, now Process B issues a TerminateProcess on A, if some COM interface pointer to Process B in Process A is not released proper...

Analog of COM programming in Linux/UNIX

The Component Object Model (COM) is (or was...) the way in Windows to provide language-neutral software components. Is there any programming model in Linux/UNIX with the same philosophy of code reuse through binary components? ...

Call .net function from PHP page.

I have this function in .net code: public class StringGenerator { public static string GenerateString(string hash) { return hash.GetHashCode(); } } I want to be able to call this from PHP page. Any idea how? Edit: looking in php documentation, http://www.php.net/manual/en/class.dotnet.php, I see that it possible. ...

COM Interfaces and Binary Compatibility

In the day job, I work on a VB6 (I know, but don't mock the afflicted...) application that uses a number of libraries we have written (also in the ever illustrious VB6). One of these supporting libraries had a load of private members exposed via public properties, and I was asked to remove the properties, and promote the private member v...

Translate HRESULT to a readable message

Can anyone provide some information on how to programmatically translate HRESULT (http://en.wikipedia.org/wiki/HRESULT) values to a human-readable message? I know that the utility ERR.EXE does this, but my app needs to display some meaningful message to my users rather than a cryptic 0x800A03EC. ...

COM Interop & Outlook - Make Outlook Visible?

I'm automating Outlook from a VB.NET program, transferring items into the calendar and contacts at the user's request. It's all working, that isn't the problem; the problem is that automating Outlook like this when it wasn't already open creates a hidden instance. I can perhaps understand how this could be useful, to stop the user closin...

Drag and Drop to explorer causing invalid FORMATETC (DV_E_FORMATETC) error

I'm trying to use this excellent example to implement dropping virtual files into Windows Explorer. However, I'm stymied by this error. Towards the bottom, inside void System.Runtime.InteropServices.ComTypes.IDataObject.GetData(ref System.Runtime.InteropServices.ComTypes.FORMATETC formatetc, out System.Runtime.InteropServices.ComTypes.ST...