Announcement
Collapse
No announcement yet.
C struct conversion question
Collapse
X
-
ASCIIZ PTR is correct, DWORD or LONG could also be used also but it depends whether you will be referencing the string content of the pointer (@lpszName) after assignment, in which case you'd need ASCIIZ PTR.
-
Personally I'd go with ASCIIZ PTR.
But you may use whatever you want, as long as the VALUE of that member ( a 32-bit integer) represents the address of a null-terminated string and you make your assignments in a manner consistent with your datatype choice.
Leave a comment:
-
C struct conversion question
Sorry for the basic question here folks. It's been a while and wheels are turning slowly this morning.
I'm translating a header file and have the following structure:
Code:'typedef struct ss_ct_createeditorcontrol_args '{ ' LPTSTR lpszName; // in: name of custom celltype ' HWND hWndSpread; // in: HWND of Spread control ' long lStyle; // in: style for custom celltype ' int CtrlId; // in: Value to use for control id ' HWND hWndEditor; // out: HWND of editor control '} SS_CT_CREATEEDITORCONTROL_ARGS, FAR *LPSS_CT_CREATEEDITORCONTROL_ARGS;
Tags: None
Leave a comment: