Article View: borland.public.cppbuilder.nativeapi
Article #11629Re: Creating a Message File (for Event Log)
From: Ed Mulroy [TeamB]
Date: Mon, 26 Jan 2004 16:33
Date: Mon, 26 Jan 2004 16:33
54 lines
2739 bytes
2739 bytes
> That worked. But then Im supposed to do this:
> link -dll -noentry -out:filename.dll filename.res
To build using directions for doing things with Microsoft tools then you
must have those tools.
A DLL, all DLL's, have at least one function in them because that function
is required for Windows to load the DLL. The DLL is built by the linker
from the startup code, the runtime libraries, the code containing that
function and optionally also from a compiled resource file.
Assume this is contained in a source file called s.cpp
-------------------
#include <windows.h>
int WINAPI DllEntryPoint(HINSTANCE, unsigned long, void*)
{
return 1;
}
-------------------
Compile to an object file like this:
bcc32 -RT- -x- -WD -c s
Assuming that the compiled resource file is r.res and the DLL name is to be
dllname.dll then link with this command:
ilink32 /Tpd/aa/Gn/x/c c0d32 s,dllname,,noeh32 import32 cw32,,r.res
IF the DLL is only going to be used on a machine where the compiler has been
installed then you could dynamic link it to make the DLL smaller. You can
do that by using these lines instead:
bcc32 -RT- -x- -WR -WD -c s
ilink32 /Tpd/aa/Gn/x/c c0d32 s,dllname,,noeh32 import32 cw32i,,r.res
. Ed
> Mattias wrote in message
> news:401539c6@newsgroups.borland.com...
>
> But my problem is not to get a res file. I managed that step.
> My problem is to make a dll out of the res file.
>
> The msdn library tells me to create the rc file with:
> rc -r -fo filename.res filename.rc
>
> That worked. But then Im supposed to do this:
> link -dll -noentry -out:filename.dll filename.res
>
> And that doesnt work. It doesnt recognize link. How should
> it be done?
Technical Details
Message-ID:
<4015416b$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<40113b96$1@newsgroups.borland.com> <40114796$1@newsgroups.borland.com> <401539c6@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,cade217efb643bcc X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2004-01-26 08:43:20 PST From: "Ed Mulroy [TeamB]" <dont_email_me@bitbuc.ket> Newsgroups: borland.public.cppbuilder.nativeapi References: <40113b96$1@newsgroups.borland.com> <40114796$1@newsgroups.borland.com> <401539c6@newsgroups.borland.com> Subject: Re: Creating a Message File (for Event Log) Date: Mon, 26 Jan 2004 11:33:36 -0500 Lines: 56 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: <4015416b$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1075134827 24.74.175.102 (26 Jan 2004 08:33:47 -0700) X-Authenticated-User: edmulroy Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail