API calls to a native DLL
From: Mali Guven (guvenma_at_hotmail.com)
Date: 11/25/03
- Next message: Graham Powell: "Re: Unicode Filenames"
- Previous message: Jean-Jacques Caillee: "IP address through Citrix"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 25 Nov 2003 09:37:37 -0800
Hi All:
I have written a delphi application which calls a commercial
optimization library distributed in the form of a DLL. I have to pass
one integer and two integer arrays to one of its callable native
functions (named LSloadBasis).
The delphi prototype for the native function is as follows,
//-------------------------
function LSloadBasis (
nModel : Integer;
Var anCstatus : Array of Integer;
Var anRstatus : Array of Integer) : Integer;
stdCall;
external 'lindo2_0.dll';
//-------------------------
I use the following declaration and code fragment to call the native
function
//
anRstat : array[0..2] of Integer;
anCstat : array[0..3] of Integer;
anRstat [0] := 20;
anRstat [1] := 30;
anCstat [0] := 120;
anCstat [1] := 60;
anCstat [2] := 50;
nErr := LSloadBasis(nModel, anRstat, anCstat);
//
During this call, I keep getting a memory exception and my application
terminates. I contacted the company developing the DLL but they do not
provide tech support for language specific issues. Any help would be
truly appreciated.
If it may help, the C/C++ prototype of the native function is given in
official header file distributed by the company is as follows
int CALLTYPE LSloadBasis(pLSmodel pModel,
int *panCstatus,
int *panRstatus);
Thanks in advance.
Mali Guven
- Next message: Graham Powell: "Re: Unicode Filenames"
- Previous message: Jean-Jacques Caillee: "IP address through Citrix"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|