I need some help porting a few C items to PB and it's been many
years since I did any significant C programming, so I hope these
questions aren't too dumb (a teacher once told me, "There are no
dumb questions, only dumb students!").
These items are all from a C header file (.h):
The ABC123 is then used in a function prototype like this:
My translation is:
Next problem is what appears to be a linked list; here's the C form:
My PB translation:
When converting C pointer declares, is a DWORD ok for any variable type
or should one use the explicit pointer type, such as 'DOUBLE PTR'? For example:
PB:
Thanks for any and all help!
------------------
Mark Newman
[This message has been edited by Mark Newman (edited March 16, 2001).]
years since I did any significant C programming, so I hope these
questions aren't too dumb (a teacher once told me, "There are no
dumb questions, only dumb students!").
These items are all from a C header file (.h):
Code:
typedef struct ABC123__ { int unused; } FAR* ABC123;
Code:
extern __declspec( dllimport ) HWND SomeFunction(ABC123);
Code:
Declare Sub SomeFunction Lib "SomeLibrary.DLL" Alias "SomeFunction" (dwValue as DWORD)
Code:
typedef struct tag_AnItem { UINT param1; UINT param2; UINT param3; struct tag_AnItem *next; } AnItem;
Code:
Type AnItem param1 As WORD ' Or use DWORD? param2 As WORD param3 As WORD next_oc As DWORD ' Pointer to a structure is a DWORD? End Type
or should one use the explicit pointer type, such as 'DOUBLE PTR'? For example:
Code:
typedef struct { int param1; double *a; double *b; } SomeData;
Code:
Type SomeData param1 As LONG a As DOUBLE PTR ' Does it matter? b As DWORD End Type
------------------
Mark Newman
[This message has been edited by Mark Newman (edited March 16, 2001).]
Comment