#include <stdlib.h>
#include <conio.h>
#include <windef.h>
#include <winbase.h>
#include <winuser.h>
#include "resource.h"
Go to the source code of this file.
◆ wmain()
Definition at line 18 of file hostname.c.
19{
21
23 {
25 WCHAR LocalHostName[256] =
L"";
27 PWSTR HostName = LocalHostName;
28
29
32 {
33
35 if (HostName)
37 }
38
40 {
41
43 }
44
45
46 if (HostName && (HostName != LocalHostName))
48
50 {
51
54 return 1;
55 }
56 }
57 else
58 {
60 {
61
64 return 1;
65 }
66 else
67 {
68
71 }
72 }
73
74 return 0;
75}
BOOL WINAPI GetComputerNameExW(COMPUTER_NAME_FORMAT NameType, LPWSTR lpBuffer, LPDWORD nSize)
#define HeapFree(x, y, z)
int __cdecl _cwprintf(const MSVCRT_wchar_t *,...)
DWORD WINAPI GetLastError(void)
int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPWSTR lpBuffer, _In_ int cchBufferMax)