I'm attempting to convert some C/C++ function declarations to PB and my
C/C++ is very very rusty. There are some things I don't understand, for
starters the following typedef statements:
///*************************
// TYPE Declarations
///*************************
typedef ALGproject;
typedef ALGalign;
typedef ALGpnt;
typedef ALGvpnt;
typedef ALGtopnt;
typedef ALGele;
I thought "typedef" also required a data type like int, double etc. as part of the syntax. Is this an assumed data type of "int"?
Here's a function declaration line:
nativeCode int stdcall scadSDK_cogoGetProjects( ALGproject **prjs, int *cnt );
I understand "*cnt" is a pointer of type int, but "**prjs" is a pointer(???) of type ALGproject??? How can this be when ALGproject has not been declared as a specific data type or struct? The VB declarations I also received with the C/C++ files declare both "prjs" and "cnt" as long. So would I be correct in declaring this function in PB as:
Declare Function scadSDK_cogoGetProjects Lib "SCadSDKMK" ALIAS "scadSDK_cogoGetProjects" _
(BYVAL pProject as PTR, BYVAL pCount as PTR) as Long
Am I on the right track here?
JR
My ability in C/C++ translation is average at best. I suggest that you post your query over on the PowerBASIC forum. There are lots of C gurus over there.