A
andrea
Hi guys!
We have this problem that both in the VB5 IDE (debug-mode) and in our
Access-modules the calling of a DLL behaves strange. Once a VB-App is
converted to an executable, things are fine.
Alas, that won't do in our access-stuff :-(
I included the basic DLL declarations, so you see it IS a standard DLL
and works fine otherwise:
########################
library PGP;
uses
SysUtils,
Classes,
RSADecode;
Type PBuffer = array[0..254] of char;
----------------------
function Decode(var aEncBuff
Buffer;var len:integer;Pfad
char;
Filename
char):integer; stdcall;
begin
result:=doSomething(aEncBuff,len,Pfad,filename,false);
end;
-----------------------
function Decode_Scrambled(var aEncBuff
Buffer;var
len:integer;Pfad
char;
Filename
char;Scrambled:boolean):integer;stdcall;
begin
result:=Dosomething(aEncBuff,len,Pfad,Filename,Scrambled);
end;
exports Decode, decode_scrambled;
begin
end.
##########################
Now this is how we declare the external function in Access:
Declare Function Decode Lib "PGP.dll" Alias "Decode" (ByVal PBuffer As
String, ByRef Laenge As Integer, ByVal Pfad As String, ByVal Filename
As String) As Integer
sub something
dim sfile as string, spfad as string, sbuffer as string * 255
dim iretc as integer, ilen as integer
sbuffer=string(255, vbnullchar)
sfile="keyfile.key"
spfad="<valid path to keyfile.key>"
sbuffer="<encrypted string>"
ilen=<length of encrypted string>
' AND HERE IT COMETH: (and fails miserably)
iretc=Decode(sbuffer, ilen, sfile, spfad)
end sub
#########################
sometimes it works, most times it won't. We have NO idea whatsoever,
so we humbly come to ask for help.
TIA
Andrea ([email protected] - remove 'nospam')
We have this problem that both in the VB5 IDE (debug-mode) and in our
Access-modules the calling of a DLL behaves strange. Once a VB-App is
converted to an executable, things are fine.
Alas, that won't do in our access-stuff :-(
I included the basic DLL declarations, so you see it IS a standard DLL
and works fine otherwise:
########################
library PGP;
uses
SysUtils,
Classes,
RSADecode;
Type PBuffer = array[0..254] of char;
----------------------
function Decode(var aEncBuff
Filename
begin
result:=doSomething(aEncBuff,len,Pfad,filename,false);
end;
-----------------------
function Decode_Scrambled(var aEncBuff
len:integer;Pfad
Filename
begin
result:=Dosomething(aEncBuff,len,Pfad,Filename,Scrambled);
end;
exports Decode, decode_scrambled;
begin
end.
##########################
Now this is how we declare the external function in Access:
Declare Function Decode Lib "PGP.dll" Alias "Decode" (ByVal PBuffer As
String, ByRef Laenge As Integer, ByVal Pfad As String, ByVal Filename
As String) As Integer
sub something
dim sfile as string, spfad as string, sbuffer as string * 255
dim iretc as integer, ilen as integer
sbuffer=string(255, vbnullchar)
sfile="keyfile.key"
spfad="<valid path to keyfile.key>"
sbuffer="<encrypted string>"
ilen=<length of encrypted string>
' AND HERE IT COMETH: (and fails miserably)
iretc=Decode(sbuffer, ilen, sfile, spfad)
end sub
#########################
sometimes it works, most times it won't. We have NO idea whatsoever,
so we humbly come to ask for help.
TIA
Andrea ([email protected] - remove 'nospam')