Meltedd / HVNC

Standalone HVNC Client & Server | Coded in C++ (Modified Tinynuke)
403 stars 123 forks source link

compiling error #17

Closed Man755 closed 2 years ago

Man755 commented 2 years ago

hey a tried compiling the server and client by using g++ with the g++ .cpp -o command and it gave me errors. Here are the logs HiddenDesktop.cpp: In function 'SOCKET ConnectServer()': HiddenDesktop.cpp:229:24: warning: converting to non-pointer type 'SOCKET' {aka 'long long unsigned int'} from NULL [-Wconversion-null] 229 | return NULL; | ^~~~ HiddenDesktop.cpp:231:24: warning: converting to non-pointer type 'SOCKET' {aka 'long long unsigned int'} from NULL [-Wconversion-null] 231 | return NULL; | ^~~~ HiddenDesktop.cpp:239:24: warning: converting to non-pointer type 'SOCKET' {aka 'long long unsigned int'} from NULL [-Wconversion-null] 239 | return NULL; | ^~~~ HiddenDesktop.cpp: In function 'void killproc(const char)': HiddenDesktop.cpp:326:69: warning: passing NULL to non-pointer argument 2 of 'void CreateToolhelp32Snapshot(DWORD, DWORD)' [-Wconversion-null] 326 | HANDLE hSnapShot = CreateToolhelp32Snapshot(TH32CS_SNAPALL, NULL); | ^~~~ In file included from Client../common/Common.h:13, from Client\HiddenDesktop.h:2: C:/msys64/mingw64/include/TlHelp32.h:15:62: note: declared here 15 | HANDLE WINAPI CreateToolhelp32Snapshot(DWORD dwFlags,DWORD th32ProcessID); | ~~^~~~~ HiddenDesktop.cpp: In function 'void StartFirefox()': HiddenDesktop.cpp:480:1: error: jump to label 'exit' 480 | exit: | ^~~~ HiddenDesktop.cpp:448:22: note: from here 448 | goto exit; | ^~~~ HiddenDesktop.cpp:477:29: note: crosses initialization of 'PROCESS_INFORMATION processInfo' 477 | PROCESS_INFORMATION processInfo = { 0 }; | ^~~ HiddenDesktop.cpp:474:22: note: crosses initialization of 'STARTUPINFOA startupInfo' 474 | STARTUPINFOA startupInfo = { 0 }; | ^~~ HiddenDesktop.cpp:466:14: note: crosses initialization of 'char browserPath [260]' 466 | char browserPath[MAX_PATH] = { 0 }; | ^~~ HiddenDesktop.cpp:452:14: note: crosses initialization of 'char realPath [260]' 452 | char realPath[MAX_PATH] = { 0 }; | ^~~~ HiddenDesktop.cpp:480:1: error: jump to label 'exit' 480 | exit: | ^~~~ HiddenDesktop.cpp:445:22: note: from here 445 | goto exit; | ^~~~ HiddenDesktop.cpp:477:29: note: crosses initialization of 'PROCESS_INFORMATION processInfo' 477 | PROCESS_INFORMATION processInfo = { 0 }; | ^~~ HiddenDesktop.cpp:474:22: note: crosses initialization of 'STARTUPINFOA startupInfo' 474 | STARTUPINFOA startupInfo = { 0 }; | ^~~ HiddenDesktop.cpp:466:14: note: crosses initialization of 'char browserPath [260]' 466 | char browserPath[MAX_PATH] = { 0 }; | ^~~ HiddenDesktop.cpp:452:14: note: crosses initialization of 'char realPath [260]' 452 | char realPath[MAX_PATH] = { 0 }; | ^~~~ HiddenDesktop.cpp:446:15: note: crosses initialization of 'char pathEnd' 446 | char pathEnd = Funcs::pStrStrA(path, "\r"); | ^~~ HiddenDesktop.cpp:480:1: error: jump to label 'exit' 480 | exit: | ^~~~ HiddenDesktop.cpp:439:22: note: from here 439 | goto exit; | ^~~~ HiddenDesktop.cpp:477:29: note: crosses initialization of 'PROCESS_INFORMATION processInfo' 477 | PROCESS_INFORMATION processInfo = { 0 }; | ^~~ HiddenDesktop.cpp:474:22: note: crosses initialization of 'STARTUPINFOA startupInfo' 474 | STARTUPINFOA startupInfo = { 0 }; | ^~~ HiddenDesktop.cpp:466:14: note: crosses initialization of 'char browserPath [260]' 466 | char browserPath[MAX_PATH] = { 0 }; | ^~~ HiddenDesktop.cpp:452:14: note: crosses initialization of 'char realPath [260]' 452 | char realPath[MAX_PATH] = { 0 }; | ^~~~ HiddenDesktop.cpp:446:15: note: crosses initialization of 'char pathEnd' 446 | char pathEnd = Funcs::pStrStrA(path, "\r"); | ^~~ HiddenDesktop.cpp:443:15: note: crosses initialization of 'char path' 443 | char path = Funcs::pStrStrA(profilesIniContent, Strs::hd13); | ^~~~ HiddenDesktop.cpp:441:14: note: crosses initialization of 'BOOL isRelative' 441 | BOOL isRelative = (isRelativeRead == '1'); | ^~~~~~ HiddenDesktop.cpp: In function 'DWORD InputThread(LPVOID)': HiddenDesktop.cpp:532:34: warning: converting to non-pointer type 'long long int' from NULL [-Wconversion-null] 532 | LRESULT resMoveType = NULL; | ^~~~ HiddenDesktop.cpp:663:92: warning: converting to non-pointer type 'WPARAM' {aka 'long long unsigned int'} from NULL [-Wconversion-null] 663 | LRESULT lResult = Funcs::pSendMessageA(hWnd, WM_NCHITTEST, NULL, lParam); | ^~~~ HiddenDesktop.cpp:670:92: warning: converting to non-pointer type 'WPARAM' {aka 'long long unsigned int'} from NULL [-Wconversion-null] 670 | lResult = Funcs::pSendMessageA(hWnd, WM_NCHITTEST, NULL, lParam); | ^~~~ HiddenDesktop.cpp:716:63: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] 716 | HMENU hMenu = (HMENU)Funcs::pSendMessageA(hWnd, MN_GETHMENU, 0, 0); | ^~~~~~~~~~~~ HiddenDesktop.cpp:731:96: warning: converting to non-pointer type 'WPARAM' {aka 'long long unsigned int'} from NULL [-Wconversion-null] 731 | resMoveType = Funcs::pSendMessageA(hWnd, WM_NCHITTEST, NULL, lParam); | ^~~~