Hi,
I have a C DLL witch I have to use. There is a function inside this DLL that
requires a **short.
Header:
typedef struct ZONING_RAWDATA
{
unsigned long triplet; /* Triplet for raw Data */
short **sheetXY; /* Array of Lenght colum and Width lines */
}ZONING_RAWDATA;
unsigned short ZONING_GetRawData(char * PlanName,
ZONING_PLAN
Plan,
short
NumberOfZone,
short Triplet,
ZONING_RAWDATA *
Rawdata,
double *
Probability);
C code for using the function:
RawData.sheetXY=(short **) malloc(50*sizeof(short*));
for (i=0;i<50;i++)
{
RawData.sheetXY[i]=(short *) malloc(100*sizeof(short));
}
_result = ZONING_GetRawData(PlanName,Plan,1,Triplet,&RawData,
&Probability);
-----------------------------
As you can see, I need a solution for representing "short **sheetXY" and for
"unsigned long triplet" witch are inside the struct ZONING_RAWDATA.
I know allocation is not a problem, I just want what type should I use for
both struct elements and if the recommended type have some tricky code do
get and set data, please, write this trick code too.
Now for the C enum, I have this enumeration:
typedef enum Action {
ADD_PLAN = 0, /* Add Plan */
MODIFY_PLAN = 1, /* Modification */
DELETE_PLAN = 2, /* Deletion */
ADD_ZONE = 3, /* Add Zone */
MODIFY_ZONE = 4, /* Modify or Delete Zone */
} Action;
How can I represent it?
I'm kind of desperate, so thanks a lot for any help you can provide.
Roberto M. Cavalcante