Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-RT-Original-Encoding: iso-8859-1 Content-Length: 439 You have now described the intended behavior. The test is now: if ((lpdi->size != LSH_DLGINFO_EX_V1_SZ && lpdi->size < sizeof(LSH_DLGINFO_EX)) || lpdi->dlgtype != DLGTYPE_PASSWD) { MessageBox(hDialog, "An incorrect initialization data structure was provided.", "AuthenticateProc()", MB_OK | MB_ICONSTOP); return FALSE; }