Re: Translating c headers to Delphi
From: Pawel (thejaffe21_at_hotmail.com)
Date: 01/20/04
- Next message: Avatar Zondertau: "Re: Translating c headers to Delphi"
- Previous message: Patrick: "Re: Translating c headers to Delphi"
- In reply to: Avatar Zondertau: "Re: Translating c headers to Delphi"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 20 Jan 2004 11:42:42 -0500
I tried to avoid pointers but i got a runtime error when i tried making a
call
this seemed to work
function getReference(Channel:integer; Polar: Pointer): longInt; stdcall;
external 'sws15100.dll';
i was able to get the propper number from the returned longInt but now im
having a problem with
getILTrace(unsigned short chID, double *plamData, double *ppowData, unsigned
short dataZise, short *pola);
where plambData and ppowData are suposed to be pointers to arrays of double.
This is the call right now.. im not sure if im using the dll wrong or if im
making the call wrong
*********************************************************
wave : array[1..17000] of Double;
pow : array[1..17000] of Double;
tempInt := getILTrace(3,@wave,@pow,tempInt,@pasvar);
*********************************************************
it seems to make the call though i get an error message back via tempInt
im just really not sure if im using the @ right here..
pawel
"Avatar Zondertau" <avatarzondertau@hotmail.com> wrote in message
news:400d5601$1@newsgroups.borland.com...
> > Right now my main problem is with this header:
> >
> > Int getReference(unsigned short chID, short *pola);
> >
> > I'm not quite sure how to use pointers in Delphi. Thus, I am not sure
how
> to
> > translate that header. I have been able to use method pointers but never
> > anything to variables.
>
> Delphi helps you avoiding using pointers:
>
> function getReference(chID: Word; var pola: SmallInt): Integer;
>
> Don't forget using the appropriate calling convention (either stddcall or
> cdecl)
>
>
- Next message: Avatar Zondertau: "Re: Translating c headers to Delphi"
- Previous message: Patrick: "Re: Translating c headers to Delphi"
- In reply to: Avatar Zondertau: "Re: Translating c headers to Delphi"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|