Solved

COM Object without registration

Posted on 1998-08-17
4
240 Views
Last Modified: 2010-04-04
Hi, Experts!
How ñan I use ComObjects without registrations them in Registry?
0
Comment
Question by:DValery
  • 2
4 Comments
 
LVL 8

Expert Comment

by:ZifNab
ID: 1337146
I guess, you can't. At least I don't know of a way. Sorry. Zif.
0
 
LVL 4

Accepted Solution

by:
d003303 earned 20 total points
ID: 1337147
Agreed, it is definately not possible on a higher level. It depends on the kind of implementation.
If you want to use OLE services with the object, the answer is no. If you just want to use the object on your own WITHOUT any calls to OLE32.dll (e.g. marshalling to out-of-process servers), it is possible.

OLE does the following to initiate a COM object:
- looks up the CLSID in the registry and find the corresponding in-process-server where the object resists in (e.g. xyz.dll)
- Calls LoadLibrary to bind to that module (xyz.dll)
- Binds to its exported functions
  DllCanUnloadNow
  and
  DllGetClassObject
- Calls DllGetClassObject to retreive a pointer to the corresponding IClassFactory COM object
- Calls IClassFactory.CreateInstance to get the object

In background, DllCanUnloadNow is permanently called and the module is unloaded when the function succeeds.

Hope this helps,
Slash/d003303
0
 
LVL 1

Author Comment

by:DValery
ID: 1337148
Additional cooment:
I've create Class from Interface and wants to use its without registrations in the registry, it's possible? and as?
0
 
LVL 4

Expert Comment

by:d003303
ID: 1337149
Yes. If you have an instance of the corresponding IClassFactory object, call its CreateInstance with that interface ID.

Slash/d003303
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now