<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
</style>
</head>
<body class='hmmessage'>
Hello,<br>I have to define a structure : login_handle, in loginh.h. I defined it like this :<br>--------------code-----------------------------------<br>typedef struct pam_handle pam_handle_t;<br>typedef struct login_handle login_handle_t;<br><br>struct login_handle{<br>  unsigned int use_lp;<br>  unsigned int use_sc;<br>  pam_handle_t *login_pamh;<br>};<br>---------------------------------------------------------<br><br>in pam_pkcs11.c, I allocate memory :<br><br>--------------code------------------------------------<br>login_handle_t *lh;<br>lh->login_pamh = (pam_handle_t *)malloc(sizeof(struct pam_handle));<br>---------------------------------------------------------<br><br>and I get error :<br>invalid application of ‘sizeof’ to incomplete type ‘struct pam_handle’<br><br>My question :<br>- I think the compiler says that because pam_handle is not defined anywhere ... isn't it ?<br>- How should I use pam_handle ? should I include some files in my loginh.h file, before defining struct login_handle ? If I should, what file exactly ? ( the file which defines pam_handle is hidden ... (private) according to the doc).<br>- Is there another reason why I get error ?<br><br>thanks for your help, <br>Aro<br><br /><hr />Partagez vos souvenirs sur le Web avec les personnes de votre choix <a href='http://www.microsoft.com/northafrica/windows/windowslive/products/photos-share.aspx?tab=1' target='_new'>les personnes de votre choix.</a></body>
</html>