Click here to Skip to main content
15,885,546 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: LPCTSTR to LPCWSTR Pin
Cedric Moonen21-Apr-09 20:22
Cedric Moonen21-Apr-09 20:22 
AnswerRe: LPCTSTR to LPCWSTR Pin
KarstenK21-Apr-09 21:15
mveKarstenK21-Apr-09 21:15 
GeneralRe: LPCTSTR to LPCWSTR Pin
Cedric Moonen21-Apr-09 21:24
Cedric Moonen21-Apr-09 21:24 
GeneralRe: LPCTSTR to LPCWSTR Pin
David Crow22-Apr-09 5:48
David Crow22-Apr-09 5:48 
Questioncreating modeless dialog Pin
Rakesh521-Apr-09 19:32
Rakesh521-Apr-09 19:32 
AnswerRe: creating modeless dialog Pin
Chandrasekharan P21-Apr-09 19:38
Chandrasekharan P21-Apr-09 19:38 
AnswerRe: creating modeless dialog Pin
Hamid_RT21-Apr-09 20:04
Hamid_RT21-Apr-09 20:04 
QuestionNetUserChangePassword( not working under Windosw 2003 sp2 Pin
CADITC_CODER21-Apr-09 18:59
CADITC_CODER21-Apr-09 18:59 
Hi all

I have a simple change password utility that I wrote in Visual c++. It happily runs on Windows 2000, XP, and Windows 2003 sp1. Recently we upgraded to Windows 2003 sp2 and the program no longer works on that platform. It still works through XP sp2, Wind 2000 etc.

What happens is that a user will enter their username, domain name, old password and new password and this will change the password for that user. It always worked before but since Win2k3 sp2 it now retuens the error NERR_PasswordTooShort, indicating that the password does not meet complexity rules of the domain. Nothing was changed in relation to complexity rules. I had a server that was not upgraded to Win2k SP2 (still on SP1) and it worked a treat. The code snippet I use is below. Has anyone seen this issue?

Thanks fro any assistance

---------------------------code snippet-------------

nas = NetUserChangePassword(
wComputerName,
wUserName,
wOldPassword,
wNewPassword
);

if(nas != NERR_Success) {
switch ( nas ) {
case ERROR_ACCESS_DENIED:
AfxMessageBox("The user does not have access to the requested information.");
break;
case ERROR_INVALID_PASSWORD:
AfxMessageBox("The user has entered an invalid password in Old Password.");
break;
case NERR_InvalidComputer:
AfxMessageBox("The Computer name \\ Domain name is invalid.");
break;
case NERR_NotPrimary:
AfxMessageBox("The operation is allowed only on the primary domain controller of the domain.");
break;
case NERR_UserNotFound:
AfxMessageBox("The user name could not be found.");
break;
case NERR_PasswordTooShort :
AfxMessageBox("The password does not meet the password policy requirements. Check the minimum password length, password complexity and password history requirements.");

break;

default:
AfxMessageBox("Password Change Not Successful");
}
QuestionHow to draw the 3D image using the StL file Pin
DevelopmentNoob21-Apr-09 17:52
DevelopmentNoob21-Apr-09 17:52 
AnswerRe: How to draw the 3D image using the StL file Pin
Cedric Moonen21-Apr-09 20:20
Cedric Moonen21-Apr-09 20:20 
Questionuse gdi+ to draw special picture Pin
x169m21-Apr-09 16:29
x169m21-Apr-09 16:29 
AnswerRe: use gdi+ to draw special picture Pin
Hamid_RT21-Apr-09 20:12
Hamid_RT21-Apr-09 20:12 
Questionabout SetJob().about Printer Pin
tony_bin21-Apr-09 15:41
tony_bin21-Apr-09 15:41 
QuestionPre-Allocate File Storage Pin
Hoppenfeld21-Apr-09 9:18
Hoppenfeld21-Apr-09 9:18 
AnswerRe: Pre-Allocate File Storage Pin
Stuart Dootson21-Apr-09 10:28
professionalStuart Dootson21-Apr-09 10:28 
QuestionSystray icon settings under Windows 7 Pin
Maxwell Chen21-Apr-09 8:16
Maxwell Chen21-Apr-09 8:16 
AnswerRe: Systray icon settings under Windows 7 Pin
Stuart Dootson21-Apr-09 8:39
professionalStuart Dootson21-Apr-09 8:39 
GeneralRe: Systray icon settings under Windows 7 Pin
Maxwell Chen21-Apr-09 15:30
Maxwell Chen21-Apr-09 15:30 
GeneralRe: Systray icon settings under Windows 7 Pin
miriam.l22-Sep-09 19:41
miriam.l22-Sep-09 19:41 
QuestionDetect Internet Explorer 7 Pin
bob1697221-Apr-09 7:33
bob1697221-Apr-09 7:33 
QuestionRe: Detect Internet Explorer 7 Pin
David Crow21-Apr-09 7:58
David Crow21-Apr-09 7:58 
AnswerRe: Detect Internet Explorer 7 Pin
bob1697221-Apr-09 8:18
bob1697221-Apr-09 8:18 
QuestionWho can find my import file ! mingw32 problem!!! Pin
zarelaky21-Apr-09 5:13
zarelaky21-Apr-09 5:13 
AnswerRe: Who can find my import file ! mingw32 problem!!! Pin
Stuart Dootson21-Apr-09 8:34
professionalStuart Dootson21-Apr-09 8:34 
GeneralRe: Who can find my import file ! mingw32 problem!!! Pin
zarelaky22-Apr-09 1:41
zarelaky22-Apr-09 1:41 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.