Article View: borland.public.cppbuilder.nativeapi
Article #11633Re: Creating a Message File (for Event Log)
From: Mattias Carleson
Date: Mon, 26 Jan 2004 21:32
Date: Mon, 26 Jan 2004 21:32
64 lines
3041 bytes
3041 bytes
Thankyou! Now I�ve got my dll file.
/Mattias
"Ed Mulroy [TeamB]" <dont_email_me@bitbuc.ket> skrev i meddelandet
news:4015416b$1@newsgroups.borland.com...
> > 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:
<40158777@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed00.sul.t-online.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> <4015416b$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII X-Google-Thread: 10cc67,cade217efb643bcc X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2004-01-26 13:40:56 PST From: "Mattias Carleson" <aa@bb> Newsgroups: borland.public.cppbuilder.nativeapi References: <40113b96$1@newsgroups.borland.com> <40114796$1@newsgroups.borland.com> <401539c6@newsgroups.borland.com> <4015416b$1@newsgroups.borland.com> Subject: Re: Creating a Message File (for Event Log) Date: Mon, 26 Jan 2004 22:32:38 +0100 Lines: 66 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 NNTP-Posting-Host: 213.242.183.183 Message-ID: <40158777@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1075152759 213.242.183.183 (26 Jan 2004 13:32:39 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail