How to use IGlobalInterfaceTable to pass an interface pointer?
Without: MFC ATL Question: What are the steps involved, to use IGlobalInterfaceTable, when passing a particular interface pointer to several threads using CreateThread? ...
Without: MFC ATL Question: What are the steps involved, to use IGlobalInterfaceTable, when passing a particular interface pointer to several threads using CreateThread? ...
A legacy c++ applications with sometimes notorious memory leak issues has to be called from a .Net server based windows application. .Net garbage collection times are not determinable and sometime the c++ object are destroyed or not destroyed "on time" producing unpredictable results and generally crashing the c# web app. What is the b...
I need to use a DLL created using .NET framework. This DLL is made COM visible. I want to use this DLL in an application created using Delphi 2006. I have followed following steps: Registered the DLL using regscr32. Imported the type library using Delphi IDE. It created _TLB.pas file. Following signature was created in TLB file. fun...
I am writing a C++ DLL that is called by an external program. 1.) I take an array of strings (as char *var) as an argument from this program. 2.) I want to iterate through this array and call a COM function on each element of the string array. The COM function must take a BSTR: DLL_EXPORT(void) runUnitModel(char *rateMaterialTypeName...
I have written a COM object using C++. Creating the object and connecting to its events works fine if I do them both at the same time (Javascript): var obj = WScript.CreateObject("SomeCOMClass.Object", "event_"); However the following generates this error (msdn): http://msdn.microsoft.com/en-us/library/a7tya2wc(VS.85).aspx. var obj ...
Hi! I'm currently developing on application that uses legacy COM-based object. This object resides in standalone executable and have COM connection point defined on it. When I subscribe on this connection point within WinForms application everything is ok - all callbacks received smoothly. When using same code from NET framework based Wi...
We have a large, deployed, 3-tier .NET application which for good business reasons can't be upgraded at present. The client makes use of a number of classic c++ ActiveX controls through the usual interop mechanism. We have fixed some critical bugs in one of the ActiveX controls and need to deploy the fixes to a number of customers with...
I have a DLL that is created in C# for the purpose of providing a COM interface to a third-party C# library. I have a C++ program that uses that COM interface so that it can communicate with the C# library. Sometimes, exceptions get thrown on the C# side and all I get back on the C++ side is an HRESULT from the COM invocation that says...
Vista introduced the new Common Item Dialogs for opening and saving files that supersede the old Common File Dialogs. Custom controls can be added by utilizing the simple IFileDialogCustomize interface. One of them is a standard ComboBox which is non-editable. Is there any way to create an editable ComboBox or modify an existing one (by ...
I've been reading Essential COM, it is a very good book, very instructive and simple to understand. Now I want to speed things up and implement a simple COM object, compile it into a .dll and finally use it from a client application. I would really appreciate if anybody could show the most basic sample of how to do that? I've been tryi...
a task at my hand requires me to move an ASP application from one server to another. For this, I need two command line tool like stuff to know the following info. Get the list of com objects used in this asp project. Get the list of registered com objects in my existing server. Any Idea ? ...
I just getting started using IMetaDataEmit to write some .NET IL. I'm having trouble getting the mdTypeRef for a System.Byte (which I would like to use to declare a byte array on the stack). Here is my attempt. metaDataEmit->DefineTypeRefByName(NULL, L"System.Byte", &byteToken); This throws an error message that says "Could not load...
Note: Using CoGetClassObject, to create multiple objects through a class object for which there is a CLSID in the system registry Single threaded apartment For instance: hresult = CoInitializeEx(NULL, COINIT_APARTMENTTHREADED); IClassFactory *pIClassFactory; hresult = CoGetClassObject (clsid, CLSCTX_LOCAL_SERVER, NULL, IID_IClassF...
Question: Based on a CLSID, how can I find out what objects (or interfaces) it supports for IClassFactory::CreateInstance Note: Currently using CLSIDFromProgID to obtain CLSID ...
With a COM interface method declared as this: [ object, uuid(....), ] interface IFoo : IUnknown { HRESULT Foo([in, out] CACLSID * items); } With regards to marshalling, is the server allowed to reallocate the counted array? (I think it is, but I am not sure anymore) Its current implementation only replaces the existing ID's, but...
I'm trying to implement some integration between a legacy app running in the Reflection Terminal Emulator and a browser-based app running in IE. I'm using Host Initiated Scripts so that maintenance and deployment issues are isolated to the legacy app. All scripts will be generated in the legacy app and transmitted to Reflection using e...
One of the nice things about COM/ActiveX was the out-of-process EXE. You could have an EXE which exposed methods and properties in a form usable by both other processes, including VBScript and JScript. At the same time the EXE could have its own functionality, related or unrelated to that exposed by its type library. What is the .NET eq...
Hi, How can I pass a char * from C dll to VB Here is sample code: void Cfunc(char *buffer,int len) { BSTR buf_bstr = SysAllocString((BSTR)buffer); VBptr.VBfunc(buf_bstr,len); } This function is not working, In actual some other values are sent to the VB rather than the actual value. Can Anyone .. tell me how the solution for ...
Note: Attempting to invoke a method of an interface, of which the return type is _variant_t Code: _variant_t resultsDataString; _bstr_t simObjectNames; simObjectNames = SysAllocString (L"TEST example 3"); resultsDataString = pis8->GetSimObject (simObjectNames); inline function illustrated below, contained in .tli FILE: inline ...
I'm trying to find the cleanest and fastest way for calling a COM objects methods. I was using a RCW for the object but every time a new version of the third party COM object comes out its GUID changes which then renders the RCW useless, so I had to change and start using Type mytype = Type.GetTypeFromProgID("MyCOMApp.Application");...