🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: DllMain vs DllEntryPoint

#4134
From: JF Jolin
Date: Thu, 09 Mar 2006 05:30
28 lines
2155 bytes
9 Mar 2006 02:38:36 +0100, nicolasr <nicolasrNOSPAMATSIGNgmx.net> wrote:

> thanks for your reply!
> However, I think I do not quite understand the distinction you make.
> My DLL is a COM in-process server. But does instantiating a COM
> server not result in a call to LoadLibrary() finally?
> I tested the DLL in a COM environment and now also called LoadLibrary()
> on it myself. In both cases my DllMain() is not called :-(

I made an assumption that a COM server always pass by a DllMain entry point.
That was based on Win32 Prog. Ref. under Structuring a Namespace Extension:

As a reminder, the construction of an in-process server DLL requires the
implementation of a DLL that exports the following functions:
DllMain DllGetClassObject DllUnloadNow

That was reinforced by the fact that i use such a DLL with the following declaration.
extern "C" int WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved)
Which is more a C declaration than a C++.

But i also found on http://tinyurl.com/oecsq

DllMain() is not the entry point in a C++ DLL, DLLEntryPoint() is.  (Remy Lebeau)

Sorry for the misleading.

-- 
JF Jolin
Technical Details
Message-ID: <ops54r88pbz6rw7b@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news4.google.com!news.glorb.com!news-out2.kabelfoon.nl!newsfeed.kabelfoon.nl!bandi.nntp.kabelfoon.nl!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <440afc9e@newsgroups.borland.com> <ops53ry5hgz6rw7b@newsgroups.borland.com> <440f871c$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,ca089694a98ab44b
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: DllMain vs DllEntryPoint
References: <440afc9e@newsgroups.borland.com> <ops53ry5hgz6rw7b@newsgroups.borland.com> <440f871c$1@newsgroups.borland.com>
Message-ID: <ops54r88pbz6rw7b@newsgroups.borland.com>
Content-Type: text/plain; charset=iso-8859-15; format=flowed
From: JF Jolin <jfj@nospam.com>
MIME-Version: 1.0
Date: Thu, 09 Mar 2006 00:30:34 -0500
User-Agent: Opera7.11/Win32 M2 build 2887
NNTP-Posting-Host: 66.158.146.130
X-Trace: newsgroups.borland.com 1141882271 66.158.146.130 (8 Mar 2006 21:31:11 -0700)
Lines: 28
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news4.google.com!news.glorb.com!news-out2.kabelfoon.nl!newsfeed.kabelfoon.nl!bandi.nntp.kabelfoon.nl!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail