Hi all

I am callin a DLL(not a delphi one) using the following code

Type
TGetData = function(Text:LPSTR):integer; cdecl;
var
LibHandle :Thandle;
GetData : TGetData;
Retval :Integer;
begin
LibHandle := LoadLibrary('QBINT32');
try
   if LibHandle = 0 then begin
      Showmessage('Unable to load Dll');
      exit;
      end;
    @GetData := GetProcAddress(libhandle, 'ExportQbwData');


    if @GetData <>nil then begin
    RetVal:= GetData(pChar('D:\qBnz\qbdata\IanFear.QBW'));
        ShowMessage('return  '+ inttostr(retVal));
        end else
        RaiseLastWin32Error;

    finally
    Freelibrary(libHandle);
   end;
   end; 

It runs perfectly but at the end I get the following error message
"Application defined exception (code 0xc0000027) at 0xbff852f
8B 45 08 8D 4D E4 51 89 7D E4 89 45"

and the disassembly pane is displayed.
it is runing on a stand alone machine and the thread window shows 
only one thread the Dll it calls runs another program and does a 
data extraction which works fine.

any help greatly appreciated and thanks for your time in reading 
this 

Ian Fear
1427 Te Kopia rd
RD 1
Rotorua
New Zealand
Phone 64 7 333 1548
Fax 64 7 333 2548
mob 025 742 772
[EMAIL PROTECTED]
GMT +1200
http://mysite.xtra.co.nz/~IJFear/
---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz

Reply via email to