The first thing is to make the dll's it stdcall friendly. :-)
(at least that the state of the art 3 years ago?)

Once upon a time I converted the ddls to be directly usable
by VB. The main problems are decribed below. I have not ported
the changes beyond 0.9.6a, maybe I should retry. A boaring point
was the second one. 

Once you have that, then, well, it is still a pain to set ssl options,
since most 'functions' are actually macros around the general
ctrl interface etc. 

> 
> Hello Erlend,
> 
> I agree that this would be a really nice feature for VB users - not having
> to manually load the DLL and define prototypes and all that complex stuff
> VB doesn't do very easily...just hooking into a type library and having
> immediate access to all the exposed interfaces would be fantastic.
>

>From sylvest Mon Apr 23 17:46:44 2001
To: openssl-dev@openssl.org
Subject: Re: openSSL and Visual basic

> Hi
> 
> I wanted to know if anyone has gotten openSSL to work with visual basic.  If 
> you have, can you please let me know.  It would be greatly appreciated.
> 
> Thanks

Since it happened that last week I was trying to do that for
a project, here the result of some rather q&d hack with a goal to
touch just a minimal number of routines in 0.9.6a 

- The basic approach is to compile the whole stuff with the /Gz option
  in order not to modify the 3000 exported function prototypes.

- All main routines need a  __cdecl main 
  The #define for MAIN, all the *test.c modules, and openssl.c

- The pwd_read routine needs some __cdecl in the declaration of
  signal and a pointer array. 

- in apps/s_socket.c one call to signal needs an addition of __decl
  for socket_cleanup 

- mem.c  needed some treatment with Malloc, Free, Realloc 
  The macro CRYPTO_malloc_init needs some fix, easiest way was
  to call with all parms NULL and tests that in mem.c 
  Goal: allow __stdcall type functions to be passed.

- There are 5 modules that call qsort and 2 that call bsearch.
  Instead of finding all the routines that call them, I copied qsort
  and bsearch into the source from mfc and made them "__stdcall friendly".

  It seems possible to me to aviod that and replace all the _cmp
  functions of stack and set comparisions by __cdecl routines, it
  seems that are not suppoed to be called by applications anyway. 

- The asm routines :
  all declarations either need a __cdecl or the asm routines to be
  modified. With the first option some routines are not callable
  from VB, so be it for the moment. 

All ms\test routines passed. 

I wonder whether one of the friendly developpers would like to work
on this for the 0.9.7 version in one way or another, at least to
minimise the migration effort a bit. 

Peter Sylvester


______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to