Solved

COM Object without registration

Posted on 1998-08-17
4
246 Views
Last Modified: 2010-04-04
Hi, Experts!
How ñan I use ComObjects without registrations them in Registry?
0
Comment
Question by:DValery
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

738 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