Solved

How do I get the Novell User login id?

Posted on 1998-12-01
10
251 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
 
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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

863 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now