36 INT VersionNumber = 255;
37 if(pBuf102 !=
NULL && !bLocal)
54 INT VersionNumber = 255;
55 if(pBuf102 !=
NULL && !bLocal)
76 if(pBuf102 !=
NULL && !bLocal)
109 SPNumber =
osvi->wServicePackMajor;
166 DWORD bufCharCount = 1024;
173 _tcscpy(OSName,
_T(
"Microsoft Windows NT 4.0 "));
179 _tcscpy(OSName,
_T(
"Microsoft Windows 2000 "));
183 _tcscpy(OSName,
_T(
"Microsoft Windows XP "));
187 _tcscpy(OSName,
_T(
"Microsoft Windows Server 2003 "));
192 _tcscpy(OSName,
_T(
"Microsoft Windows Vista "));
196 _tcscpy(OSName,
_T(
"Microsoft Windows "));
210 _tcscat(OSName,
_T(
"Small Bussiness Edition"));
224 _tcscat(Components,
_T(
"Not Installed"));
231 DWORD Operations = 0;
238 TCHAR ServerName[32];
239 TCHAR RemoteResource[32];
284 wprintf(
L"Error in paramters, please see usage\n");
299 _stprintf(RemoteResource,
_T(
"\\\\%s\\IPC$"), ServerName);
304 nr.lpRemoteName = RemoteResource;
322 _tprintf(
_T(
"Failed to get local information\n"));
331 _tprintf(
_T(
"Failed to connection to remote machine\n"));
367 wprintf(
L"GETTYPE [/ROLE | /SP | /VER | /MAJV | /MINV | /TYPE | /BUILD]");
370 else if(!Operations && bLocal)
378 TCHAR Components[1024] =
_T(
"");
381 _tprintf(
_T(
"Role: %s\nComponent: %s\n"), Role, Components);
OSVERSIONINFOW VersionInfo
LPWSTR WINAPI GetCommandLineW(VOID)
NET_API_STATUS WINAPI NetApiBufferFree(LPVOID Buffer)
NET_API_STATUS WINAPI NetServerGetInfo(LMSTR servername, DWORD level, LPBYTE *bufptr)
INT GetBuildNumber(BOOL bLocal, LPOSVERSIONINFOEX osvi, LPSERVER_INFO_102 pBuf102)
INT GetVersionNumber(BOOL bLocal, LPOSVERSIONINFOEX osvi, LPSERVER_INFO_102 pBuf102)
INT GetSystemRole(BOOL bLocal, LPOSVERSIONINFOEX osvi, LPSERVER_INFO_102 pBuf102)
INT GetServicePack(BOOL bLocal, LPOSVERSIONINFOEX osvi, LPSERVER_INFO_102 pBuf102, TCHAR *Server)
INT GetMajValue(BOOL Major, BOOL bLocal, LPOSVERSIONINFOEX osvi, LPSERVER_INFO_102 pBuf102)
VOID GetBasicInfo(LPOSVERSIONINFOEX osvi, TCHAR *HostName, TCHAR *OSName, TCHAR *Version, TCHAR *Role, TCHAR *Components)
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
HLOCAL NTAPI LocalFree(HLOCAL hMem)
#define SV_TYPE_SERVER_NT
struct _SERVER_INFO_102 * LPSERVER_INFO_102
#define SV_TYPE_DOMAIN_BAKCTRL
#define SV_TYPE_DOMAIN_CTRL
#define VER_SUITE_SMALLBUSINESS_RESTRICTED
#define VER_SUITE_ENTERPRISE
#define VER_SUITE_SMALLBUSINESS
#define VER_SUITE_DATACENTER
#define VER_SUITE_PERSONAL
#define VER_SUITE_EMBEDDEDNT
_Check_return_ _CRTIMP int __cdecl _wcsicmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)
LPWSTR *WINAPI CommandLineToArgvW(LPCWSTR lpCmdline, int *numargs)
static void Server(int port)
ULONG dwOSVersionInfoSize
DWORD sv102_version_major
DWORD sv102_version_minor
_Must_inspect_result_ _In_ WDFDEVICE _In_ LPCGUID _Out_ PINTERFACE _In_ USHORT _In_ USHORT Version
DWORD WINAPI GetLastError(void)
#define CONNECT_INTERACTIVE
#define CONNECT_COMMANDLINE
#define WNetCancelConnection2
#define WNetAddConnection2
#define VER_NT_WORKSTATION
OSVERSIONINFOEXA OSVERSIONINFOEX
#define VER_NT_DOMAIN_CONTROLLER
LPOSVERSIONINFOEXA LPOSVERSIONINFOEX