//+---------------------------------------------------------------------------
//
//
//  File:       ni_common2.h
//
//  Contents:
//
//  Classes:
//
//  Functions:
//
//  History:    6-30-1997	Naomaru Itoi	Created
//
//----------------------------------------------------------------------------

//
// Make sure that you have defined UNICODE, _UNICODE, and WIN32 correctly in
// your build environment.
//

// constants used in ni_* programs.
#define NI_SUCCESS	0
#define NI_FAILURE	1
#define NI_USER_UNKNOWN	2
#define SOMETHING_IS_WRONG 9999
#define StrLen 256

// data structure passed among ni_* programs.

typedef struct _ni_struct {
	WCHAR	username[StrLen];	// user name
	WCHAR	domain[StrLen];		// domain name
	WCHAR	password[StrLen];	// password
	WCHAR	oldPassword[StrLen];	// old password, for psasword changing.
	WCHAR	newPassword[StrLen];	// new password, for password changing.
	INT		value;				// value to be passed.
} NISTRUCT;

typedef NISTRUCT *PNISTRUCT;

// error handler

#ifdef _DEBUG
#define NIError(x, y) {MessageBox(NULL, x, y, (MB_OK | MB_SETFOREGROUND));}
#else 
#define NIError(x, y)
#endif

// prototypes
BOOL WINAPI ni_start(HANDLE hWlx, PVOID pWinlogonFunctions);
BOOL WINAPI ni_obtainpass(NISTRUCT *nistruct);
BOOL WINAPI ni_authenticate(NISTRUCT *);
INT WINAPI ni_logout();
INT WINAPI ni_end();

