Hola amigo....
Many of your friends give me the same recomendation, so I didn´t understand it, because this function return me the pcname and userid and I needed the userid only, then I wanted get the password, so it not good, because if the network give to the user access, why do you have to spent time check the password too.
Some gays (I forgot the name) give the code to do it.
I was talking with somebady called Rick Schummer, he or she (:-P, I dont know) give me the following code, but how and where I should put this code.PARAMETER tlWin32, tlDisplayMsg
DO CASE
CASE PARAMETERS() = 0
tlWin32 = .T.
tlDisplayMsg = .F.
CASE PARAMETERS() = 1
tlDisplayMsg = .F.
ENDCASE
* Network Connection errors
#DEFINE NO_ERROR 0
#DEFINE WN_NOT_CONNECTED 48
#DEFINE WN_BAD_NETNAME 50
#DEFINE WN_BAD_LOCALNAME 51
#DEFINE WN_DEVICE_ERROR 53
#DEFINE WN_CONNECTION_CLOSED 54
* Length of user name buffer.
#DEFINE USER_BUFFER 255
* Message box constants
#DEFINE MB_OK 0 && OK button only
#DEFINE MB_ICONINFORMATION 64 && Information message
LOCAL scUser && As String * 255
LOCAL scLocalName && As String
LOCAL lnBufferSize && As Long
LOCAL lnStatus && As Long
LOCAL lcCallerID && As Character
scUser = SPACE(USER_BUFFER)
lnBufferSize = USER_BUFFER
scLocalName = CHR(0) && Null character.
DO CASE
* VFP declaration on Windows 95 or Windows NT
CASE tlWin32 = .T.
DECLARE INTEGER WNetGetUser ;
IN WIN32API ;
AS WNetGetUserA ;
STRING@ sName, ;
STRING@ sUserName, ;
INTEGER@ iBufferSize
* VFP declaration on Windows 3.11
OTHERWISE
DECLARE INTEGER WNetGetUser ;
IN user.dll ;
AS WNetGetUserA
What do you think about this.????
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement