| ||||||||||||||||||||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Computer name length issue
Hello everyone,
Any macro used to represent computer name max length (just host name max length itself, not full-qualified with domain suffix, for example, I just want host name "somehost" in example.com domain, but not "somehost.example.com")? http://msdn.microsoft.com/en-us/library/ms724301(VS.85).aspx MAX_COMPUTERNAME_LENGTH is too small and just 15 characters. thanks in avdance, George |
|
#2
|
||||
|
||||
|
The link you posted has the answer. Look at the example. And look at this quote from the article:
"The length of the name may be greater than MAX_COMPUTERNAME_LENGTH characters because DNS allows longer names. To ensure that this buffer is large enough, set this parameter to NULL and use the required buffer size returned in the lpnSize parameter."
__________________
There is no such thing as C/C++, you either program C or C++ |
![]() |
| Viewing: Dev Articles Community Forums > Programming > C/C++ Help > Computer name length issue |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|