[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ms-cryptoapi
Subject:    Re: WINAPI or not to WINAPI?
From:       Mark Stanley <mstanley () MICROSOFT ! COM>
Date:       1997-01-23 20:49:04
[Download RAW message or body]


You should definitely use WINAPI (which currently resolves to _stdcall).
 Failure to do this will probably cause the calling convention to default
to _cdecl which will corrupt the stack pointer (since neither the caller
nor the callee will adjust the stack pointer at the completion of the
call).
You are correct that the cryptoapi cannot handle csp's with its api's
exported with decoration, since the csp's api's addresses are discovered
dynamically at run-time via the non-decorated names.  You should export
them as you did via a def file, or alternatively via the msvc linker's
/export switch (e.g. -export:CPAcquireContext).

~ Mark
-----Original Message-----
From:   Bronislav Kavsan [SMTP:bkavsan@IRE-MA.COM]
Sent:   Thursday, January 23, 1997 10:03 AM
To:     CryptoAPI@LISTSERV.MSN.COM
Subject:        WINAPI or not to WINAPI?

Page 6 of CSP Programmers Guide has a Note: Allof these [CP*] functions
must be declared with the WINAPI key word.

BUT!!! 1) this declaration causes decorating of export names, which
advapi32.dll cannot handle...so I used
             good-old .def file to export WINAPI-ed names... (ugly)

        2) the rest of the guide doesn't use WINAPI in declaration of these
functions.

        So.... WINAPI or not to WINAPI?

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic