Re: Pointers, DLL Header files and lots of exceptions?
From: Kevin Oleniczak (kevinoleniczak_at_comcast.net)
Date: 08/26/04
- Next message: Geir Baardsen: "TStringgrid - autocalculate"
- Previous message: David Reeve: "Re: Odd behaviur..."
- In reply to: Rob Kennedy: "Re: Pointers, DLL Header files and lots of exceptions?"
- Next in thread: Rob Kennedy: "Re: Pointers, DLL Header files and lots of exceptions?"
- Reply: Rob Kennedy: "Re: Pointers, DLL Header files and lots of exceptions?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 25 Aug 2004 21:25:31 -0500
"Rob Kennedy" <me3@privacy.net> wrote in message
news:2p3q3gFeukt3U1@uni-berlin.de...
> Kevin Oleniczak wrote:
> > DECLSPEC_CLASS int get_values(HANDLE hCom, int* error_count, int*
> > total_count);
>
> You need to look through the header file (and everything it #includes,
> recursively) to figure out what DECLSPEC_CLASS means.
>
> > Here's a snippet of the Delphi unit that wraps it:
> >
> > var get_values: function (hCom: THandle; var error_count: integer; var
> > total_count: integer): integer cdecl {$IFDEF WIN32} stdcall {$ENDIF};
>
> When choosing a calling convention, Delphi uses the last one specified.
> In a Win32 program, cdecl is mentioned before stdcall, so Delphi uses
> stdcall. That's only correct if the DECLSPEC_CLASS macro resolves to
> stdcall, though.
#ifdef LOADER_EXPORTS
#define DECLSPEC_CLASS __declspec(dllexport)
#else
#define DECLSPEC_CLASS __declspec(dllimport)
#endif
This was also near the top of the header file... not sure what this means
though. Again, I'm simply trying to call functions from a dll that basically
enteracts with the serial port to capture data for a specific device.
Not sure if I mentioned it earlier of now, but I have compiler
"Optimization" turned off as well.
Thanks for everyone's help so far. I plan to look into the CPU window debug
data for a while this evening, although It's been a long time since I did
any assembly. Any tutorials online that specifically discuss CPU window
debugging in Delphi would be greatly appreciated.
- Next message: Geir Baardsen: "TStringgrid - autocalculate"
- Previous message: David Reeve: "Re: Odd behaviur..."
- In reply to: Rob Kennedy: "Re: Pointers, DLL Header files and lots of exceptions?"
- Next in thread: Rob Kennedy: "Re: Pointers, DLL Header files and lots of exceptions?"
- Reply: Rob Kennedy: "Re: Pointers, DLL Header files and lots of exceptions?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|