Re: linking problem in DPAPI
- From: "bubble" <bubble@xxxxxxxxxxxx>
- Date: Fri, 30 Dec 2005 12:07:36 +0800
a good news.
my guess is wrong.
ld seem can direct linking to a dll...
2nd url,Jerrrey provid.
It said...
<copy from
http://www.redhat.com/docs/manuals/enterprise/RHEL-4-Manual/gnu-linker/win32.html>
direct linking to a dll
The cygwin/mingw ports of ld support the direct linking, including data
symbols, to a dll without the usage of any import libraries. This is much
faster and uses much less memory than does the traditional import library
method, expecially when linking large libraries or applications. When ld
creates an import lib, each function or variable exported from the dll is
stored in its own bfd, even though a single bfd could contain many exports.
The overhead involved in storing, loading, and processing so many bfd's is
quite large, and explains the tremendous time, memory, and storage needed to
link against particularly large or complex libraries when using import libs.
Linking directly to a dll uses no extra command-line switches other than -L
and -l, because ld already searches for a number of names to match each
library. All that is needed from the developer's perspective is an
understanding of this search, in order to force ld to select the dll instead
of an import library.
For instance, when ld is called with the argument -lxxx it will attempt to
find, in the first directory of its search path,
libxxx.dll.a
xxx.dll.a
libxxx.a
cygxxx.dll (*)
libxxx.dll
xxx.dll
</copy from
http://www.redhat.com/docs/manuals/enterprise/RHEL-4-Manual/gnu-linker/win32.html>
after some error.
I have a solution.
I copy crypt32.dll from c:\windows\system32 to project home.
and change pragma (not use Stdcall Calling Convention ).
pragma Import (C, CryptProtectData, "CryptProtectData");
then it work..
I have new question..
in windows SDK document ,the WINAPI declare should mapping to Stdcall.
It's mean who's responsibility to clean stack frame.
http://www.unixwiz.net/techtips/win32-callconv.html
if I use "C" calling conventions in a "WINAPI" funciton , colud system clean
stack twice and cause some problems?
> Well, I meant the dll tools that come with GNAT. Read the user guide.
> It's been a while since I had to do this.
.
- Follow-Ups:
- Re: linking problem in DPAPI
- From: Stephen Leake
- Re: linking problem in DPAPI
- References:
- linking problem in DPAPI
- From: bubble
- Re: linking problem in DPAPI
- From: Stephen Leake
- Re: linking problem in DPAPI
- From: bubble
- Re: linking problem in DPAPI
- From: Stephen Leake
- linking problem in DPAPI
- Prev by Date: Re: SBIRS, Ada and Ignorance
- Next by Date: Giove-A
- Previous by thread: Re: linking problem in DPAPI
- Next by thread: Re: linking problem in DPAPI
- Index(es):
Relevant Pages
|