Click here to Skip to main content
15,891,852 members
Everything / COM

COM

COM

Great Reads

by Maxim Kartavenkov
Article describes how to make H.264 Video Encoder DirectShow Filter using NVIDIA encoder API in C#
by Michael Dunn
A tutorial on using owner-drawn menus in a context menu shell extensions, and on making a context menu extension that responds to a right-click in a directory background.
by Arik Poznanski
Complete Library for using the Windows 7 Ribbon from C#, including 18 samples and 21 blog posts documenting the Ribbon features
by CMalcheski
How to Create a Complete DirectX Game in Assembly Language

Latest Articles

by Michael Chourdakis
DirectX hardware screen capture and encoding with audio mixing capabilities. H264/H265/VP80/VP90/FLAC/MP3. HDR supported.
by flyhigh
By implementing a UI library and exporting its necessary components to lua script, we can create a beautiful UI and implement relevant logic in Lua script completely.
by Andrea Simonassi
The first and simplest of the multiplication algorithms, fast enough to multiply not too large numbers
by Excel-lent
This article shows how to compile and execute OpenCL code from VBA.

All Articles

Sort by Title

COM 

8 Nov 2020 by rajesh482
I've implimented a ATL single thread apartment based project . class ATL_NO_VTABLE CMySrv : public CComObjectRootEx, public CComCoClass, public IMySrv In the method, I'm creating multiple worker...
7 Apr 2023 by Zouaoui Billel
Hello All; I am working on C++/MFC project where I need to use access control device SDK acualy I registred SKD DLL (using regsvr32.exe) to create a controller, after that I Open my MFC project and I added activex controller from the wizard, ...
29 Nov 2011 by Phre2d
We have a COM module written in VC++ 6.0 which is called from both VC++ 6.0 and VB 6.0 programs. As an early step in moving to .Net, this module was rewritten as a .Net 3.5 assembly with a thin COM module wrapper which is still called from VC++ 6.0 and VB 6.0 programs (these programs are...
29 Nov 2011 by #realJSOP
I think I remember hearing something about having to install versions of .Net in the proper order. Maybe the new server was installed from a newer disc, and had .Net 3.5 on it, and .Net 20 was installed as an afterthought? You might want tto try uninstalling both versions, and then reinstalling...
2 May 2016 by Gayle123
I Created a 64 bit exe and 32 bit com dll ... i did neccesary changes in registry as suggested by some site .. now CoCreateInstance is returning :HRESULT_FROM_WIN32(ERROR_BAD_EXE_FORMAT) : %1 is not a valid Win32 application. HRESULTCould you please let me know why the error...
2 May 2016 by George Jonsson
How did you register your COM dll?By default the 64-bit version of RegSvr32 is used and you need to use the 32-bit version.See https://support.microsoft.com/en-us/kb/249873[^]And here is some general information: Process Interoperability (Windows)[^]
2 May 2016 by CPallini
Unless I misunderstood the documentation, you cannot do that. See Process Interoperability (Windows)[^]:On 64-bit Windows, a 64-bit process cannot load a 32-bit dynamic-link library (DLL). Additionally, a 32-bit process cannot load a 64-bit DLL.
8 Feb 2011 by whoyousee
hi,guysI'd like a word document inside the 25 to 45 the Range, inside which the data is added to another document? The Range There may be pictures or tables, it is not the way a string is added to another document. The following method can meet the requirement, but if the client during the...
2 Jun 2009 by Adrian Dorache
Let's see a short example using COM objects exposed by Internet Explorer. The code below changes the color of every link in an HTML document.
5 Sep 2007 by Boaz V
How to receive events from a COM object using the application message loop in a console application.
22 Jul 2007 by Yuriy Kyyan
An article on creation automated interface for .NET applications.
7 Oct 2015 by cadiazran
Hi everyone!, I need to use this code made in C# to .Net [^] . I have a PLC connected to a PC through Modbus RTU (RS485). Between PLC and PC I have a RS485-RS232-USB converter.I'd like to know how this program could read and write memory registers of 4 bytes (2 words) size. I need to handle...
7 Oct 2015 by CPallini
What you can do, using the article's program 'as is', is reading the pair of registers and then convert yourself the return values into the meaningful value. For instance, assume you read a register pair reg[n] = 0x4128 and register reg[n+1] =0x0000then, if the PLC uses the big endian...
10 Oct 2015 by Archie Jacobs
I recommend trying AdvancedHMI. It has a ModbusRTU driver that supports float over Modbus by preceding the address with a F. For example, you would use F450001. To do this in code with AdvancedHMI:Dim MyValue as string= ModbusRTUCom1.Read("F450001")
10 Oct 2015 by Zoltán Zörgő
Try NModbus[^], with great manual[^]See last page for the data type conversion you need.Some deeper theory about modbus rtu dta representation: http://www.chipkin.com/how-real-floating-point-and-32-bit-data-is-encoded-in-modbus-rtu-messages/[^]But before you try to do it from code (which...
30 Sep 2013 by Florian Rosmann
COM Interop using a little post compiler. As a result, it is possible to use multithreading in combination with COM interfaces.
9 Aug 2012 by bChen@sh
This article explores the rules of how AddRef and Release are called in RCW and COM, which addresses the issue of RCW memory leaks.
11 Feb 2019 by frez
.NET Core Razor Page Email Form using SendGrid and reCaptcha
21 Sep 2010 by MatthysDT
O.k, this problem has been very evasive so far so I'm hoping someone here could help me.I have the following code to late bind to a VB6 DLL (via a wrapper created by the Type Library Importer)* Note the following code has been stripped of all error handling etc. for the purpose of this...
21 Sep 2010 by ARopo
do you know which dll/ocx/exe implements the object wr_TCPIP_ASTM.TCPIP_ASTM_CommsClass (27CC4E03-D86D-40B5-96D4-F7EA5B148A0D)?You can find out using regedit - under classes rootHKEY_CLASSES_ROOT find wr_TCPIP_ASTM.TCPIP_ASTM_CommsClassunder wr_TCPIP_ASTM.TCPIP_ASTM_CommsClass should be...
13 Jan 2012 by MatthysDT
Registering the components in a COM+ application in Component Service fixed this.
11 Oct 2015 by Bismark Appah
13 Jul 2008 by Rajneesh Noonia
The source code / article published here is to provide features of MS Script control (Functions like AddObject) and some features of VSA/Visual Studio editor like intellisence, code completion etc
15 Sep 2013 by Dave Kerr
Learn how to deploy SharpShell servers easily with the new Server Registration Manager tool
12 Feb 2018 by Pritish Dahivelkar
I have an idl file in my c++ project I want to create instance for coclass from this idl file in my second project which I have created in c#. while creating that instance in c# project I get the exception at runtime. I search the solution for the exception and mostly got that I should set the...
12 Feb 2018 by KarstenK
Check whether the C+ app is in 32 or 64 bit mode. There are some setting to control it. When working with 32 and 64 bit dlls the naming and path should be different, so system isnt mismatching the modules. Check that the needed side loaded dlls are correct and in place. In the ATL projects the...
29 Oct 2012 by Virendra_ec10
Hello C++ Gurus,I created a 64-bit COM DLL by compiling a 32-bit application in visual studio 2010(Mode-Release, Platform-x64) and registered it successfully using Regsvr32.exe tool.I am trying to create the instance of the dll but, I am getting "Class Not registered " error in the below...
29 Oct 2012 by enhzflep
I'm still(hopefully will remain?) pretty wet-behind-the-ears with respect to COM work. Though I do note that the behaviour you report is the same as that which I observe when starting a 32bit COM server under either windows xp or 7.That is to say CLSIDFromProgId does just that - it returns...
11 Jul 2013 by Dattatraya Mengudale
Please refer..http://www.gfi.com/blog/32bit-object-64bit-environment/It will really solve your problem...
12 Jul 2013 by PrafullaVedante
If you are trying to create a COM object from a 32 bit dll/exe , then your 64 bit com object cannot be instantiated . Because Windows maintain separate entries for 32 bit and 64 bit COM objects. Hence make sure that your COM object and your container application belongs to same architecture...
27 Dec 2020 by Jeremy Likness
In this post, I will continue the tradition which I started in a 2015 blog post of celebrating the year and looking back at highlights.
7 Mar 2010 by yingkou
I wanto to define a custom proxy/stub com object At VC6.0 Envirment,steps as follow:1、Define A Simple IDL File2、Compile it by MIDL3、Add *_i.c、*_p.c、*.h、*.def To Empty Win32 DLL4、Define Funtion:DllGetClassObject、DllCanUnloadNow etc.5、Compile All DllLink Error...
7 Mar 2010 by Eugen Podsypalnikov
The macro DLLDATA_ROUTINES in your dlldata.chas already defined DllGetClassObject and DllCanUnloadNow,so you have not to do it twice (your fourth position) :)
8 Mar 2010 by yingkou
To upstairs:Thank You And I Have Other QuestionIf i want to realize a custom proxy/stub structure,I Must Build More Than One Proxy/Stub For All Com Object?Such As:ClassFactory、COM Class1、COM Class2,Because The macro DLLDATA_ROUTINES in dlldata.chas already defined DllGetClassObject(This...
8 Mar 2010 by Eugen Podsypalnikov
I think, the first parameter of DllGetClassObject could be different for the different classes... :)
8 Mar 2010 by yingkou
To Upstairs: DllGetClassObject Is Defined By MIDL,How Can I Change its Definition?and How does The Com library know which class is derived fromthe custom interface?
8 Mar 2010 by Eugen Podsypalnikov
A Proxy DLL is a gate only :)The creation of a class instance -is a task of your server :)
10 Nov 2013 by Rex Miao
Dear All,I found some good tutorials of COM server creating but most of them are in DLL which is in-process.I am looking for a good tutorial of "out-of-process" COM server building.Does anyone know any article refer to this?I study Windows MobilityCenter extension recently.And the...
6 Jun 2011 by Regner44
Hello guysI have a problem with an out of process COM-server. I inject a DLL into a foreign process and this DLL registers some Classes as local servers. This is done in the following way:1. For each object the following registry entries are created:HKLM\SOFTWARE\Classes\CLSID\{GUID OF...
7 Jun 2011 by Regner44
Well, my own "temporary" solution to the problem is the following:The problem was that i started my foreign process as administrator and the consumer client just as invoker. If i start the foreign process as invoker it gets detected and requests are delagated to it. I guess that i have to...
7 Jun 2011 by mbue
It is really unclear where the hEvent comes from in your DllMain. You cannot share local handles between processes. You should create the event object by name and this should work.// exeHANDLE h = CreateEvent(0,0,0,AnyGuid());WaitForSingleObject(h,INFINITE);CloseHandle(h);//...
13 Nov 2013 by Sergey Alexandrovich Kryukov
You can do it. And it makes no sense, whatsoever.How else can I explain that it does not make any sense. Wasn't my answer clear? Please see: Activex Object created in C#, to be placed in VB.net application.[^].—SA
1 Dec 2010 by PaulowniaK
HiMy job is to create a DLL for a bigger project. It's been working fine, but it seems I've done something to it in the last couple of days that prevents it from being registered correctly using Regsvr32.Sure, I can roll back my code etc but I'm looking for a slightly more efficient and...
1 Dec 2010 by imagiro
First you should check if your DLL (still) exports all required methods. Then make sure it does not depend on other libraries which are not loaded at the time regsvr runs. Having static (global?) vars is dangerous, you might try to replace your CStdiofile by a pointer (CStdiofile* m_myFile =...
21 Dec 2018 by tranthanhtu.vn
[TinyERP: SPA for Enterprise Application] Handle Error/ Validation
27 Dec 2018 by tranthanhtu.vn
Steps to add new "Manage Staff" feature
19 Nov 2018 by tranthanhtu.vn
Overview. As mentioned in "Manage Staffs - Part 2" part, It was easy to query the list of staffs as they were prepared before hand.. All necessary preparation steps occurred in "Add/ update staff information".. Let see "Add staff" first.. Add the following line into staffs.
26 Nov 2018 by tranthanhtu.vn
[TinyERP: SPA for Enterprise Application]Cross Modules/ Domains Communication
27 Dec 2018 by tranthanhtu.vn
[TinyERP: SPA for Enterprise Application]Manage Staffs - Part 2
9 Dec 2018 by tranthanhtu.vn
Overview. In this article, let see how we use multiple languages in TinyERP.. Currently, In html files, ts file for HRM were still using hard-code value (I mean hard-code value of string). And this was not good for enterprise application which supports multi languages as default..
3 Dec 2018 by tranthanhtu.vn
TinyERP: SPA for Enterprise Application
7 Oct 2019 by Rajat-Indiandotnet
Objective: In this post, we, try to understand what is Object Storage Service in Alibaba Cloud and how to create your first Object Storage Service. We will try to understand the different business scenario where we can utilize this OSS service.
18 Jul 2009 by ThatsAlok
Article touching simple issues like property, method and event and using it in .NET applications
19 Dec 2012 by ThatsAlok
Article touching simple programming instrument like Property, Method, Event and invoking ATL Dialogs from ATL/COM Component
10 Apr 2002 by Ranjan Banerji
A tutorial on how to create connection points using VC++ and ATL
16 Aug 2013 by Robert Köpferl
This article provides a better browser control than the one included in WPF
22 Feb 2010 by Aric Wang
The article will give you an idea on how to design a source filter.The source filter creates samples and outputs it from its output pin.
10 Dec 2002 by George Anescu
Presenting a C++ class for correct operations on BSTR strings with binary data contents
10 Oct 2007 by Jia.Chen
This article uses a simple example to show how to build a Firefox component intercepting/operating DOM
21 Oct 2002 by Jonathan de Halleux
Eases up the use of the Matlab(c) COM server...
18 Aug 2004 by Sprotty
An introduction to XML Data Binding, and a review of a number of leading products.
20 Jul 2006 by William.Wang
A COM class (DLL) that embeds an embeddable OLE object.
15 Aug 2004 by mav.northwind
A wizard to bring easy COM class creation to C#.
7 Nov 2012 by PaulowniaK
I've got a bunch of C++ COM components that I'm adding to a C# .NET project as references.All except one can be added successfully.There is one that is never recognized as a COM.It doesn't turn up in the COM tab in the Add Reference dialog.So I forced to load it as a file but I get...
6 Nov 2012 by Maxim Kartavenkov
Hello,If your object can be registered without problems with regsvr32 thenyou should check if your COM dll consist of type library. As it require to make exports automatially. To check it use "OLE-COM Object Viewer" tool (it comes with VS and or SDK). In there select "View TypeLib" and...
7 Nov 2012 by PaulowniaK
The DllRegisterServer function wasn't calling AfxOleRegisterTypeLib.Stupidly simple now that I know what it is, but gosh, it's been a hard week!Thanks to everyone who made suggestions. They all helped point me in the right direction in the end.
22 Feb 2006 by Skeeter
A wrapper class to any COM interface pointer.
25 Jan 2008 by Tomer Doron
In a mixed .NET/COM COM+ based environment, one may find a need for a command line tool to deploy COM components in COM+.
21 Jun 2006 by David Marcionek
This article is intended to help you get up to speed quickly with developing an ActiveX control. It will show you the basic concepts you need to know about ActiveX, such as methods, properties, and events, and how to communicate between an ActiveX control and a web page.
18 Jul 2006 by Ramchandra.kk
An illustration of the concept of Containment.
8 May 2008 by Davidwu
A Cool Vista Sidebar Gadget Style CPUInfo Animate Control! (Fixed)
20 May 2007 by Michael Dunn
Busted features? APIs failing? Use this guide to get your IE plugin up and running again in protected mode!
7 Jun 2007 by callmepls
23 May 2008 by Jeffrey Walton
Create a File Checksum Shell Menu Extension using ATL and Crypto++
2 Nov 2002 by Renjith Ramachandran
This article will help you to approach COM basics in a friendly manner.
30 Jul 2012 by Dave Kerr
Manage the Global Assembly Cache with this handy tool - or roll your own with the provided API!
29 Jan 2007 by Michael Dunn
This article shows a Vista Sidebar gadget that you can use to browse the APOD site and view previews of each day's picture.
28 Jan 2007 by sghctoma
An article on creating a Vista Sidebar Gadget, that communicates/controls a mobile phone through a serial (COM) port.
6 May 2002 by Ranjan Banerji
SRComHelper makes it easier to call invoke specially in cases where there are several calls to Invoke
6 Oct 2005 by Jozef Bozek
A CGuid class for manipulating the GUID structure.
28 May 2013 by Keyhole Software
Using JSON and File API to view starred Google Reader posts.
6 Aug 2003 by Marc Clifton
A look at what is wrong with OOD/OOP based on CPian responses to the question "What is wrong with objects?"
31 Jul 2001 by @deel@bbas
A simple COM server that is based on multiple inheritance
3 Apr 2019 by thoughts-on-coding
A short introduction into IEEE 754 Floating-Point Model
13 Oct 2008 by Jason Hamilton
This article introduces and explains the use of the serial_interface class. An easy way to add serial port interfaces to your C++ code.
12 Dec 2008 by Sumi, Eo, WajihUllahBaig
How DirectShow can be used to play a video in console mode.
2 Jul 2010 by KarstenK
Beginning a Firefox Addon with the power of XP-COM
5 Dec 2001 by Ivo Ivanov
A reusable object-oriented framework for preserving state of stateless components.
2 Dec 2010 by jackyxinli
Using JNI and COM technology generate Word documents in Java under Windows platform
31 Jul 2008 by shicheng
Gets the content of a web page into a project without the WinHttp APIs mixed in my source code using a WinHttp wrapper.
16 Apr 2007 by Matt (D) Wilson
A simple command-line utility that validates XML files, implemented using MSXML via the VOLE COM/Automation driver library
9 Nov 2002 by Stephane Rodriguez.
Tutorial showing how to build COM components from scratch (DLL, EXE, automation)
29 Mar 2000 by Jeremiah Talkar
An extremely simple class that wraps the win32 CRITICAL_SECTION. Ideal for the COM STA or MTA.
30 Jul 2002 by davyuan
This tool parses a SOAP request and calls the COM+ component to stress test it.
6 Apr 2005 by Andrea Cacciarru
This article explains how to publicize and retrieve data from custom Outlook forms programmatically.
3 Aug 2000 by .Shoaib
A step by step guide to write a COM server using C++ without MFC or ATL.
2 Feb 2007 by sswater shi
A Word addin to syntax highlight selected text. The toolbar is permanent, with a transparent button icon.
15 Apr 2019 by John Bandela
As brought up in the a reddit post with lambdas in inline functions you can run into ODR violations and thus undefined behavior.
4 Apr 2010 by dxFrety
Hi!I want to write a plug-in for Windows Media Player 11 to capture screenshots but I find it is really difficult for me. Is there someonewho can give me any suggestion?------------(My English is so-so, there may be some mistakes in my question, I'm so sorry! If you want to help me...
3 Apr 2010 by Rod Kemp
To learn how to create plug-ins for Windows Media Player, see the Windows Media Player SDK[^].This should outline what you can and can't do with a plug-in in WMP.