David Cornelius wrote: > Thomas, > > Your response raises a question in me. You say that the only way to make > calls to OpenSSL from Delphi is through a DLL written C/C++. I'm curious > why you say that. > > It is my understanding that Delphi has directives to make its compiled code > look and act just like C/C++. You can reverse the way procedure parameters > are put on the stack to look list C. You can use null-terminated strings > like C. You can even drop to assembly if you must. Indeed, all Windows > APIs are written in C/C++/Asm and Delphi is a huge collection of Pascal > interfaces to those APIs. > > How is the OpenSSL library different from all those?
Macros and structures. I suppose you could expand the macros in Delphi, but the macros have this tendency to change between versions of OpenSSL, so every version of OpenSSL that comes out would have to be carefully analyzed to make sure nothing is broken when you compile the next time. The structures can also change, but usually you don't have to recompile C/C++ code except for breaking changes. The only danger with the structures is if you access the members directly. Mostly it is just the macros that cause problems. Also, the .h files use a lot of #define's. OpenSSL's source code is a mess when it comes to anything other than C/C++ (IMO). This is also why VB and .NET users don't interface directly with OpenSSL and most people use specialized intermediate DLLs written in C or C++ to interface with OpenSSL. Someone built a Delphi interface to OpenSSL called 'MySSL', but the website is long gone. So, it probably CAN be done but would take an inordinate amount of effort to do so. Basically, the OpenSSL developers really didn't anticipate cross-language needs. A COM DLL written in C++ that implements IDispatch and exports every call from OpenSSL would probably solve a lot of the problems people experience and simplify coding efforts, but I brought that up on the openssl-users list a while back and it got shot down for some reason. -- Thomas Hruska CubicleSoft President Ph: 517-803-4197 Safe C++ Design Principles (First Edition) Learn how to write memory leak-free, secure, stable, portable, and user-friendly software. Learn more and view a sample chapter: http://www.CubicleSoft.com/SafeCPPDesign/ ------------------------ Yahoo! Groups Sponsor --------------------~--> See what's inside the new Yahoo! Groups email. http://us.click.yahoo.com/3EuRwD/bOaOAA/yQLSAA/i7folB/TM --------------------------------------------------------------------~-> ----------------------------------------------------- Home page: http://groups.yahoo.com/group/delphi-en/ To unsubscribe: [EMAIL PROTECTED] Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/delphi-en/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/delphi-en/join (Yahoo! ID required) <*> To change settings via email: mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/

