Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

How do I get the Novell User login id?

Posted on 1998-12-01
10
Medium Priority
?
259 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
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 40 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

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

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

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Suggested Courses

610 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