Solved

How do I get the Novell User login id?

Posted on 1998-12-01
10
249 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
Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

 
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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

746 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

11 Experts available now in Live!

Get 1:1 Help Now