Smart questions
Smart answers
Smart people
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Tek-Tips
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

LINK TO THIS FORUM!

Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

Partner With Us!

"Best Of Breed" Forums Add Stickiness To Your Site
Partner Button
(Download This Button Today!)

Feedback

"...My thanks to the contributors who freely share their knowledge and enthusiasms. This forum restores some measure of my faith in human nature..."

Geography

Where in the world do Tek-Tips members come from?
isaisa (Programmer)
27 Apr 04 3:12
Hi All,
 I am a beginner to COM. I was going throgh the COM book. i have some confusion in my mind. i understood that the component can be implemented as an out of process or in process servers. In case of COM implemented as DLL, the COM object uses client's address space.
 So how it is different from normal DLL. Meaning if i am given normal DLL and one COM DLL, how do i differentiate looking at both of them ....

thanks in advance
sanjay

B00gyeMan (Programmer)
27 Apr 04 4:57
Why would you need to differentiate them?

The COM DLL:
 - exports a DllRegisterServer and DllUnregisterServer methods which register your COM component into system registry (context associations if needed, path to library, server type (inprocess, out-of-process or out-of-machine (DCOM only)) and much more stuff. Check the MSDN ;)
 - you can register the COM dll by issuing a command like "regsvr32 <your_module.dll>" in a console. Make sure that <your_module.dll> is in the current directory so that regsvr32 can load it (it basically calls DllRegisterServer). To unregister it issue something like "regsvr32 /u <your_module.dll>" with same considerations as for registration (unregistering means that regsvr32 calls DllUnregisterServer - hence the need that these two method exist and perform some specific actions).

Usually you do not have to manually implement the two methods, they are generated at compile time by means of MIDL (Microsoft Interface Definition Language).

Usually registering a server means more than calling DllRegisterServer: setting the registry so that the CLSID (Class ID) is associated with your module is one of very important thing; setting the security permission for COM objects; setting the COM server type; specifying the exposed interfaces; specifying the marshalling type and its interfaces and much more...

Check the MSDN for more infos.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Back To Forum

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close