C/C++ >> Making a New Component
Posted by cpprogrammer2003 on 10:17:00 05-28-2003
Can anyone show me an example of a custom made component? I want to start making my own components, but do not know where to start. Also, is there a book on making c++ components? Thank You!

Adam

[ This Message was edited by: cpprogrammer2003 on 2003-05-28 10:18 ]
Posted by Neu[Mann] on 12:12:00 05-28-2003
Your question is extremely vague. Please state the platform you are working on an what do you mean by 'components'. It can be alot of things.
Posted by dxprog on 12:41:00 05-28-2003
If I had to guess, I would assume Windows COM+. Or ActiveX. But that's just a guess. [addsig]
Posted by Neu[Mann] on 20:14:00 05-28-2003
It could mean a Borland VCL component too.
Posted by neonbjb on 14:16:00 05-30-2003
hehe.. components.. i'm guessing COM..
anyhow, to put it in a nutshell:
import the com library (i think its in comdlg.h, but ull have to look at the win32 api for that), and create a interface that derives from IUnkown. The IUknown interface has three methods:
UINT AddRef()
UINT Release()
and void QueryInterface(void** pUnkUnkown);

You have to implement the QueryInterface function to return a pointer to another interface that implements the object that you want to remote (or make a component).. to put it briefly, you also have to register your component with the windows registry and a few other things.. anyhow, if ur too lazy to go get a good book on the topic (i have a 1300 page one just on COM and DCOM alone), go to msdn.microsoft.com/library and browse "component development" to get some good tutorials.