DnsHostnameToComputerName function Null safety kernel32
Converts a DNS-style host name to a NetBIOS-style computer name.
BOOL DnsHostnameToComputerNameW(
LPCWSTR Hostname,
LPWSTR ComputerName,
LPDWORD nSize
);
Implementation
int DnsHostnameToComputerName(Pointer<Utf16> Hostname,
Pointer<Utf16> ComputerName, Pointer<Uint32> nSize) {
final _DnsHostnameToComputerName = _kernel32.lookupFunction<
Int32 Function(Pointer<Utf16> Hostname, Pointer<Utf16> ComputerName,
Pointer<Uint32> nSize),
int Function(Pointer<Utf16> Hostname, Pointer<Utf16> ComputerName,
Pointer<Uint32> nSize)>('DnsHostnameToComputerNameW');
return _DnsHostnameToComputerName(Hostname, ComputerName, nSize);
}