Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.clipper.visual-objects > #7151 > unrolled thread

Re: PC Name/IP Address and NT Login UserName

Started byGeorge Tritsos <GeorgeTritsos@yahoo.gr>
First post2014-08-17 07:25 -0700
Last post2014-08-19 13:19 -0700
Articles 9 — 6 participants

Back to article view | Back to comp.lang.clipper.visual-objects

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: PC Name/IP Address and NT Login UserName George Tritsos <GeorgeTritsos@yahoo.gr> - 2014-08-17 07:25 -0700
    Re: PC Name/IP Address and NT Login UserName dlzc <dlzc1@cox.net> - 2014-08-17 14:15 -0700
      Re: PC Name/IP Address and NT Login UserName George Tritsos <GeorgeTritsos@yahoo.gr> - 2014-08-17 14:47 -0700
        Re: PC Name/IP Address and NT Login UserName Karl Faller <mail_withoutthat_@_drei-f_andthat_.de> - 2014-08-18 08:28 +0200
        Re: PC Name/IP Address and NT Login UserName D.J.W. van Kooten <vankooten@removethis.ic2.com> - 2014-08-18 10:10 +0200
        Re: PC Name/IP Address and NT Login UserName "Fred Killet" <info@killetsoft.de> - 2014-08-18 12:27 +0200
    Re: PC Name/IP Address and NT Login UserName "Willie Moore" <williem@wmconsulting.com> - 2014-08-18 06:57 -0500
      Re: PC Name/IP Address and NT Login UserName George Tritsos <GeorgeTritsos@yahoo.gr> - 2014-08-19 13:17 -0700
      Re: PC Name/IP Address and NT Login UserName George Tritsos <GeorgeTritsos@yahoo.gr> - 2014-08-19 13:19 -0700

#7151 — Re: PC Name/IP Address and NT Login UserName

FromGeorge Tritsos <GeorgeTritsos@yahoo.gr>
Date2014-08-17 07:25 -0700
SubjectRe: PC Name/IP Address and NT Login UserName
Message-ID<d00ccde1-977f-4108-b805-e3a8914a8022@googlegroups.com>
Hello willie,

  Can i have your sample please?

Thanks in advance
George
Greece

[toc] | [next] | [standalone]


#7152

Fromdlzc <dlzc1@cox.net>
Date2014-08-17 14:15 -0700
Message-ID<282dc5b5-0e7d-4751-8cc3-91e56035c4ae@googlegroups.com>
In reply to#7151
Dear George Tritsos:

On Sunday, August 17, 2014 7:25:52 AM UTC-7, George Tritsos wrote:
>
>   Can i have your sample please?

You have replied to a 13 year old thread, and I see Willie has not posted here from this exact email address since late 2010.  Do not be offended if you do not hear from him...

David A. Smith

[toc] | [prev] | [next] | [standalone]


#7153

FromGeorge Tritsos <GeorgeTritsos@yahoo.gr>
Date2014-08-17 14:47 -0700
Message-ID<9986a4b6-fe6d-4000-980e-457dcae5ab74@googlegroups.com>
In reply to#7152
Thanks David for reply.

  But if anyone has this sample, i would appreciate if you sent it.

Thanks in advance
George

[toc] | [prev] | [next] | [standalone]


#7154

FromKarl Faller <mail_withoutthat_@_drei-f_andthat_.de>
Date2014-08-18 08:28 +0200
Message-ID<f673v95r474squihakgf9qceklurfj6be0@4ax.com>
In reply to#7153
George,
you could try and repost at grafx.public.vo.general

nKarl
>Thanks David for reply.
>
>  But if anyone has this sample, i would appreciate if you sent it.
>
>Thanks in advance
>George

[toc] | [prev] | [next] | [standalone]


#7155

FromD.J.W. van Kooten <vankooten@removethis.ic2.com>
Date2014-08-18 10:10 +0200
Message-ID<42d3v9524uem6ffqt2m5i910f84pmmtird@4ax.com>
In reply to#7153
On Sun, 17 Aug 2014 14:47:59 -0700 (PDT), George Tritsos
<GeorgeTritsos@yahoo.gr> wrote:

Hello George,
>
>  But if anyone has this sample, i would appreciate if you sent it.

If you go back a little bit more in time (20-7-2000 to be precisely)
you see this question as well and both (the late...) Stephen Quinn and
Ralph replied. Below their code, see if this helps you.

Dick


From the help
---------------------------------------------------
BOOL GetComputerName(
    LPTSTR lpBuffer, // address of name buffer
    LPDWORD nSize  // address of size of name buffer
   );
