linking problem in DPAPI



dear all:
I got a problem again :)

I am write a little security binding for my application.
and I got a error message.
.....app.o(.text+0x3914):app.adb: undefined reference to
`CryptProtectData@28'

what's the problem?
give me a hint. thanks
my compiler is [gnat gpl 2005] and my OS is windows xp.



with Win32;
With Win32.Windef;

package app.Security Is


type Data_Blob is record
Cbdata : Win32.DWORD;
Pbdata : Win32.PBYTE;
end record;
Pragma Convention(c_pass_by_copy,Data_Blob);

Type Access_Data_Blob Is Access All Data_Blob;

Type CRYPTPROTECT_PROMPTSTRUCT Is Record
Cbsize:Win32.Dword;
DwPromptFlags:Win32.DWord;
Hwandapp:Win32.Windef.Hwnd;
SzPrompt:Win32.Lpcwstr;
End Record;
Pragma Convention(c_pass_by_copy,CRYPTPROTECT_PROMPTSTRUCT);
Type Access_CRYPTPROTECT_PROMPTSTRUCT Is Access All
CRYPTPROTECT_PROMPTSTRUCT;


Function CryptProtectData(Pdatain:Access_Data_Blob;
SzDataDescr:Win32.Lpcwstr;
POptionalEntropy:Access_Data_Blob;
PvReserved:Win32.Pvoid;
pPromptStruct
:Access_CRYPTPROTECT_PROMPTSTRUCT;
dwFlags :Win32.Dword;
Pdataout:Access_Data_Blob) Return Win32.Bool;
Pragma Import(Stdcall,CryptProtectData,"CryptProtectData");
Pragma Linker_Options("-lcrypt32");




end app.Security;


.



Relevant Pages

  • Re: mplayer fails to build
    ... multimedia/mplayer fails to build with this error message, ... undefined reference to `libintl_bindtextdomain' ... Either libintl or the libintl gettext tie-in isn't compiled/installed ...
    (freebsd-questions)
  • 2.6.10 compile error - blackbird_load_firmware
    ... I get the following error message when I try to compile the new ... : undefined reference to `request_firmware' ... send the line "unsubscribe linux-kernel" in ...
    (Linux-Kernel)
  • Re: Emacs pretest 24.3.93
    ... build process aborts with the following error message: ... sysdep.c:2115: undefined reference to `backtrace' ...
    (comp.os.msdos.djgpp)
  • Re: mplayer fails to build
    ... multimedia/mplayer fails to build with this error message, ... undefined reference to `libintl_bindtextdomain' ... Either libintl or the libintl gettext tie-in isn't compiled/installed ...
    (freebsd-questions)
  • Re: OpenGL with Windows 7
    ... Now I get the error message: Undefined reference to __glutCreateMenuWithExit ... You've got to fight windows linkers to some extent. ...
    (comp.lang.c)