C to D struct including LPVOID,LPCSTR
BLS
nanali at wanadoo.fr
Sat Sep 9 13:53:06 PDT 2006
Hi folks,
as announced in my previous post, I am quit weak in C-ish languages. I
have to translate the following CPP structure into D :
#pragma pack(1)
/*Contexte d'enreg pour un fichier*/
typedef struct _stHFFileCtx {
LPVOID pData; /*pointeur vers une structure d'enreg*/
short nSize; /*taille de la structure d'enreg*/
LPCSTR pszNomFic; /*nom logique du fichier associй*/
LPVOID pStorage; /*copie de la structure d'enreg*/
} stHFFileCtx;
typedef stHFFileCtx far * pstHFFileCtx;
......
I think the D version might look similar to :
struct stHFFileCtx {
align(1): //
void* pData; /*pointeur vers une structure d'enreg*/
short nSize; /*taille de la structure d'enreg*/
LPCSTR pszNomFic; /*nom logique du fichier associй*/
void* pStorage; /*copie de la structure d'enreg*/
} ;
alias stHFFileCtx * pstHFFileCtx;
Two questions :
How do I translate : LPCSTR
What else is wrong.
Sorry for asking you such silly questions and thanks in advance.
Björn
More information about the Digitalmars-d-learn
mailing list