[DllImport("kernel32.dll", CharSet=CharSet.Auto)]
static extern uint EnumerateLocalComputerNames(
COMPUTER_NAME_TYPE NameType,
uint ulFlags,
IntPtr lpBuffer,
ref uint nSize);
Returns ERROR_SUCCESS on success or an error code on failure. Unless only the primary computer name is requested, the buffer will be filled with a series of null-terminated strings followed by a final null terminator. To measure the required number of characters, not including the final null terminator, use a null buffer and a zero size. This function is similar to GetComputerNameEx, and delegates to it to obtain the primary computer name.
The caller may request the primary name only, the alternate names only, or all computer names. Each name returned is a fully qualified DNS name. This function has both ANSI and Unicode versions, but since it only exists on XP and later, the signature shown will always use Unicode.
Please add some!
Please add some!
Do you know one? Please contribute it!