🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Load EXE as DLL.

#12050
From: Ed Mulroy [TeamB]
Date: Wed, 31 Dec 2003 14:27
22 lines
1696 bytes
There are a couple of issues there.

First: a DLL can have a file extension of EXE.  If it actually is an EXE or
a DLL is determined by a bit in the header in the file, not be the file name
extension.

Second: even if it truly is an EXE you can load it with LoadLibrary.
However you will most likely have access violations if you use any memory
from the main program in a function call to it (for instance a char* passed
as a calling argument).

Exports from an executable are most often used by DLL's that the executable
loads, for instance the __CPPdebugHook export that the C++ exception
handling system uses.

.  Ed

> Cactus wrote in message
> news:3ff2ce98@newsgroups.borland.com...
>
> I check my EXE, its have a export table, just like DLL.
> so anyone try load EXE as DLL?
Technical Details
Message-ID: <3ff2dccb$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <3ff2ce98@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,a798b7bafe3b7623
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-12-31 06:39:57 PST
From: "Ed Mulroy [TeamB]" <dont_email_me@bitbuc.ket>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <3ff2ce98@newsgroups.borland.com>
Subject: Re: Load EXE as DLL.
Date: Wed, 31 Dec 2003 09:27:10 -0500
Lines: 24
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.1106
NNTP-Posting-Host: 24.74.175.102
Message-ID: <3ff2dccb$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1072880843 24.74.175.102 (31 Dec 2003 06:27:23 -0700)
X-Authenticated-User: edmulroy
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail