Top.Mail.Ru Yandeks.Metrika
Forum: "Main";
Current archive: 2004.12.12;
Download: [xml.tar.bz2];


There is a description of functions in C ++, how to properly describe in Delphi? Find similar branches

jiran   (2004-11-30 15:15) [0]

There is a description of functions in C ++
gc_Openex (LINEDEV * linedev, char * devicename, int mode, void * usrattr);
- The function is called from dll, there is a description only but C ++, but you need to contact from delphi, I'm trying to describe:
gc_Openex (LINEDEV: Pointer, devicename: array of char, mode: Integer; userattr: Pointer);
And along the way, this is not right! Help pliz how to describe this function on Delphi correctly?
From C ++ code it is called as:
gc_Openex (& port [index] .ldev, port [index] .devname, 1, (void *) & port [index])
Help pliz, otherwise I'm burning!

KSergey ©   (2004-11-30 15:31) [1]

gc_Openex (var linedev: LINEDEV; devicename: PChar; mode: Integer; var userattr);

KSergey ©   (2004-11-30 15:32) [2]

Have you ever tried to use it in a dolphy, to be honest? And then the one you quoted "for a dolphin" will not even compile ...

han_malign ©   (2004-11-30 15:48) [3]

considering that neither the type of the returned result nor the layout is specified (I suspect cdecl so) - then you can still guess for a long time ...

jiran   (2004-11-30 15:56) [4]

The example compiles, I just don’t know C ++, but I have to do it.
I also have a question, another function in C ++ is described as:
typedef struct { long magicno; unsigned long flags; void * evtdatap; long evtlen; long evtdev; long evttype; LINEDEV linedev; CRN crn; void * extevtdatap; void * usrattr; int cclibid; int rfu1; } METAEVENT, * METAEVENTP; // Function int gc_GetMetaEvent (METAEVENT * metaeventp);
The function must populate the METAEVENT structure.
What am I trying to do (most likely wrong, pliz help)

type METAEVENT = record magicno: Longint; flags: Longword; evtdatap: Pointer; evtlen: Longint; evtdev: Longint; evttype: Longint; linedev: LINEDEV; crn: CRN; extevtdatap: Pointer; usrattr: Pointer; cclibid: Integer; rfu1: Integer; end; type METAEVENTP = ^ METAEVENT; // I describe it as function gc_GetMetaEvent (var metaeventp): Integer; // And try to use as gc_GetMetaEvent (@metaevnt);

And the structure is filled with complete nonsense, think me pliz.

jiran   (2004-11-30 15:58) [5]

By layout:

function gc_OpenEx (var linedev: linedev; devicename: PChar; mode: Integer; var usrattr): Integer; cdecl; external "c: \ Program Files \ Dialogic \ LIB \ libgc.dll" name "gc_OpenEx"; function gc_GetMetaEvent (var metaeventp): Integer; external "c: \ Program Files \ Dialogic \ LIB \ libgc.dll" name "gc_GetMetaEvent";

Pages: 1 whole branch

Forum: "Main";
Current archive: 2004.12.12;
Download: [xml.tar.bz2];


Memory: 0.56 MB
Time: 0.052 c
2004-11-24 16:04
Where to find

2004-11-09 18:59
Add, get the value of the array field ...... HOW?

Just joe
2004-11-14 03:16
MySQL & amp; dbExpress

2004-12-01 06:49
How to make fixed columns in DBGrid-e

2004-11-26 08:35
Question on TreeView

afrikaans albanian Arabic armenian azerbaijani basque belarusian bulgarian catalan Chinese (Simplified) Chinese (Traditional) croatian Czech danish Dutch English estonian filipino finnish French
galician georgian German greek haitian Creole hebrew Hindi hungarian icelandic indonesian Irish italian Japanese Korean latvian lithuanian macedonian malay maltese norwegian
persian polish portuguese Romanian russian serbian slovak Slovenian Spanish swahili Swedish thai turkish Ukrainian urdu vietnamese welsh yiddish bengali bosnian
cebuano Esperanto gujarati hausa hmong igbo javanese kannada Khmer lao latin maori marathi mongolian nepali punjabi somali tamil telugu yoruba
English French German Italian Portuguese Russian Spanish