🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #11479

Re: fetch commando argument - multiple files

#11479
From: Remy Lebeau (TeamB)
Date: Thu, 05 Feb 2004 18:57
40 lines
2713 bytes
"nik" <neusser@okstate.edu> wrote in message
news:40227a8e@newsgroups.borland.com...

> so far so good. My dll is working as it should.
> But I have to load the dll first using BCB->Run->RegisterActiveXServer

Yes, the DLL needs to be registered in order for the OS to find it.  It is
the responsibility of the DLL to export a DllRegisterServer() function
(amongst a few others), which then sets up the necessary "InProcServer32"
value (and others) that tells the OS where your DLL is located when it needs
to find it.

> Can I write my own application, that registers AND unregisters the dll?

You don't need to write your own application for that.  The OS already has
one - REGSVR32.

If you want to write your own, though, then simply load the DLL via the
LoadLibrary() function, use GetProcAddress() to find the exported
DllRegisterServer() and DllUnregisterServer() functions, and then call them
when needed.

> Is there a way to temporarily register my ShellExtension
> without using any registry entries?

No, because the Shell makes use of the Registry to know what it is supposed
to load and when.

> I would like the user to determine at startup if he wants to use
> my extensions or not. Probably using a AutoRun entry.

Then you have to register/unregister your DLL when appropriate.

The alternative is to keep the DLL registered always, and then set up your
own Registry value separately that the DLL checks when called to determine
if it should actually do anything or just return immediately.


Gambit
Technical Details
Message-ID: <4022906e$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <401dd9bc@newsgroups.borland.com> <401deae8@newsgroups.borland.com> <40200434$1@newsgroups.borland.com> <40201123@newsgroups.borland.com> <402023c1@newsgroups.borland.com> <40202ef8@newsgroups.borland.com> <40227a8e@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,5c52809e13a7bad5
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2004-02-05 11:10:22 PST
From: "Remy Lebeau \(TeamB\)" <gambit47.no.spam@no.spam.yahoo.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <401dd9bc@newsgroups.borland.com> <401deae8@newsgroups.borland.com> <40200434$1@newsgroups.borland.com> <40201123@newsgroups.borland.com> <402023c1@newsgroups.borland.com> <40202ef8@newsgroups.borland.com> <40227a8e@newsgroups.borland.com>
Subject: Re: fetch commando argument - multiple files
Date: Thu, 5 Feb 2004 10:57:40 -0800
Lines: 42
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
NNTP-Posting-Host: 67.22.138.253
Message-ID: <4022906e$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1076007022 67.22.138.253 (5 Feb 2004 10:50:22 -0800)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail