The following is a "C" type structure define, followed by my (un)educated guesses as to what it translates to...
C Code:
typedef struct st_ServerRecord {
const char *className;
const char *name;
ActivateFunc *activate;
ServerTagInfo *tagInfo;
} ServerRecord;
** Note: "activate" is a FUNCTION, "tagInfo" is another TYPE also defined elsewhere in the code.
PowerBasic(?):
TYPE ServerRecord
className AS ASCII PTR
name AS ASCII PTR
ActivateFunc AS activate PTR
ServerTagInfo AS tagInfo PTR
END TYPE
The only 'translation' I feel remotely comfortable with is the "ServerTagInfo AS tagInfo PTR". The ASCII PTR is simply a guess on my part; looking at it more & more, I'm increasingly convinced that I got that one wrong-- Maybe its wanting to define $string constants based on the sting data located at "*..." (?)
Since "activate" is a coded function, could the CODEPTR-function work here?
I've spent the last 16+ hours looking just at these six lines of code, and quite honestly, I'm feeling more lost than when I started this yesterday.
Any help on this would be GREATLY appreciated!
Sincerely,
Scott Martindale
[This message has been edited by Scott Martindale (edited July 27, 2001).]
C Code:
typedef struct st_ServerRecord {
const char *className;
const char *name;
ActivateFunc *activate;
ServerTagInfo *tagInfo;
} ServerRecord;
** Note: "activate" is a FUNCTION, "tagInfo" is another TYPE also defined elsewhere in the code.
PowerBasic(?):
TYPE ServerRecord
className AS ASCII PTR
name AS ASCII PTR
ActivateFunc AS activate PTR
ServerTagInfo AS tagInfo PTR
END TYPE
The only 'translation' I feel remotely comfortable with is the "ServerTagInfo AS tagInfo PTR". The ASCII PTR is simply a guess on my part; looking at it more & more, I'm increasingly convinced that I got that one wrong-- Maybe its wanting to define $string constants based on the sting data located at "*..." (?)
Since "activate" is a coded function, could the CODEPTR-function work here?
I've spent the last 16+ hours looking just at these six lines of code, and quite honestly, I'm feeling more lost than when I started this yesterday.
Any help on this would be GREATLY appreciated!
Sincerely,
Scott Martindale
[This message has been edited by Scott Martindale (edited July 27, 2001).]
Comment