I have downloaded and have been playing around with the PasswordFilters sample which is found in the Microsoft Platform SDK.
As a VB.NET developer, I am stumped as to how to modify this to allow for a minimum of 1 letter (a-z) or 1 special character (#,$,@,_) AND 1 number. The letters and numbers are not a problem. It is detecting the 4 special characters which I am having problems with.
Does anybody have any suggestions on how to do this?
Here is what has been attempted within the PasswordFilter function:
Thanks,Code:for (i = 0 ; i < cchPassword ; i++) { // // keep track of what type of characters we have encountered // if (CharType[i] & C1_DIGIT) { dwNum = 1; continue; } if (CharType[i] & C1_UPPER | C1_LOWER) { dwChar = 1; continue; } if (!(CharType[i] & (C1_ALPHA | C1_DIGIT) )) { // // any other character types make the password complex // //Password->Buffer is a Pointer and cannot be used in this manner //This is here to demonstrate what I am trying to achieve. switch(Password->Buffer[i]) { case '#': case '$': case '@': case '_': dwChar = 1; break; default: break; } continue; } } // for
Jody



LinkBack URL
About LinkBacks



