Solved

COM Object without registration

Posted on 1998-08-17
4
250 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

Independent Software Vendors: 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

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…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Suggested Courses
Course of the Month5 days, 1 hour left to enroll

636 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