From: "bubble" <bubble@riskm.com.tw>
Subject: Re: linking problem in DPAPI
Date: Tue, 3 Jan 2006 15:10:40 +0800
Date: 2006-01-03T15:10:40+08:00 [thread overview]
Message-ID: <dpd81q$a9i$1@netnews.hinet.net> (raw)
In-Reply-To: dp2bqc$hn5$1@netnews.hinet.net
> 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 can invoke the CryptProtectData,CryptUnprotectData and get a output.
then it will crash after executing some statement.
the result is in expect and bad.
and I have test
pragma Import (Stdcall, CryptProtectData,
"CryptProtectData","CryptProtectData");
and still fail in linking.
crypt functions loading by loadLibrary and GetProcAddress have some strange
behaviors ,I am still in testing.
a document from MS has explain calling convention more.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vclang/html/_core_Calling_Conventions_Topics.asp
I don't the understand the reason why MS need 2 different " STDCALL "
calling convention.
(maybe MS's programers confused or they using special naked function call in
security issuse)
If MS really want 2 stdcall, they should be name stdcall and stdcall2 or
something.
the problem should forward to MS news group.
It's not ada compiler or linker problem... :(
if therer is no way to remove @xxx in function suffix,
may be I can add "esp register adjust" patch code after calling crypt
family functions. :(
> 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.
>
>
next prev parent reply other threads:[~2006-01-03 7:10 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-12-28 9:15 linking problem in DPAPI bubble
2005-12-28 12:28 ` Stephen Leake
2005-12-29 4:19 ` bubble
2005-12-29 13:39 ` Jeffrey Creem
2005-12-29 21:38 ` Stephen Leake
2005-12-30 4:07 ` bubble
2005-12-31 12:56 ` Stephen Leake
2005-12-31 14:32 ` Pascal Obry
2006-01-03 7:10 ` bubble [this message]
2006-01-03 11:22 ` Stephen Leake
2005-12-29 6:23 ` bubble
2005-12-29 21:37 ` Stephen Leake
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox