Главная страница
    Top.Mail.Ru    Яндекс.Метрика
Форум: "Основная";
Текущий архив: 2002.09.09;
Скачать: [xml.tar.bz2];

Вниз

Как все-таки программно определить имя домена?   Найти похожие ветки 

 
Новак   (2002-08-29 13:59) [0]

Господа, а как все-таки программно определить имя домена?


 
Song   (2002-08-29 14:03) [1]

1. Через реестр
2. С помощью ф-ии, которая живёт в netapi32.dll (сложный способ)


 
Игорь Шевченко   (2002-08-29 15:02) [2]

NetGetJoinInformation ?


 
Новак   (2002-08-29 15:30) [3]

Хм... Я понимаю, что умные люди говорят всегда абстрактно.

Господа, а можно хоть чуточку подробней.
1. Примерная ветка реестра.
2. Название функции в netapi32.dll.
3. Что такое NetGetJoinInformation ?


 
Song   (2002-08-29 15:44) [4]

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ \Winlogon\DefaultDomainName


 
Игорь Шевченко   (2002-08-29 17:28) [5]

Выдержка из MSDN:
Platform SDK: Network Management

NetGetJoinInformation

The NetGetJoinInformation function retrieves join status information for the specified computer.


NET_API_STATUS NetGetJoinInformation(
LPCWSTR lpServer,
LPWSTR* lpNameBuffer,
PNETSETUP_JOIN_STATUS BufferType
);

Parameters
lpServer
[in] Pointer to a constant string that specifies the DNS or NetBIOS name of the computer on which to call the function. If this parameter is NULL, the local computer is used.
lpNameBuffer
[out] Pointer to the buffer that receives the NetBIOS name of the domain or workgroup to which the computer is joined. This buffer is allocated by the system and must be freed using the NetApiBufferFree function. For more information, see Network Management Function Buffers and Network Management Function Buffer Lengths.
BufferType
[out] Receives the join status of the specified computer. This parameter can have one of the following values.
typedef enum _NETSETUP_JOIN_STATUS {

NetSetupUnknownStatus = 0,
NetSetupUnjoined,
NetSetupWorkgroupName,
NetSetupDomainName

} NETSETUP_JOIN_STATUS, *PNETSETUP_JOIN_STATUS;
These values have the following meanings.


Value Meaning
NetSetupUnknownStatus The status is unknown.
NetSetupUnjoined The computer is not joined.
NetSetupWorkgroupName The computer is joined to a workgroup.
NetSetupDomainName The computer is joined to a domain.

Return Values
If the function succeeds, the return value is NERR_Success.

If the function fails, the return value can be the following error code or one of the system error codes.


Value Meaning
ERROR_NOT_ENOUGH_MEMORY Not enough storage is available to process this command.




Remarks
No special group membership is required to successfully execute the NetGetJoinInformation function.

Requirements
Windows NT/2000/XP: Included in Windows 2000 and later.
Windows 95/98/Me: Unsupported.
Header: Declared in Lmjoin.h; include Lm.h.
Library: Use Netapi32.lib.


See Also
Network Management Overview, Network Management Functions, NetGetJoinableOUs


Platform SDK Release: August 2002



Страницы: 1 вся ветка

Форум: "Основная";
Текущий архив: 2002.09.09;
Скачать: [xml.tar.bz2];

Наверх





Память: 0.46 MB
Время: 0.006 c
1-27010
Igel
2002-08-29 12:38
2002.09.09
Как проверить?


1-27061
delpher_gray
2002-08-28 09:24
2002.09.09
Цикл for ... to ... do снизу вверх :-)


1-26994
Yasha
2002-08-29 12:57
2002.09.09
Слайд-шоу


14-27216
Дремучий
2002-08-15 12:57
2002.09.09
Надо помочь девушке....


1-27085
Чудак
2002-08-28 09:51
2002.09.09
Мастера подскажите





Afrikaans Albanian Arabic Armenian Azerbaijani Basque Belarusian Bulgarian Catalan Chinese (Simplified) Chinese (Traditional) Croatian Czech Danish Dutch English Estonian Filipino Finnish French
Galician Georgian German Greek Haitian Creole Hebrew Hindi Hungarian Icelandic Indonesian Irish Italian Japanese Korean Latvian Lithuanian Macedonian Malay Maltese Norwegian
Persian Polish Portuguese Romanian Russian Serbian Slovak Slovenian Spanish Swahili Swedish Thai Turkish Ukrainian Urdu Vietnamese Welsh Yiddish Bengali Bosnian
Cebuano Esperanto Gujarati Hausa Hmong Igbo Javanese Kannada Khmer Lao Latin Maori Marathi Mongolian Nepali Punjabi Somali Tamil Telugu Yoruba
Zulu
Английский Французский Немецкий Итальянский Португальский Русский Испанский