I got problem with WinSock2, i need it but i got some errors
Here is my file with the codes:
Some Errors that shows:Code:#pragma once ///////////////////////////////////////////////////////////////////////////////////// #ifndef WINVER // Allow use of features specific to Windows XP or later. #define WINVER 0x0501 // Change this to the appropriate value to target other versions of Windows. #endif #ifndef _WIN32_WINNT // Allow use of features specific to Windows XP or later. #define _WIN32_WINNT 0x0601 // Change this to the appropriate value to target other versions of Windows. #endif #ifndef _WIN32_WINDOWS // Allow use of features specific to Windows 98 or later. #define _WIN32_WINDOWS 0x0501 // Change this to the appropriate value to target Windows Me or later. #endif #ifndef _WIN32_IE // Allow use of features specific to IE 6.0 or later. #define _WIN32_IE 0x0700 // Change this to the appropriate value to target other versions of IE. #endif #define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers ///////////////////////////////////////////////////////////////////////////////////// /*#include <Windows.h> #include <iostream> #include <time.h> #include <conio.h> #include <stdio.h> #include <tchar.h> #include <math.h> #include <time.h> #include <stdlib.h> */ ///////////////////////////////////////////////////////////////////////////////////// #include <Process.h> #include <windows.h> #include <winbase.h> #include <iostream> #include <time.h> #include <conio.h> #include <stdio.h> #include <vector> #include <map> #include <cstdarg> #include <cstdlib> #include <cstdio> #include <tchar.h> #include <math.h> #include <stdlib.h> #include <direct.h> #include <fcntl.h> #include <io.h> #include <vector> #include <rpc.h> #include <rpcdce.h> using namespace std; #include <WinSock2.h> #pragma comment(lib,"ws2_32.lib" ) #pragma comment(lib,"rpcrt4.lib" ) #pragma comment(lib,"wsock32.lib" ) #pragma comment(lib,"COMCTL32.lib" ) static HMENU MyMenu; static DWORD OldProtect; static UINT_PTR MyMenuTimerID; static UINT_PTR cPluginsTimer; static HWND cWND; static HINSTANCE hInst; #pragma warning(disable : 4010) #pragma warning(disable : 4101) #pragma warning(disable : 4311) #pragma warning(disable : 4312) #pragma warning(disable : 4482) #pragma warning(disable : 4700) #pragma warning(disable : 4996) typedef BYTE OBJECTSTRUCT; typedef enum{ Preto = 1, Vermelho = 2, Verde = 3, Azul = 4, Vermelho2 = 5, Azul2 = 6, Rosa = 7 }LogColors;
Code:warning C4005: 'AF_IPX' : macro redefinition warning C4005: 'AF_MAX' : macro redefinition warning C4005: 'SO_DONTLINGER' : macro redefinition error C2011: 'sockaddr' : 'struct' type redefinition error C2059: syntax error : 'constant'


Reply With Quote