Will try this to , thanks for the tip :)
> -----Opprinnelig melding----- > Fra: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] På vegne av > Felipe Monteiro de Carvalho > Sendt: 7. november 2006 12:42 > Til: FPC-Pascal users discussions > Emne: Re: [fpc-pascal] Resending: Trying to convert some C code > > ops .. only now I saw this. > > You don't need to encapsulate the procedure variable inside a > real procedure. You can call a procedure variable, like if it > was a procedure. > > Try this code: > Unit bn; > > {$MODE DELPHI}{$H+} > {$packrecords c} > > interface > > uses ctypes, DynLibs; > > type > bignum_st = record > d: pointer; > dmax: cint; > neg: cint; > flag: cint; > end; > > BIGNUM = bignum_st; > > PBIGNUM = ^BIGNUM; > > TBN_bn2hex = function (a: PBIGNUM): PChar; cdecl; > > var > BN_bn2hex: TBN_bn2hex; > > function InitLib: Boolean; > > implementation > > Function InitLib: boolean; > Begin > LibHandle := LoadLibrary('libeay32.dll'); > Pointer(BnBn2Hex) := GetProcAddress(LibHandle, 'BN_bn2hex'); > result := true; > End; > > end. > _______________________________________________ > fpc-pascal maillist - fpc-pascal@lists.freepascal.org > http://lists.freepascal.org/mailman/listinfo/fpc-pascal > > _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal