RGoldthorpe
Technical User
Hi
I have a problem I am hoping all you gurus out there can help me with.
What I want to do is use the windows logon to allow access to my data base. But I dont nessecarly need the same user that has logged on the machine to log into the data base.
What I have at the minute works providing the same username and password are used for loging in to the machine as the database.
The code for that is
LPARAMETERS tcUserid, tcDomain, tcPassword
#define LOGON32_LOGON_INTERACTIVE 2
#define LOGON32_LOGON_NETWORK 3
#define LOGON32_LOGON_BATCH 4
#define LOGON32_LOGON_SERVICE 5
#define LOGON32_PROVIDER_DEFAULT 0
lnFlags = LOGON32_LOGON_INTERACTIVE
DECLARE INTEGER LogonUser in WIN32API ;
String lcUser,;
String lcServer,;
String lcPassword,;
INTEGER dwLogonType,;
Integer dwProvider,;
Integer @dwToken
lnToken = 0
lcUser = ALLTRIM(tcUserID)
lcServer = ALLTRIM(tcDomain)
lcPassword = ALLTRIM(tcPassword)
lnResult = LogonUser(lcuser,lcServer,lcPassword,;
lnFlags,LOGON32_PROVIDER_DEFAULT,@lnToken)
DECLARE INTEGER CloseHandle IN WIN32API INTEGER
CloseHandle(lnToken)
IF lnResult=1
RETURN .T.
ELSE
RETURN .F.
ENDIF
Any of you have anyidea how I can minipulate this so it looks at the 2000 server to verify the logon.
All help is greatly appreciated
Thankyou
Rach
I have a problem I am hoping all you gurus out there can help me with.
What I want to do is use the windows logon to allow access to my data base. But I dont nessecarly need the same user that has logged on the machine to log into the data base.
What I have at the minute works providing the same username and password are used for loging in to the machine as the database.
The code for that is
LPARAMETERS tcUserid, tcDomain, tcPassword
#define LOGON32_LOGON_INTERACTIVE 2
#define LOGON32_LOGON_NETWORK 3
#define LOGON32_LOGON_BATCH 4
#define LOGON32_LOGON_SERVICE 5
#define LOGON32_PROVIDER_DEFAULT 0
lnFlags = LOGON32_LOGON_INTERACTIVE
DECLARE INTEGER LogonUser in WIN32API ;
String lcUser,;
String lcServer,;
String lcPassword,;
INTEGER dwLogonType,;
Integer dwProvider,;
Integer @dwToken
lnToken = 0
lcUser = ALLTRIM(tcUserID)
lcServer = ALLTRIM(tcDomain)
lcPassword = ALLTRIM(tcPassword)
lnResult = LogonUser(lcuser,lcServer,lcPassword,;
lnFlags,LOGON32_PROVIDER_DEFAULT,@lnToken)
DECLARE INTEGER CloseHandle IN WIN32API INTEGER
CloseHandle(lnToken)
IF lnResult=1
RETURN .T.
ELSE
RETURN .F.
ENDIF
Any of you have anyidea how I can minipulate this so it looks at the 2000 server to verify the logon.
All help is greatly appreciated
Thankyou
Rach