473,385 Members | 1,620 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Retrieve Win32 domain name

I'm looking for a method to retrieve a Windows Domain name (not a DNS
Domain name).

I know this can be done by simply reading an environment variable,
however on the machines I need to work with sometimes the environment
variables can be messed-up and are not trustworthy.

Is there somebody who knows the Win32 library who can point me to the
function I need? The Win32Net seems to contain a whole load of
functions for manipulating Windows networking resources, however I
couldn't find a function which simply returned information about the
local computer.

Thanks!
Aug 26 '08 #1
1 2043
En Tue, 26 Aug 2008 05:39:55 -0300, Salim Fadhley <sa**********@gmail.com>
escribi�:
I'm looking for a method to retrieve a Windows Domain name (not a DNS
Domain name).

I know this can be done by simply reading an environment variable,
however on the machines I need to work with sometimes the environment
variables can be messed-up and are not trustworthy.

Is there somebody who knows the Win32 library who can point me to the
function I need? The Win32Net seems to contain a whole load of
functions for manipulating Windows networking resources, however I
couldn't find a function which simply returned information about the
local computer.
You didn't search enough then: try win32net.NetWkstaGetInfo(None, 100)

--
Gabriel Genellina

Aug 27 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Paul Smith | last post by:
This doesn't seem like it should be *that* difficult, but after quite some time trying to figure it out, I'm still banging my head against the wall. My objective is to examine the exact...
0
by: David Elliott | last post by:
I have a 3rd Party DLL that is a Win32 NOT .NET Assembly that is misbehaving. I am trying to isolate it in its own AppDomain. I got to load but can not create an instance. I receive the following...
33
by: jacob navia | last post by:
Recently there was a discussion in this group about how to retrieve the file name given a FILE *. The question raised my curiosity, and after some research I have come up with a good...
7
by: Vincent Nguyen | last post by:
Hi, Does anyone know how call Win32 native API GetTokenInformation() by using C#? Any sample code would be helpful. Thanks! Vincent
2
by: Dan | last post by:
All, I need to be able to retrieve a list of Domains that are part of our network: similar to the list you get when you log onto a Windows station that is part of a domain. I assume that I can...
3
by: Bruno | last post by:
Hello Friends I have a big problem. I can't retrieve the domain name (example: contoso.com) using visual basic.net language. I'm very appreciate if anyone give me an example how can I solve...
5
by: tjonsek | last post by:
I am trying to pull the user logon info in an application to use as a security stamp when someone completes a function. So far, I am able to retrieve the computer name. This is, however, not what...
5
by: tjonsek | last post by:
I am trying to pull the user logon info in an asp.net application to use as a security stamp when someone completes a function. So far, I am able to retrieve the computer name. This is, however,...
1
by: Lyners | last post by:
What I need - To retrieve the server name that the ASP application is running on. Why - Our current intranet is on a network where we have users that are on a domain and some that are not. Using...
0
by: Salim Fadhley | last post by:
I'm looking for a method to retrieve a Windows Domain name (not a DNS Domain name). I know this can be done by simply reading an environment variable, however on the machines I need to work with...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.