Q: UserId w3.x & Novell
>... However when I tried it on my client's Win311 PC, which runs on a Novell network, it caused a GPF and I had to restart windows before I...
Rick Broome rbroome@ozemail.com.au
A: Mostly when you get a GPF it's because the declaration isn't correct. The function wu_WNetGetUser% is a windows for workgroups declaration.
'on a Module Declare Function wu_WNetGetUser% Lib "USER.EXE" Alias "WNetGetUser" (ByVal szUser$, lpnBufferSize%) Global NovellName$ Function NetworkUserID () As String Dim szUser As String * 255 Dim lpnBufferSize% Dim status% lpnBufferSize = 255 status% = wu_WNetGetUser(szUser, lpnBufferSize) If status% = 3 Then NetworkUserID = "Error" Unload form1 Else NetworkUserID = Left$(szUser, InStr(szUser, Chr(0)) - 1) End If End Function 'Use as: NovellName = NetworkUserID() If it still does not work I have somewhere a older solution which will work also (but a little more complicated). Let me know if you're interested then I will mail it to you.. Return