Solved

How do I get the Novell User login id?

Posted on 1998-12-01
10
252 Views
Last Modified: 2010-04-04
I tried the following code, sometime it works and sometimes
i get garbage. ANybody know why? I'm running Novell client32 on Netware 3.12.

      procedure TForm1.Button1Click(Sender: TObject);
      var
      Name: array [0..80] of char;
      Size: Cardinal;
      begin
       WNetGetUser('VWV_FS1', Name, Size);
        Edit1.Text := Name;
      end;
0
Comment
Question by:waipahu
  • 3
  • 3
  • 2
  • +2
10 Comments
 
LVL 4

Expert Comment

by:BoRiS
ID: 1348877
Waipahu

The code you are using is what I sent you, do you use this exact code because the VWV_FS1 is my novell sever name you need to change that with you novell sever name

procedure TForm1.Button1Click(Sender: TObject);
var
Name: array [0..80] of char;
Size: Cardinal;
begin
  WNetGetUser('Your novell server name here', Name, Size);
   Edit1.Text := Name;
end;

Later
BoRiS

0
 

Author Comment

by:waipahu
ID: 1348878
Yes i put my server name there.
sometime it works..sometime it doesn't
strange....
it works also when i just put  quotes instead of server name.

0
 
LVL 4

Expert Comment

by:BoRiS
ID: 1348879
waipahu

Add this to the code to receive error codes and see what happens when it returns garbage

procedure TForm1.Button1Click(Sender: TObject);
       var
       Name: array [0..80] of char;
       Size: Cardinal;
       begin
         WNetGetUser('Your novell server name here', Name, Size);
          Edit1.Text := Name;
           ShowMessage(SysErrorMessage(GetLastError));
       end;

Later
BoRiS
0
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 
LVL 1

Expert Comment

by:Romanian
ID: 1348880
At first, check what error code return WNetGetUser.
Tell, what was error code returned when error occur?
0
 

Author Comment

by:waipahu
ID: 1348881
Okay..
I got this error:
error number: 487
Error message: Attempt to access invalid address

any clue?


0
 
LVL 4

Expert Comment

by:BoRiS
ID: 1348882
waipahu

Judging from the error code explains way you get garbage sometimes, it seems that it does not found the server all the time, this could be caused by timeouts I will look into it for you...

Later
BoRiS
0
 
LVL 1

Expert Comment

by:Romanian
ID: 1348883
Try to install Microsoft Client for network. It might be solution of your problem.

0
 

Expert Comment

by:elkiors
ID: 1348884
I get the user login name for client32 by reading registry keys. Client32 always registers the username to windows so you can always read the WindowsUserName directly from the registry key. I've written a component that will test the current login user by this method if you're interested, although you will have to take out a few bits that won't work because I have taked it one step further and added a function that looks up a paradox table to get the users full name and job title.

Darren

0
 

Accepted Solution

by:
tothpaul earned 10 total points
ID: 1348885
I'm using GetUserName (windows API) dans that work fine with Novell 3.12 & 4.11 (Client 32, Intranet Client 32 v2.5.1)
0
 

Author Comment

by:waipahu
ID: 1348886
elkiors,...i am still having problems getting novell userid...
what is your solution? how do i get the user id from windows?
any code?
thanks
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Sending Gmail through Delphi 3 108
Delphi: ForceDirectory plain function 7 32
Performance of SQL statement 37 111
Installshield for Embarcadero EX 10.1 Berlin 4 42
The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question