Giter VIP home page Giter VIP logo

redalert3networkfix's People

Contributors

tom-plants avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

redalert3networkfix's Issues

编译出错

你好,我在尝试编译时出现一下问题,能帮忙看下是什么错误吗?感激(另外希望能提供编译好的程序,这样会方便很多,我们用 n2n 联机失败,估计是作者说的多网卡问题)
$ gcc -I D:\迅雷下载\redalert3networkfix-master\disasm-lib -I D:\迅雷下载\redalert3networkfix-master\mhook-lib D:\迅雷下载\redalert3networkfix-master\InjectRA3DLL\main.cpp
D:\迅雷下载\redalert3networkfix-master\InjectRA3DLL\main.cpp:47:31: error: ‘::main’ must return ‘int’
47 | __declspec(dllexport) void main()
| ^~~~
D:\迅雷下载\redalert3networkfix-master\InjectRA3DLL\main.cpp: In function ‘int main()’:
D:\迅雷下载\redalert3networkfix-master\InjectRA3DLL\main.cpp:49:67: warning: passing NULL to non-pointer argument 4 of ‘int MessageBoxA(HWND, LPCSTR, LPCSTR, UINT)’ [-Wconversion-null]
49 | MessageBox(NULL, _T("▒Ѿ▒ע▒▒▒ɫ▒▒▒▒3"), _T("▒▒ʾ"), NULL);
| ^~~~
In file included from /usr/include/w32api/windows.h:72,
from /usr/include/w32api/WinSock2.h:23,
from D:\迅雷下载\redalert3networkfix-master\InjectRA3DLL\main.cpp:1:
/usr/include/w32api/winuser.h:3711:83: note: declared here
3711 | WINUSERAPI int WINAPI MessageBoxA(HWND hWnd,LPCSTR lpText,LPCSTR lpCaption,UINT uType);
| ~~~~~^~~~~
D:\迅雷下载\redalert3networkfix-master\InjectRA3DLL\main.cpp:60:52: error: invalid conversion from ‘SOCKET ()(int, int, int)’ {aka ‘long long unsigned int ()(int, int, int)’} to ‘PVOID’ {aka ‘void*’} [-fpermissive]
60 | Mhook_SetHook((PVOID*)&TrueSocket, Hook_socket);
| ^~~~~~~~~~~
| |
| SOCKET ()(int, int, int) {aka long long unsigned int ()(int, int, int)}
In file included from D:\迅雷下载\redalert3networkfix-master\InjectRA3DLL\main.cpp:4:
D:\迅雷下载\redalert3networkfix-master\mhook-lib/mhook.h:27:51: note: initializing argument 2 of ‘BOOL Mhook_SetHook(void**, PVOID)’
27 | BOOL Mhook_SetHook(PVOID ppSystemFunction, PVOID pHookFunction);
| ~~~~~~^~~~~~~~~~~~~
D:\迅雷下载\redalert3networkfix-master\InjectRA3DLL\main.cpp:61:53: error: invalid conversion from ‘int (
)(SOCKET, const sockaddr*, int)’ {aka ‘int ()(long long unsigned int, const sockaddr, int)’} to ‘PVOID’ {aka ‘void*’} [-fpermissive]
61 | Mhook_SetHook((PVOID*)&TrueConnect, Hook_connect);
| ^~~~~~~~~~~~
| |
| int ()(SOCKET, const sockaddr, int) {aka int ()(long long unsigned int, const sockaddr, int)}
In file included from D:\迅雷下载\redalert3networkfix-master\InjectRA3DLL\main.cpp:4:
D:\迅雷下载\redalert3networkfix-master\mhook-lib/mhook.h:27:51: note: initializing argument 2 of ‘BOOL Mhook_SetHook(void**, PVOID)’
27 | BOOL Mhook_SetHook(PVOID ppSystemFunction, PVOID pHookFunction);
| ~~~~~~^~~~~~~~~~~~~
D:\迅雷下载\redalert3networkfix-master\InjectRA3DLL\main.cpp:62:59: error: invalid conversion from ‘hostent
()(const char)’ to ‘PVOID’ {aka ‘void*’} [-fpermissive]
62 | Mhook_SetHook((PVOID*)&TrueGetHostByName, HOOK_gethostbyname);
| ^~~~~~~~~~~~~~~~~~
| |
| hostent* ()(const char)
In file included from D:\迅雷下载\redalert3networkfix-master\InjectRA3DLL\main.cpp:4:
D:\迅雷下载\redalert3networkfix-master\mhook-lib/mhook.h:27:51: note: initializing argument 2 of ‘BOOL Mhook_SetHook(void**, PVOID)’
27 | BOOL Mhook_SetHook(PVOID ppSystemFunction, PVOID pHookFunction);
| ~~~~~~^~~~~~~~~~~~~
D:\迅雷下载\redalert3networkfix-master\InjectRA3DLL\main.cpp:63:50: error: invalid conversion from ‘int (
)(SOCKET, const sockaddr*, int)’ {aka ‘int ()(long long unsigned int, const sockaddr, int)’} to ‘PVOID’ {aka ‘void*’} [-fpermissive]
63 | Mhook_SetHook((PVOID*)&TrueBind, HOOK_bind);
| ^~~~~~~~~
| |
| int ()(SOCKET, const sockaddr, int) {aka int ()(long long unsigned int, const sockaddr, int)}
In file included from D:\迅雷下载\redalert3networkfix-master\InjectRA3DLL\main.cpp:4:
D:\迅雷下载\redalert3networkfix-master\mhook-lib/mhook.h:27:51: note: initializing argument 2 of ‘BOOL Mhook_SetHook(void**, PVOID)’
27 | BOOL Mhook_SetHook(PVOID *ppSystemFunction, PVOID pHookFunction);

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.