#include <stdlib.h>
#include <stdio.h>
#include <windef.h>
#include <winbase.h>
#include <conutils.h>
#include "resource.h"
Go to the source code of this file.
◆ PrintError()
Definition at line 20 of file hostname.c.
23{
25
27 return;
28
31 else
37}
void ConPuts(FILE *fp, LPCWSTR psz)
void ConPrintf(FILE *fp, LPCWSTR psz,...)
void ConResPuts(FILE *fp, UINT nID)
#define IS_INTRESOURCE(x)
static const WCHAR Message[]
INT ConMsgPuts(IN PCON_STREAM Stream, IN DWORD dwFlags, IN LPCVOID lpSource OPTIONAL, IN DWORD dwMessageId, IN DWORD dwLanguageId)
#define LANG_USER_DEFAULT
#define FORMAT_MESSAGE_FROM_SYSTEM
Referenced by wmain().
◆ wmain()
Definition at line 39 of file hostname.c.
40{
41
43
45 {
47 WCHAR LocalHostName[256] =
L"";
49 PWSTR HostName = LocalHostName;
50
51
54 {
55
57 if (HostName)
59 }
60
61
62 if (bSuccess)
64
65
66 if (HostName && (HostName != LocalHostName))
68
69 if (!bSuccess)
70 {
71
73 return 1;
74 }
75 }
76 else
77 {
79 {
80
82 return 1;
83 }
84 else
85 {
86
88 }
89 }
90
91 return 0;
92}
BOOL WINAPI GetComputerNameExW(COMPUTER_NAME_FORMAT NameType, LPWSTR lpBuffer, LPDWORD nSize)
#define ConInitStdStreams()
#define HeapFree(x, y, z)
_ACRTIMP int __cdecl _wcsicmp(const wchar_t *, const wchar_t *)
static VOID PrintError(_In_opt_ PCWSTR Message, _In_ DWORD dwError)
DWORD WINAPI GetLastError(void)
#define MAKEINTRESOURCEW(i)