>I've been told here in my new job with VFP that the previous programmer discovered that he could not access the "machine name" in Win95 as he had been doing in Win 3.1.
>This is all new territory for me, but I have to learn how to set up access levels for about 80 people, so if anyone is knowledgeable about what is possible on the network with Win95, I would appreciate some clues....
>Thank you, Tom Hayward
Tom,
The following code returns the user id from my novell 4.1 network.... Got it off the newsgroups a while back:
* Program : GetNetId
* Author : Public Domain from MS Newsgroups
* Purpose : Returns user ID from Novell Network (3/4)
* Known Limitations : Works only in VFP 5
* Return Value : Char, Id # or Spaces
LOCAL ;
lcNull, ;
lcUserId, ;
lnLen
lcNull=""
lcUserId=SPACE(255)
lnLen=255
IF _WINDOWS AND ( "NT" $ OS() OR "WINDOWS 4." $ UPPER(OS()) )
* Use the WNetGetUser function in the Win32API to get the user id
DECLARE INTEGER WNetGetUser IN WIN32API String @, String @, Integer @
IF WNetGetUser(@lcNull,@lcUserId,@lnLen)=0
lcUserId=UPPER(LEFT(lcUserId,AT(CHR(0),lcUserId)-1))
ELSE
lcUserId = ""
ENDIF
ENDIF
RETURN ALLTRIM(lcUserId)
Enjoy!!
Tony Miller
PTI
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only