Solved

How do I get the Novell User login id?

Posted on 1998-12-01
10
253 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
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Delphi XE10, DigitalPersona Fingerprint reader and MySQL 6 323
Multiple image collision 13 80
Performance of SQL statement 37 127
scroll down TListBox component in Delphi 1 19
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
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…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

809 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