get computer name in a network

Hello,

I'm trying to get the computername from which a user has
been logged in from.  Is there a way to do this???????


Thnx,

Geert
0
Geert
3/26/2004 9:41:15 AM
sybase.powerbuilder.general 62418 articles. 17 followers. Follow

6 Replies
674 Views

Similar Articles

[PageSpeed] 21

http://eric.aling.tripod.com/PB/tips/pbtip14.htm

Good luck... ;)

U�ytkownik <Geert Vancleef> napisa� w wiadomo�ci
news:4063fab6.370d.846930886@sybase.com...
> Hello,
>
> I'm trying to get the computername from which a user has
> been logged in from.  Is there a way to do this???????
>
>
> Thnx,
>
> Geert


0
Piotr
3/26/2004 9:54:18 AM
Hi Geert,

//external API declaration
FUNCTION boolean GetComputerNameA(ref string cname,ref long
nbuf) LIBRARY "Kernel32.dll"

//PB code
string ls_compname
long ll_buf
ll_buf = 75
ls_compname = space(ll_buf)
GetComputerNameA(ls_compname, ll_buf)
return(ls_compname)

HTH
John Vanleeuwe


> Hello,
>
> I'm trying to get the computername from which a user has
> been logged in from.  Is there a way to do this???????
>
>
> Thnx,
>
> Geert
0
John
3/26/2004 10:28:26 AM
I'm aware of this function but this only works locally


> Hi Geert,
>
> //external API declaration
> FUNCTION boolean GetComputerNameA(ref string cname,ref
> long nbuf) LIBRARY "Kernel32.dll"
>
> //PB code
> string ls_compname
> long ll_buf
> ll_buf = 75
> ls_compname = space(ll_buf)
> GetComputerNameA(ls_compname, ll_buf)
> return(ls_compname)
>
> HTH
> John Vanleeuwe
>
>
> > Hello,
> >
> > I'm trying to get the computername from which a user has
> > been logged in from.  Is there a way to do this???????
> >
> >
> > Thnx,
> >
> > Geert
0
Geert
3/26/2004 11:01:55 AM
I guess you need to provide us with more info on your
requirement.  What is it exactly you want to do ?

John Vanleeuwe


 > I'm aware of this function but this only works locally