Parameters

lpBuffer
Points to a buffer to receive the null-terminated character string
containing the computer name.

nSize
Points to a variable that specifies the maximum size, in characters,
of the
buffer. This value should be large enough to contain
MAX_COMPUTERNAME_LENGTH
+ 1 characters.

Something like:
-------------------------------------------------------
local pszName as psz
loacl dwSize as dword

pszName := String2psz( MAX_COMPUTERNAME_LENGTH )
dwSize    := MAX_COMPUTERNAME_LENGTH + 1

cName := GetComputerName( pszName, @dwSize )

FUNCTION GetCompName()
file://p Returns the computer name given from the OS.
file://a none
file://r A string with the computer name.

LOCAL lpBuffer AS PSZ
LOCAL nSize AS PTR
LOCAL cName AS STRING

cName := "UNKNOWN"

lpBuffer := MemAlloc(MAX_COMPUTERNAME_LENGTH)
nSize := MAX_COMPUTERNAME_LENGTH

IF GetComputerName(lpBuffer, @nSize)
 cName := lpBuffer
ENDIF

MemFree(lpBuffer)

RETURN cName

DEFINE MAX_COMPUTERNAME_LENGTH := 32  // from the winbase.h file of
VC++ 6.0
+1 for the NULL terminator

[toc] | [prev] | [next] | [standalone]


#7156

From"Fred Killet" <info@killetsoft.de>
Date2014-08-18 12:27 +0200
Message-ID<lsskeo$qnj$1@news.albasani.net>
In reply to#7153
And here is an other function to get the country actually set on the 
computer:

FUNCTION getCountryName()
// Die Funktion ermittelt den aktuell im Computer eingestellten
// Landesnamen in englischer Sprache.

// Variablen
LOCAL dwLcId AS DWORD
LOCAL nLen AS LONGINT
LOCAL pszBuffer AS PSZ
LOCAL cLand AS STRING

// Landesnamen ermitteln
cLand := ""
dwLcId := GetSystemDefaultLCID()
nLen := GetLocaleInfo(dwLcId,LOCALE_SENGCOUNTRY,pszBuffer,0)
IF nLen > 0
  pszBuffer := String2Psz(Space(DWORD(_CAST,nLen)))
  nLen := GetLocaleInfo(dwLcId,LOCALE_SENGCOUNTRY,pszBuffer,nLen)
  IF nLen > 0
    cLand := Left(Psz2String(pszBuffer),DWORD(_CAST,nLen))
  ENDIF
ENDIF
RETURN cLand


-- 


Fred Killet
killet-nospam@killetsoft.de
"George Tritsos" <GeorgeTritsos@yahoo.gr> schrieb im Newsbeitrag 
news:9986a4b6-fe6d-4000-980e-457dcae5ab74@googlegroups.com...
> Thanks David for reply.
>
>  But if anyone has this sample, i would appreciate if you sent it.
>
> Thanks in advance
> George 


---
Diese E-Mail ist frei von Viren und Malware, denn der avast! Antivirus Schutz ist aktiv.
http://www.avast.com

[toc] | [prev] | [next] | [standalone]


#7157

From"Willie Moore" <williem@wmconsulting.com>
Date2014-08-18 06:57 -0500
Message-ID<lsspmq$3v8$1@speranza.aioe.org>
In reply to#7151
George,

if you have VO 2.7 or higher, you will have the code I use in the 
sampes\nbtstat and samples\ping.

Regards,
Willie
Vulcan VIP

"George Tritsos"  wrote in message 
news:d00ccde1-977f-4108-b805-e3a8914a8022@googlegroups.com...

Hello willie,

  Can i have your sample please?

Thanks in advance
George
Greece 

[toc] | [prev] | [next] | [standalone]


#7159

FromGeorge Tritsos <GeorgeTritsos@yahoo.gr>
Date2014-08-19 13:17 -0700
Message-ID<4649334e-601b-496c-beb2-34783dbaa591@googlegroups.com>
In reply to#7157
Thanks all for your replies.

Regards,
George

[toc] | [prev] | [next] | [standalone]


#7160

FromGeorge Tritsos <GeorgeTritsos@yahoo.gr>
Date2014-08-19 13:19 -0700
Message-ID<48d877ed-3ed2-4227-a9f7-5f907eaf0aa7@googlegroups.com>
In reply to#7157
Thanks all for your replies.

Regards,
George

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.clipper.visual-objects


csiph-web