Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

COM Object without registration

Posted on 1998-08-17
4
Medium Priority
?
254 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 80 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

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

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…
This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
Suggested Courses

885 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