>
>
> > Hi Geert,
> >
> > //external API declaration
> > FUNCTION boolean GetComputerNameA(ref string cname,ref
> > long nbuf) LIBRARY "Kernel32.dll"
> >
> > //PB code
> > string ls_compname
> > long ll_buf
> > ll_buf = 75
> > ls_compname = space(ll_buf)
> > GetComputerNameA(ls_compname, ll_buf)
> > return(ls_compname)
> >
> > HTH
> > John Vanleeuwe
> >
> >
> > > Hello,
> > >
> > > I'm trying to get the computername from which a user
> > > has been logged in from.  Is there a way to do
> > this??????? >
> > >
> > > Thnx,
> > >
> > > Geert
0
John
3/26/2004 12:14:37 PM
Well: to start: first of all I'm looking for a user's SID. 
I already have done this using connection to a registry on a
remote computer (with the computername) and get the SID out
of it.  But now the problem is that I have to use the
username and not the computername (I'm a last-year student
and that's my assignment).  Up until now, I was using the
function LookUpAccountName(...) but then I have problems
with the datatype of the SID.  So now I'm looking for a way
to retrieve the computername of the user and then it would
be a piece of cake because I already know how to connect to
a remote registry with the computername.  I hope that you or
someone can help me.

PB: Version 8.0 built 7039
> I guess you need to provide us with more info on your
> requirement.  What is it exactly you want to do ?
>
> John Vanleeuwe
>
>
>  > I'm aware of this function but this only works locally
> >
> >
> > > Hi Geert,
> > >
> > > //external API declaration
> > > FUNCTION boolean GetComputerNameA(ref string cname,ref
> > > long nbuf) LIBRARY "Kernel32.dll"
> > >
> > > //PB code
> > > string ls_compname
> > > long ll_buf
> > > ll_buf = 75
> > > ls_compname = space(ll_buf)
> > > GetComputerNameA(ls_compname, ll_buf)
> > > return(ls_compname)
> > >
> > > HTH
> > > John Vanleeuwe
> > >
> > >
> > > > Hello,
> > > >
> > > > I'm trying to get the computername from which a user
> > > > has been logged in from.  Is there a way to do
> > > this??????? >
> > > >
> > > > Thnx,
> > > >
> > > > Geert
0
Geert
3/26/2004 12:37:58 PM
Geert:

Did you get my reply to your previous post about converting a SID to a
string?  I wrote you a DLL.  Send me an email (after removing
_REMOVETHISFIRST_ ) to t_REMOVETHISFIRST_wallace@email.com if you want me to
send you the source for your evaluation and building (to ensure no nasty
payloads).

Tim Wallace

<Geert Vancleef> wrote in message news:40642422.39d5.846930886@sybase.com...
> Well: to start: first of all I'm looking for a user's SID.
> I already have done this using connection to a registry on a
> remote computer (with the computername) and get the SID out
> of it.  But now the problem is that I have to use the
> username and not the computername (I'm a last-year student
> and that's my assignment).  Up until now, I was using the
> function LookUpAccountName(...) but then I have problems
> with the datatype of the SID.  So now I'm looking for a way
> to retrieve the computername of the user and then it would
> be a piece of cake because I already know how to connect to
> a remote registry with the computername.  I hope that you or
> someone can help me.
>
> PB: Version 8.0 built 7039
> > I guess you need to provide us with more info on your
> > requirement.  What is it exactly you want to do ?
> >
> > John Vanleeuwe
> >
> >
> >  > I'm aware of this function but this only works locally
> > >
> > >
> > > > Hi Geert,
> > > >
> > > > //external API declaration
> > > > FUNCTION boolean GetComputerNameA(ref string cname,ref
> > > > long nbuf) LIBRARY "Kernel32.dll"
> > > >
> > > > //PB code
> > > > string ls_compname
> > > > long ll_buf
> > > > ll_buf = 75
> > > > ls_compname = space(ll_buf)
> > > > GetComputerNameA(ls_compname, ll_buf)
> > > > return(ls_compname)
> > > >
> > > > HTH
> > > > John Vanleeuwe
> > > >
> > > >
> > > > > Hello,
> > > > >
> > > > > I'm trying to get the computername from which a user
> > > > > has been logged in from.  Is there a way to do
> > > > this??????? >
> > > > >
> > > > > Thnx,
> > > > >
> > > > > Geert


0
Tim
3/26/2004 3:55:49 PM
Reply:

Similar Artilces:

How to get DNS Name be the DNS Name rather than computer name
In Patchlink associated with computers there is "DNS Name" field. This field seems to be the computer name (netbios name) for windows computers rather than the dns name assocated with the IP address. Is there a way to configure the patchlink server so this field reports the DNS Name rather than the computer name? where is that "DNS name" field? -- Shaun Pond > where is that "DNS name" field? > > -- > > Shaun Pond > > From the web interface: 1) From the Reports ->Computer Status Report the second field ins...

How can i get the computer client computer name not the IP address
I have been trying to get the client computer name and ip address. For the IP address i can get it. For the computer name i a gain get the IP address. Is there some thing i have to do in order to get the computer name not the IP. My application runs on a server in the company's intranet. Below is my sample code. I also want to get the "timea" just in hour/minutes format. At the moment timea is bringing to much details(I dont if there seconds or millisecoinds, but just to much figures) Dim username As String = HttpContext.Current.User.Identity.Name Dim timea As String = DateTime.Now.TimeOf...

How to get computer name?
How do I get the computer name from a vb.net 2.0 program?TIA,Owen Ok. I Found it.My.Computer.Name Owen...

How do I get the computer name?
We have an application that is run on either the user's local machine or the server. I can get the local computer name using n_cst_platform.of_getComputerName(), but how do I get the server name will that function work as well? TIA > We have an application that is run on either the user's > local machine or the server. I can get the local computer > name using n_cst_platform.of_getComputerName(), but how do > I get the server name will that function work as well? > > TIA > > Are you just trying to determine if it is being run on a loal d...

Get computer name
I found the code below in an old Google session for this newsgroup. I am just wondering if the GetComputerNameA Win32 API works in 95, 98, 2000 and XP. Anyone? To get the computer name, use the GetComputerNameA Win32 API call as follows: FUNCTION boolean GetComputerNameA( REF string lpBuffer, REF ulong lpnSize ) LIBRARY "kernel32.dll" // sample code string ls_name ulong lul_maxlen lul_maxlen = 260 ls_name = Space( lul_maxlen ) IF NOT GetComputerNameA( ls_name, lul_maxlen ) THEN // handle the error ELSE MessageBox( "Computer Name", ls...

Get Computer Name
How to get the computer name in Win95 and Win3.1(workgroup)? Thanks in advance. Do any web site that contain all Window API calls, thanks. Edward Chan For Win95: FUNCTION ulong GetComputerNameA( REF string lpBuffer, REF ulong nSize ) LIBRARY "kernell32.dll" Roy se5a03 wrote in message <3522454C.2CB87E94@hotmail.com>... >How to get the computer name in Win95 and Win3.1(workgroup)? > >Thanks in advance. > >Do any web site that contain all Window API calls, thanks. > >Edward Chan > se5a03 a �crit dans le message <35...

Network computer name
Hello, Sybase SQL Anywhere 5.5 With a network engine, is it possible to know the computer name that does a request. Alain You can get the IP address from sa_conn_info, but not the computer name. -- Reg Domaratzki Sybase Mobile and Embedded Computing Division Please respond only to the newsgroup "alain" <informatic@solofours.ch> wrote in message news:UbDem9Qp$GA.286@forums.sybase.com... > Hello, > > Sybase SQL Anywhere 5.5 > > With a network engine, is it possible to know the computer name that does a > request. > >...

Getting Computer Login Name.
  Hi all I'm using VWD Im trying to get the computer Login Name(Username) in my web application. I tried using HttpContext.Current.User.Identity.Name and alot of other way like the old method servervariables? and many other. But cannot rem them no. All of it works IF im working local Host. But it Just Became Empty or Wrong Value if its working on a server/client basis.   And ideas how to get it using web Application?   Thx in advance Cheers Did you tried just User.Identity.Name and what you got! Also what value it's showing. One more quesiton, are you using forms ...

How to get network operator name?
According to the [app permissions documentation on MDN][1], the Mobile Network API is available to privileged apps. On the [page for that API][2], however, it says: "This API is available on Firefox OS for internal applications only." *Who is right? And if the API is available to privileged apps, how do I get the network operator name?* (For a demo at a Firefox OS workshop, I am looking for a simple API which requires an app to be privileged.) [1]: https://developer.mozilla.org/en-US/Apps/Build/App_permissions [2]: https://developer.mozilla.org/en-US/docs/Web/API/MozMo...

How can I get a computer name
Hi! How can I get a computer name, which is running my application? Sancho Sandris The platform service of the PFC has an of_GetComputerName() function. Good Luck Michael Walker Cascadia Software Sandris wrote: > Hi! > How can I get a computer name, which is running my application? > > Sancho > > > ...

How get user name from network
We have a PFC application that uses w_logon to get user id and pw. I'm trying to figure how it reads the default user id from the network to place in our 'ENTER USER ID:' edit box (sle_userid). In the open event for pfc_w_logon I see inv_logonattrib = Message.PowerObjectParm sle_userid.text = inv_logonattrib.is_userid Is this it? Where/how is it reading the (default) user id from the network (NT 4)? What does the Message object hold here? Thanks. Rick, PFC uses the GetUserNameA() Win32 API -- look at the of_GetUserid() function on the pfc_n_cst_platformwi...

get names of computer and their users
Hello, is there a way to get all the computers and their users in a domain? Thnx, geert I use NetQueryDisplayInformation http://msdn.microsoft.com/library/en-us/netmgmt/netmgmt/NetQueryDisplayInformation.asp?frame=true A good example can be found here http://www.topwizprogramming.com/redirect.html?page=freecode > Hello, > > is there a way to get all the computers and their users in > a domain? > > > Thnx, > > geert ...

How get user name from network?
We have a PFC application that uses w_logon to get user id and pw. I'm trying to figure how it reads the default user id from the network to place in the 'ENTER USER ID:' edit box (sle_userid). In the open event for pfc_w_logon I see inv_logonattrib = Message.PowerObjectParm sle_userid.text = inv_logonattrib.is_userid Is this it? Where/how is it reading the (default) user id from the network? Thanks. In article <MPG.13d0096f26e60e0c989721@forums.powersoft.com>, rick.charnes@state.ma.us says... > inv_logonattrib.is_userid > I don't have th...

How can I get the computer name?
hi, somebody there can help me please? I'm new in ASP.NET, I'm working in something where I need get the client computer name....how can i do that?........I think it could be possible with some script. Ask the user. there's no easy way to just get this automatically.RTFM - straight talk for web developers. Unmoderated, uncensored, occasionally unreadableJason Brown - MVP, IIS...

Web resources about - get computer name in a network - sybase.powerbuilder.general

Computer - Wikipedia, the free encyclopedia
"Computer technology" and "Computer system" redirect here. For the company, see Computer Technology Limited . For other uses, see Computer (disambiguation) ...

Computer - Wikipedia, the free encyclopedia
"Computer technology" and "Computer system" redirect here. For the company, see Computer Technology Limited . For other uses, see Computer (disambiguation) ...

Computer Show
The first episode premiered at XOXO last month, and it brought the house down. I think you’re best off going in cold — just grab a beverage and ...

Lean Cuisine Can Block the Word Diet From Your Computer
Lean Cuisine's digital and social agency, 360i, led the development of what's being called the #WeighThis Diet Filter. The agency even created ...

Intel and Google Equip Smartphones with 3D Cameras and Computer Vision
Computer vision and sensing are crucial for cars, robots, drones and many other applications. However, existing devices such as personal computers ...

The software that turns any computer into an Android PC is now available for download
... talked about this Android initiative a few times already. The new software offers users a Windows-like Android experience on traditional computers. ...

Microsoft gives Reed College $500K to help build new computer science program
Liberal arts bastion Reed College has raised almost $5 million for its new computer science program. Now it can count Microsoft as a backer. ...

IBM CEO: Artificially intelligent computers will 'change who you are'
... She sees the day when every decision humans make —from what we eat to how businesses operate — are done in consultation with human-like computers. ...

Sample computer and e-mail usage policy
This one-page computer and email usage policy from a manufacturing company with fewer than 50 employees covers unauthorized access, software ...

ISIS Backer Joins Bundy's Militants, Hijacks Government Computers To Build Militia Website
A militant who recently joined Ammon Bundy's armed occupation of the Malheur National Wildlife Refuge as the resident computer expert is a follower ...

Resources last updated: 1/14/2016 9:08:02 AM