From 92203dc7cafb68fc605361b5e5a56d784eef669f Mon Sep 17 00:00:00 2001 From: Shauleiz Date: Thu, 28 Apr 2016 18:31:56 +0300 Subject: [PATCH] Add static vXboxInterface library file (C++) and dynamic vDevInterface library file (C) vDevInterface.dll uses vXboxInterface.lib to create a DLL that encapsulates the vXbox API. It will later be the generic (vJoy/vXbox) interface file. (+2 squashed commit) Squashed commit: [2c8fb23] Add static vXboxInterface library file First function implemented [3a85197] Add static vXboxInterface library file Starting --- .gitignore | 1 + API/vXboxApi.h | 4 +- .../vXboxInterface-Static.vcxproj | 173 ++++++ .../vXboxInterface-Static.vcxproj.filters | 42 ++ API/vXboxInterface.cpp | 529 +++++++++--------- API/vXboxInterface.h | 13 +- API/vXboxInterface.vcxproj | 10 +- Test/Test-vXboxInterface.vcxproj | 2 +- Test/Test.cpp | 4 +- vDevInterface/ReadMe.txt | 40 ++ vDevInterface/dllmain.cpp | 19 + vDevInterface/stdafx.cpp | 8 + vDevInterface/stdafx.h | 15 + vDevInterface/targetver.h | 8 + vDevInterface/vDevInterface.cpp | 50 ++ vDevInterface/vDevInterface.h | 59 ++ vDevInterface/vDevInterface.vcxproj | 186 ++++++ vDevInterface/vDevInterface.vcxproj.filters | 42 ++ vXboxInterface.sln | 27 + 19 files changed, 964 insertions(+), 268 deletions(-) create mode 100644 API/vXboxInterface-Static/vXboxInterface-Static.vcxproj create mode 100644 API/vXboxInterface-Static/vXboxInterface-Static.vcxproj.filters create mode 100644 vDevInterface/ReadMe.txt create mode 100644 vDevInterface/dllmain.cpp create mode 100644 vDevInterface/stdafx.cpp create mode 100644 vDevInterface/stdafx.h create mode 100644 vDevInterface/targetver.h create mode 100644 vDevInterface/vDevInterface.cpp create mode 100644 vDevInterface/vDevInterface.h create mode 100644 vDevInterface/vDevInterface.vcxproj create mode 100644 vDevInterface/vDevInterface.vcxproj.filters diff --git a/.gitignore b/.gitignore index 07b924a..0afd143 100644 --- a/.gitignore +++ b/.gitignore @@ -237,3 +237,4 @@ _Pvt_Extensions *.db API/ReadMe.txt Test/Test-vXboxInterface.sln +API/vXboxInterface-Static/ReadMe.txt diff --git a/API/vXboxApi.h b/API/vXboxApi.h index 7885079..9fb817f 100644 --- a/API/vXboxApi.h +++ b/API/vXboxApi.h @@ -1,8 +1,10 @@ #pragma once #include -#ifdef VXBOX_EXPORTS +#ifdef DYNAMIC_LIB #define VXBOX_API __declspec(dllexport) +#elif defined(STATIC_LIB) +#define VXBOX_API #else #define VXBOX_API __declspec(dllimport) #endif diff --git a/API/vXboxInterface-Static/vXboxInterface-Static.vcxproj b/API/vXboxInterface-Static/vXboxInterface-Static.vcxproj new file mode 100644 index 0000000..c7e3cb4 --- /dev/null +++ b/API/vXboxInterface-Static/vXboxInterface-Static.vcxproj @@ -0,0 +1,173 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + {7486ED4E-5822-46BB-BB12-385FFD6592B0} + Win32Proj + vXboxInterfaceStatic + 8.1 + + + + StaticLibrary + true + v120 + Unicode + + + StaticLibrary + false + v120 + true + Unicode + + + StaticLibrary + true + v120 + Unicode + + + StaticLibrary + false + v120 + true + Unicode + + + + + + + + + + + + + + + + + + + + + $(SolutionDir)$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + + + $(SolutionDir)$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + + + + + + Level3 + Disabled + WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions);STATIC_LIB + true + + + Windows + + + false + setupapi.lib + + + + + + + Level3 + Disabled + _DEBUG;_LIB;%(PreprocessorDefinitions);STATIC_LIB + true + + + Windows + + + false + setupapi.lib + + + + + Level3 + NotUsing + MaxSpeed + true + true + WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions);STATIC_LIB + true + false + + + Windows + true + true + + + false + setupapi.lib + + + + + Level3 + + + MaxSpeed + true + true + NDEBUG;_LIB;%(PreprocessorDefinitions);STATIC_LIB + true + false + + + Windows + true + true + + + false + setupapi.lib + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/API/vXboxInterface-Static/vXboxInterface-Static.vcxproj.filters b/API/vXboxInterface-Static/vXboxInterface-Static.vcxproj.filters new file mode 100644 index 0000000..b60f031 --- /dev/null +++ b/API/vXboxInterface-Static/vXboxInterface-Static.vcxproj.filters @@ -0,0 +1,42 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + + + Source Files + + + Source Files + + + \ No newline at end of file diff --git a/API/vXboxInterface.cpp b/API/vXboxInterface.cpp index 103eea5..6f5e92f 100644 --- a/API/vXboxInterface.cpp +++ b/API/vXboxInterface.cpp @@ -18,321 +18,340 @@ extern "C" #include "vXboxApi.h" #include "vXboxInterface.h" +#ifdef STATIC_LIB +#undef VXBOX_API +#define VXBOX_API +namespace vXboxNS { +#else + extern "C" + { +#endif // TARGET== STATIC_LIB -// Interface Functions -extern "C" -{ + // Interface Functions - VXBOX_API BOOL __cdecl isVBusExists(void) - { - TCHAR path[MAX_PATH]; + VXBOX_API BOOL __cdecl isVBusExists(void) + { + TCHAR path[MAX_PATH]; - int n = GetVXbusPath(path, MAX_PATH); + int n = GetVXbusPath(path, MAX_PATH); - if (n > 0) - return TRUE; - else - return FALSE; - } + if (n > 0) + return TRUE; + else + return FALSE; + } + + VXBOX_API BOOL __cdecl GetNumEmptyBusSlots(UCHAR * nSlots) + { + UCHAR output[1]; + DWORD trasfered = 0; - VXBOX_API BOOL __cdecl GetNumEmptyBusSlots(UCHAR * nSlots) - { - UCHAR output[1]; - DWORD trasfered = 0; + if (g_hBus == INVALID_HANDLE_VALUE) + g_hBus = GetVXbusHandle(); + if (g_hBus == INVALID_HANDLE_VALUE) + return FALSE; + + // Send request to bus + if (DeviceIoControl(g_hBus, IOCTL_BUSENUM_EMPTY_SLOTS, nullptr, 0, output, 1, &trasfered, nullptr)) + { + *nSlots = *output; + return TRUE; + } - if (g_hBus == INVALID_HANDLE_VALUE) - g_hBus = GetVXbusHandle(); - if (g_hBus == INVALID_HANDLE_VALUE) return FALSE; + } - // Send request to bus - if (DeviceIoControl(g_hBus, IOCTL_BUSENUM_EMPTY_SLOTS, nullptr, 0, output, 1, &trasfered, nullptr)) + VXBOX_API BOOL __cdecl isControllerExists(UINT UserIndex) { - *nSlots = *output; - return TRUE; - } + BOOL out = FALSE; + ULONG buffer[1]; + ULONG output[1]; + DWORD trasfered = 0; - return FALSE; - } + if (UserIndex < 1 || UserIndex>4) + return out; - VXBOX_API BOOL __cdecl isControllerExists(UINT UserIndex) - { - BOOL out = FALSE; - ULONG buffer[1]; - ULONG output[1]; - DWORD trasfered = 0; + if (g_hBus == INVALID_HANDLE_VALUE) + g_hBus = GetVXbusHandle(); + if (g_hBus == INVALID_HANDLE_VALUE) + return out; - if (UserIndex < 1 || UserIndex>4) - return out; + // Prepare the User Index for sending + buffer[0] = UserIndex; + + // Send request to bus + if (DeviceIoControl(g_hBus, IOCTL_BUSENUM_ISDEVPLUGGED, buffer, _countof(buffer), output, 4, &trasfered, nullptr)) + { + if (*output != 0) + out = TRUE; + }; - if (g_hBus == INVALID_HANDLE_VALUE) - g_hBus = GetVXbusHandle(); - if (g_hBus == INVALID_HANDLE_VALUE) return out; + } - // Prepare the User Index for sending - buffer[0] = UserIndex; - - // Send request to bus - if (DeviceIoControl(g_hBus, IOCTL_BUSENUM_ISDEVPLUGGED, buffer, _countof(buffer), output, 4, &trasfered, nullptr)) + VXBOX_API BOOL __cdecl isControllerOwned(UINT UserIndex) { - if (*output != 0) - out = TRUE; - }; + ULONG OrigProcID = 0; + ULONG ThisProcID = 0; - return out; - } + // Sanity Check + if (UserIndex < 1 || UserIndex>4) + return FALSE; - VXBOX_API BOOL __cdecl isControllerOwned(UINT UserIndex) - { - ULONG OrigProcID = 0; - ULONG ThisProcID = 0; + // Does controler exist? + if (!isControllerExists(UserIndex)) + return FALSE; - // Sanity Check - if (UserIndex < 1 || UserIndex>4) - return FALSE; - - // Does controler exist? - if (!isControllerExists(UserIndex)) - return FALSE; + // Get ID of the process that created the controler? + if (!GetCreateProcID(UserIndex, &OrigProcID) || !OrigProcID) + return FALSE; - // Get ID of the process that created the controler? - if (!GetCreateProcID(UserIndex, &OrigProcID) || !OrigProcID) - return FALSE; + // Get ID of current process + ThisProcID = GetCurrentProcessId(); + if (!ThisProcID) + return FALSE; - // Get ID of current process - ThisProcID = GetCurrentProcessId(); - if (!ThisProcID) - return FALSE; + // Compare + if (ThisProcID != OrigProcID) + return FALSE; - // Compare - if (ThisProcID!=OrigProcID) - return FALSE; + return TRUE; - return TRUE; + } - } + VXBOX_API BOOL __cdecl PlugIn(UINT UserIndex) + { + BOOL out = FALSE; - VXBOX_API BOOL __cdecl PlugIn(UINT UserIndex) - { - BOOL out = FALSE; + if (UserIndex < 1 || UserIndex>4) + return out; - if (UserIndex < 1 || UserIndex>4) - return out; + if (g_hBus == INVALID_HANDLE_VALUE) + g_hBus = GetVXbusHandle(); + if (g_hBus == INVALID_HANDLE_VALUE) + return out; - if (g_hBus == INVALID_HANDLE_VALUE) - g_hBus = GetVXbusHandle(); - if (g_hBus == INVALID_HANDLE_VALUE) - return out; + DWORD trasfered = 0; + UCHAR buffer[16] = {}; - DWORD trasfered = 0; - UCHAR buffer[16] = {}; + buffer[0] = 0x10; - buffer[0] = 0x10; + buffer[4] = ((UserIndex >> 0) & 0xFF); + buffer[5] = ((UserIndex >> 8) & 0xFF); + buffer[6] = ((UserIndex >> 16) & 0xFF); + buffer[8] = ((UserIndex >> 24) & 0xFF); - buffer[4] = ((UserIndex >> 0) & 0xFF); - buffer[5] = ((UserIndex >> 8) & 0xFF); - buffer[6] = ((UserIndex >> 16) & 0xFF); - buffer[8] = ((UserIndex >> 24) & 0xFF); + if (DeviceIoControl(g_hBus, IOCTL_BUSENUM_PLUGIN_HARDWARE, buffer, _countof(buffer), nullptr, 0, &trasfered, nullptr)) + { + out = TRUE; + g_vDevice[UserIndex - 1] = TRUE; + }; - if (DeviceIoControl(g_hBus, IOCTL_BUSENUM_PLUGIN_HARDWARE, buffer, _countof(buffer), nullptr, 0, &trasfered, nullptr)) - { - out = TRUE; - g_vDevice[UserIndex - 1] = TRUE; - }; + //CloseHandle(h); + DWORD error = 0; + if (out) + { + //std::cout << "IOCTL_BUSENUM_PLUGIN_HARDWARE 0X" << IOCTL_BUSENUM_PLUGIN_HARDWARE << "\n" << endl; + error = 0; + } + else + { + error = GetLastError(); + //std::cout << "IOCTL_BUSENUM_PLUGIN_HARDWARE 0X" << IOCTL_BUSENUM_PLUGIN_HARDWARE << "Failed (Error:0X" << error << ")\n" << endl; + } - //CloseHandle(h); - DWORD error = 0 ; - if (out) - { - //std::cout << "IOCTL_BUSENUM_PLUGIN_HARDWARE 0X" << IOCTL_BUSENUM_PLUGIN_HARDWARE << "\n" << endl; - error = 0; + return out; } - else + + VXBOX_API BOOL __cdecl UnPlug(UINT UserIndex) { - error = GetLastError(); - //std::cout << "IOCTL_BUSENUM_PLUGIN_HARDWARE 0X" << IOCTL_BUSENUM_PLUGIN_HARDWARE << "Failed (Error:0X" << error << ")\n" << endl; + return UnPlug_Opt(UserIndex, FALSE); } - return out; - } + VXBOX_API BOOL __cdecl UnPlugForce(UINT UserIndex) + { + return UnPlug_Opt(UserIndex, TRUE); + } - VXBOX_API BOOL __cdecl UnPlug(UINT UserIndex) - { - return UnPlug_Opt(UserIndex, FALSE); - } + VXBOX_API BOOL __cdecl SetAxisX(UINT UserIndex, SHORT Value) // Left Stick X + { + g_Gamepad[UserIndex - 1].sThumbLX = Value; + return XOutputSetState(UserIndex, &g_Gamepad[UserIndex - 1]); + } - VXBOX_API BOOL __cdecl UnPlugForce(UINT UserIndex) - { - return UnPlug_Opt(UserIndex, TRUE); - } + VXBOX_API BOOL __cdecl SetAxisY(UINT UserIndex, SHORT Value) // Left Stick X + { + g_Gamepad[UserIndex - 1].sThumbLY = Value; + return XOutputSetState(UserIndex, &g_Gamepad[UserIndex - 1]); + } - VXBOX_API BOOL __cdecl SetAxisX(UINT UserIndex, SHORT Value) // Left Stick X - { - g_Gamepad[UserIndex - 1].sThumbLX = Value; - return XOutputSetState(UserIndex, &g_Gamepad[UserIndex - 1]); - } + VXBOX_API BOOL __cdecl SetAxisRx(UINT UserIndex, SHORT Value) // Left Stick X + { + g_Gamepad[UserIndex - 1].sThumbRX = Value; + return XOutputSetState(UserIndex, &g_Gamepad[UserIndex - 1]); + } - VXBOX_API BOOL __cdecl SetAxisY(UINT UserIndex, SHORT Value) // Left Stick X - { - g_Gamepad[UserIndex - 1].sThumbLY = Value; - return XOutputSetState(UserIndex, &g_Gamepad[UserIndex - 1]); - } + VXBOX_API BOOL __cdecl SetAxisRy(UINT UserIndex, SHORT Value) // Left Stick X + { + g_Gamepad[UserIndex - 1].sThumbRY = Value; + return XOutputSetState(UserIndex, &g_Gamepad[UserIndex - 1]); + } - VXBOX_API BOOL __cdecl SetAxisRx(UINT UserIndex, SHORT Value) // Left Stick X - { - g_Gamepad[UserIndex - 1].sThumbRX = Value; - return XOutputSetState(UserIndex, &g_Gamepad[UserIndex - 1]); - } + VXBOX_API BOOL __cdecl SetDpad(UINT UserIndex, INT Value) + { + g_Gamepad[UserIndex - 1].wButtons &= 0xFFF0; + g_Gamepad[UserIndex - 1].wButtons |= Value; + return XOutputSetState(UserIndex, &g_Gamepad[UserIndex - 1]); + } - VXBOX_API BOOL __cdecl SetAxisRy(UINT UserIndex, SHORT Value) // Left Stick X - { - g_Gamepad[UserIndex - 1].sThumbRY = Value; - return XOutputSetState(UserIndex, &g_Gamepad[UserIndex - 1]); - } - VXBOX_API BOOL __cdecl SetDpadUp(UINT UserIndex) - { - return SetDpad(UserIndex, DPAD_UP); - } - VXBOX_API BOOL __cdecl SetDpadRight(UINT UserIndex) - { - return SetDpad(UserIndex, DPAD_RIGHT); - } + VXBOX_API BOOL __cdecl SetDpadUp(UINT UserIndex) + { + return SetDpad(UserIndex, DPAD_UP); + } + VXBOX_API BOOL __cdecl SetDpadRight(UINT UserIndex) + { + return SetDpad(UserIndex, DPAD_RIGHT); + } - VXBOX_API BOOL __cdecl SetDpadDown(UINT UserIndex) - { - return SetDpad(UserIndex, DPAD_DOWN); - } + VXBOX_API BOOL __cdecl SetDpadDown(UINT UserIndex) + { + return SetDpad(UserIndex, DPAD_DOWN); + } - VXBOX_API BOOL __cdecl SetDpadLeft(UINT UserIndex) - { - return SetDpad(UserIndex, DPAD_LEFT); - } - VXBOX_API BOOL __cdecl SetDpadOff(UINT UserIndex) - { - return SetDpad(UserIndex, 0); - } + VXBOX_API BOOL __cdecl SetDpadLeft(UINT UserIndex) + { + return SetDpad(UserIndex, DPAD_LEFT); + } + VXBOX_API BOOL __cdecl SetDpadOff(UINT UserIndex) + { + return SetDpad(UserIndex, 0); + } - VXBOX_API BOOL __cdecl SetBtnA(UINT UserIndex, BOOL Press) - { - UINT Btn = XINPUT_GAMEPAD_A; - g_Gamepad[UserIndex - 1].wButtons &= ~Btn; - g_Gamepad[UserIndex - 1].wButtons |= Btn*Press; - return XOutputSetState(UserIndex, &g_Gamepad[UserIndex - 1]); - } - VXBOX_API BOOL __cdecl SetBtnB(UINT UserIndex, BOOL Press) - { - UINT Btn = XINPUT_GAMEPAD_B; - g_Gamepad[UserIndex - 1].wButtons &= ~Btn; - g_Gamepad[UserIndex - 1].wButtons |= Btn*Press; - return XOutputSetState(UserIndex, &g_Gamepad[UserIndex - 1]); - } + VXBOX_API BOOL __cdecl SetBtnA(UINT UserIndex, BOOL Press) + { + UINT Btn = XINPUT_GAMEPAD_A; + g_Gamepad[UserIndex - 1].wButtons &= ~Btn; + g_Gamepad[UserIndex - 1].wButtons |= Btn*Press; + return XOutputSetState(UserIndex, &g_Gamepad[UserIndex - 1]); + } + VXBOX_API BOOL __cdecl SetBtnB(UINT UserIndex, BOOL Press) + { + UINT Btn = XINPUT_GAMEPAD_B; + g_Gamepad[UserIndex - 1].wButtons &= ~Btn; + g_Gamepad[UserIndex - 1].wButtons |= Btn*Press; + return XOutputSetState(UserIndex, &g_Gamepad[UserIndex - 1]); + } - VXBOX_API BOOL __cdecl SetBtnX(UINT UserIndex, BOOL Press) - { - UINT Btn = XINPUT_GAMEPAD_X; - g_Gamepad[UserIndex - 1].wButtons &= ~Btn; - g_Gamepad[UserIndex - 1].wButtons |= Btn*Press; - return XOutputSetState(UserIndex, &g_Gamepad[UserIndex - 1]); - } + VXBOX_API BOOL __cdecl SetBtnX(UINT UserIndex, BOOL Press) + { + UINT Btn = XINPUT_GAMEPAD_X; + g_Gamepad[UserIndex - 1].wButtons &= ~Btn; + g_Gamepad[UserIndex - 1].wButtons |= Btn*Press; + return XOutputSetState(UserIndex, &g_Gamepad[UserIndex - 1]); + } - VXBOX_API BOOL __cdecl SetBtnY(UINT UserIndex, BOOL Press) - { - UINT Btn = XINPUT_GAMEPAD_Y; - g_Gamepad[UserIndex - 1].wButtons &= ~Btn; - g_Gamepad[UserIndex - 1].wButtons |= Btn*Press; - return XOutputSetState(UserIndex, &g_Gamepad[UserIndex - 1]); - } + VXBOX_API BOOL __cdecl SetBtnY(UINT UserIndex, BOOL Press) + { + UINT Btn = XINPUT_GAMEPAD_Y; + g_Gamepad[UserIndex - 1].wButtons &= ~Btn; + g_Gamepad[UserIndex - 1].wButtons |= Btn*Press; + return XOutputSetState(UserIndex, &g_Gamepad[UserIndex - 1]); + } - VXBOX_API BOOL __cdecl SetBtnStart(UINT UserIndex, BOOL Press) - { - UINT Btn = XINPUT_GAMEPAD_START; - g_Gamepad[UserIndex - 1].wButtons &= ~Btn; - g_Gamepad[UserIndex - 1].wButtons |= Btn*Press; - return XOutputSetState(UserIndex, &g_Gamepad[UserIndex - 1]); - } + VXBOX_API BOOL __cdecl SetBtnStart(UINT UserIndex, BOOL Press) + { + UINT Btn = XINPUT_GAMEPAD_START; + g_Gamepad[UserIndex - 1].wButtons &= ~Btn; + g_Gamepad[UserIndex - 1].wButtons |= Btn*Press; + return XOutputSetState(UserIndex, &g_Gamepad[UserIndex - 1]); + } - VXBOX_API BOOL __cdecl SetBtnBack(UINT UserIndex, BOOL Press) - { - UINT Btn = XINPUT_GAMEPAD_BACK; - g_Gamepad[UserIndex - 1].wButtons &= ~Btn; - g_Gamepad[UserIndex - 1].wButtons |= Btn*Press; - return XOutputSetState(UserIndex, &g_Gamepad[UserIndex - 1]); - } + VXBOX_API BOOL __cdecl SetBtnBack(UINT UserIndex, BOOL Press) + { + UINT Btn = XINPUT_GAMEPAD_BACK; + g_Gamepad[UserIndex - 1].wButtons &= ~Btn; + g_Gamepad[UserIndex - 1].wButtons |= Btn*Press; + return XOutputSetState(UserIndex, &g_Gamepad[UserIndex - 1]); + } - VXBOX_API BOOL __cdecl SetBtnLT(UINT UserIndex, BOOL Press) - { - UINT Btn = XINPUT_GAMEPAD_LEFT_THUMB; - g_Gamepad[UserIndex - 1].wButtons &= ~Btn; - g_Gamepad[UserIndex - 1].wButtons |= Btn*Press; - return XOutputSetState(UserIndex, &g_Gamepad[UserIndex - 1]); - } + VXBOX_API BOOL __cdecl SetBtnLT(UINT UserIndex, BOOL Press) + { + UINT Btn = XINPUT_GAMEPAD_LEFT_THUMB; + g_Gamepad[UserIndex - 1].wButtons &= ~Btn; + g_Gamepad[UserIndex - 1].wButtons |= Btn*Press; + return XOutputSetState(UserIndex, &g_Gamepad[UserIndex - 1]); + } - VXBOX_API BOOL __cdecl SetBtnRT(UINT UserIndex, BOOL Press) - { - UINT Btn = XINPUT_GAMEPAD_RIGHT_THUMB; - g_Gamepad[UserIndex - 1].wButtons &= ~Btn; - g_Gamepad[UserIndex - 1].wButtons |= Btn*Press; - return XOutputSetState(UserIndex, &g_Gamepad[UserIndex - 1]); - } + VXBOX_API BOOL __cdecl SetBtnRT(UINT UserIndex, BOOL Press) + { + UINT Btn = XINPUT_GAMEPAD_RIGHT_THUMB; + g_Gamepad[UserIndex - 1].wButtons &= ~Btn; + g_Gamepad[UserIndex - 1].wButtons |= Btn*Press; + return XOutputSetState(UserIndex, &g_Gamepad[UserIndex - 1]); + } - VXBOX_API BOOL __cdecl SetBtnLB(UINT UserIndex, BOOL Press) - { - UINT Btn = XINPUT_GAMEPAD_LEFT_SHOULDER; - g_Gamepad[UserIndex - 1].wButtons &= ~Btn; - g_Gamepad[UserIndex - 1].wButtons |= Btn*Press; - return XOutputSetState(UserIndex, &g_Gamepad[UserIndex - 1]); - } + VXBOX_API BOOL __cdecl SetBtnLB(UINT UserIndex, BOOL Press) + { + UINT Btn = XINPUT_GAMEPAD_LEFT_SHOULDER; + g_Gamepad[UserIndex - 1].wButtons &= ~Btn; + g_Gamepad[UserIndex - 1].wButtons |= Btn*Press; + return XOutputSetState(UserIndex, &g_Gamepad[UserIndex - 1]); + } - VXBOX_API BOOL __cdecl SetBtnRB(UINT UserIndex, BOOL Press) - { - UINT Btn = XINPUT_GAMEPAD_RIGHT_SHOULDER; - g_Gamepad[UserIndex - 1].wButtons &= ~Btn; - g_Gamepad[UserIndex - 1].wButtons |= Btn*Press; - return XOutputSetState(UserIndex, &g_Gamepad[UserIndex - 1]); - } + VXBOX_API BOOL __cdecl SetBtnRB(UINT UserIndex, BOOL Press) + { + UINT Btn = XINPUT_GAMEPAD_RIGHT_SHOULDER; + g_Gamepad[UserIndex - 1].wButtons &= ~Btn; + g_Gamepad[UserIndex - 1].wButtons |= Btn*Press; + return XOutputSetState(UserIndex, &g_Gamepad[UserIndex - 1]); + } - VXBOX_API BOOL __cdecl SetTriggerL(UINT UserIndex, BYTE Value) // Left Trigger - { - g_Gamepad[UserIndex - 1].bLeftTrigger = Value; - return XOutputSetState(UserIndex, &g_Gamepad[UserIndex - 1]); - } + VXBOX_API BOOL __cdecl SetTriggerL(UINT UserIndex, BYTE Value) // Left Trigger + { + g_Gamepad[UserIndex - 1].bLeftTrigger = Value; + return XOutputSetState(UserIndex, &g_Gamepad[UserIndex - 1]); + } - VXBOX_API BOOL __cdecl SetTriggerR(UINT UserIndex, BYTE Value) // Right Trigger - { - g_Gamepad[UserIndex - 1].bRightTrigger = Value; - return XOutputSetState(UserIndex, &g_Gamepad[UserIndex - 1]); - } + VXBOX_API BOOL __cdecl SetTriggerR(UINT UserIndex, BYTE Value) // Right Trigger + { + g_Gamepad[UserIndex - 1].bRightTrigger = Value; + return XOutputSetState(UserIndex, &g_Gamepad[UserIndex - 1]); + } - VXBOX_API BOOL __cdecl GetLedNumber(UINT UserIndex, PBYTE pLed) - { - BOOL ref = XOutputSetGetState(UserIndex, &g_Gamepad[UserIndex - 1], nullptr, nullptr, nullptr, pLed); - if (ref) - (*pLed)++; - return ref; - } + VXBOX_API BOOL __cdecl GetLedNumber(UINT UserIndex, PBYTE pLed) + { + BOOL ref = XOutputSetGetState(UserIndex, &g_Gamepad[UserIndex - 1], nullptr, nullptr, nullptr, pLed); + if (ref) + (*pLed)++; + return ref; + } - VXBOX_API BOOL GetVibration(UINT UserIndex, PXINPUT_VIBRATION pVib) - { - BYTE LargeMotor, SmallMotor, Vibrate; - BOOL ref = XOutputSetGetState(UserIndex, &g_Gamepad[UserIndex - 1], &Vibrate, &LargeMotor, &SmallMotor, nullptr); - if (ref) + VXBOX_API BOOL GetVibration(UINT UserIndex, PXINPUT_VIBRATION pVib) { - if (Vibrate) + BYTE LargeMotor, SmallMotor, Vibrate; + BOOL ref = XOutputSetGetState(UserIndex, &g_Gamepad[UserIndex - 1], &Vibrate, &LargeMotor, &SmallMotor, nullptr); + if (ref) { - (*pVib).wLeftMotorSpeed = LargeMotor * 256; - (*pVib).wRightMotorSpeed = SmallMotor * 256; - } - else - (*pVib).wLeftMotorSpeed = (*pVib).wRightMotorSpeed = 0; - }; - return ref; - } + if (Vibrate) + { + (*pVib).wLeftMotorSpeed = LargeMotor * 256; + (*pVib).wRightMotorSpeed = SmallMotor * 256; + } + else + (*pVib).wLeftMotorSpeed = (*pVib).wRightMotorSpeed = 0; + }; + return ref; + } -} +#ifndef STATIC_LIB + + } // extern "C" +#else +} +#endif // TARGET== STATIC_LIB /// Helper Functions @@ -541,12 +560,6 @@ WORD ConvertButton(LONG vBtns, WORD xBtns, UINT vBtn, UINT xBtn) return out; } -BOOL SetDpad(UINT UserIndex, INT Value) -{ - g_Gamepad[UserIndex - 1].wButtons &= 0xFFF0; - g_Gamepad[UserIndex - 1].wButtons |= Value; - return XOutputSetState(UserIndex, &g_Gamepad[UserIndex - 1]); -} BOOL UnPlug_Opt(UINT UserIndex, BOOL Force) { diff --git a/API/vXboxInterface.h b/API/vXboxInterface.h index 1e055f6..e931556 100644 --- a/API/vXboxInterface.h +++ b/API/vXboxInterface.h @@ -1,6 +1,6 @@ #include -#ifndef VXBOX_API +#if !defined(DYNAMIC_LIB) && !defined(STATIC_LIB) #define VXBOX_API __declspec(dllimport) #endif @@ -10,10 +10,15 @@ #define DPAD_RIGHT XINPUT_GAMEPAD_DPAD_RIGHT #define DPAD_OFF 0 - +#ifdef STATIC_LIB +#undef VXBOX_API +#define VXBOX_API +namespace vXboxNS { //////////// Interface Functions ///////////////////////// +#else extern "C" { +#endif // TARGET== STATIC_LIB /// Status VXBOX_API BOOL __cdecl isVBusExists(void); @@ -55,4 +60,8 @@ extern "C" VXBOX_API BOOL __cdecl GetLedNumber(UINT UserIndex, PBYTE pLed); VXBOX_API BOOL __cdecl GetVibration(UINT UserIndex, PXINPUT_VIBRATION pVib); +#ifndef STATIC_LIB } // extern "C" +#else +} +#endif // TARGET== STATIC_LIB diff --git a/API/vXboxInterface.vcxproj b/API/vXboxInterface.vcxproj index 1b414db..9b8326c 100644 --- a/API/vXboxInterface.vcxproj +++ b/API/vXboxInterface.vcxproj @@ -90,7 +90,7 @@ Use Level3 Disabled - WIN32;_DEBUG;_WINDOWS;_USRDLL;VXBOXINTERFACE_EXPORTS;%(PreprocessorDefinitions);VXBOX_EXPORTS + WIN32;_DEBUG;_WINDOWS;_USRDLL;VXBOXINTERFACE_EXPORTS;%(PreprocessorDefinitions);DYNAMIC_LIB true @@ -104,7 +104,7 @@ Use Level3 Disabled - _DEBUG;_WINDOWS;_USRDLL;VXBOXINTERFACE_EXPORTS;%(PreprocessorDefinitions);VXBOX_EXPORTS + _DEBUG;_WINDOWS;_USRDLL;VXBOXINTERFACE_EXPORTS;%(PreprocessorDefinitions);DYNAMIC_LIB true @@ -116,11 +116,11 @@ Level3 - Use + NotUsing MaxSpeed true true - WIN32;NDEBUG;_WINDOWS;_USRDLL;VXBOXINTERFACE_EXPORTS;%(PreprocessorDefinitions);VXBOX_EXPORTS + WIN32;NDEBUG;_WINDOWS;_USRDLL;VXBOXINTERFACE_EXPORTS;%(PreprocessorDefinitions);DYNAMIC_LIB true @@ -138,7 +138,7 @@ MaxSpeed true true - NDEBUG;_WINDOWS;_USRDLL;VXBOXINTERFACE_EXPORTS;%(PreprocessorDefinitions);VXBOX_EXPORTS + NDEBUG;_WINDOWS;_USRDLL;VXBOXINTERFACE_EXPORTS;%(PreprocessorDefinitions);DYNAMIC_LIB true diff --git a/Test/Test-vXboxInterface.vcxproj b/Test/Test-vXboxInterface.vcxproj index 3e6ec1f..c799455 100644 --- a/Test/Test-vXboxInterface.vcxproj +++ b/Test/Test-vXboxInterface.vcxproj @@ -221,7 +221,7 @@ Level3 - Use + NotUsing MaxSpeed true true diff --git a/Test/Test.cpp b/Test/Test.cpp index 1a97516..609172e 100644 --- a/Test/Test.cpp +++ b/Test/Test.cpp @@ -9,6 +9,8 @@ #ifndef XBOX #pragma comment(lib, "vXboxInterface") +//#pragma comment(lib, "vXboxInterface-Static") + int main() { BOOL res; @@ -16,7 +18,7 @@ int main() // Test if bus exists - BOOL bus = isVBusExists(); + BOOL bus = isVBusExists(); if (bus) printf("Virtual Xbox bus exists\n\n"); else diff --git a/vDevInterface/ReadMe.txt b/vDevInterface/ReadMe.txt new file mode 100644 index 0000000..c192c22 --- /dev/null +++ b/vDevInterface/ReadMe.txt @@ -0,0 +1,40 @@ +======================================================================== + DYNAMIC LINK LIBRARY : vDevInterface Project Overview +======================================================================== + +AppWizard has created this vDevInterface DLL for you. + +This file contains a summary of what you will find in each of the files that +make up your vDevInterface application. + + +vDevInterface.vcxproj + This is the main project file for VC++ projects generated using an Application Wizard. + It contains information about the version of Visual C++ that generated the file, and + information about the platforms, configurations, and project features selected with the + Application Wizard. + +vDevInterface.vcxproj.filters + This is the filters file for VC++ projects generated using an Application Wizard. + It contains information about the association between the files in your project + and the filters. This association is used in the IDE to show grouping of files with + similar extensions under a specific node (for e.g. ".cpp" files are associated with the + "Source Files" filter). + +vDevInterface.cpp + This is the main DLL source file. + +///////////////////////////////////////////////////////////////////////////// +Other standard files: + +StdAfx.h, StdAfx.cpp + These files are used to build a precompiled header (PCH) file + named vDevInterface.pch and a precompiled types file named StdAfx.obj. + +///////////////////////////////////////////////////////////////////////////// +Other notes: + +AppWizard uses "TODO:" comments to indicate parts of the source code you +should add to or customize. + +///////////////////////////////////////////////////////////////////////////// diff --git a/vDevInterface/dllmain.cpp b/vDevInterface/dllmain.cpp new file mode 100644 index 0000000..69b5891 --- /dev/null +++ b/vDevInterface/dllmain.cpp @@ -0,0 +1,19 @@ +// dllmain.cpp : Defines the entry point for the DLL application. +#include "stdafx.h" + +BOOL APIENTRY DllMain( HMODULE hModule, + DWORD ul_reason_for_call, + LPVOID lpReserved + ) +{ + switch (ul_reason_for_call) + { + case DLL_PROCESS_ATTACH: + case DLL_THREAD_ATTACH: + case DLL_THREAD_DETACH: + case DLL_PROCESS_DETACH: + break; + } + return TRUE; +} + diff --git a/vDevInterface/stdafx.cpp b/vDevInterface/stdafx.cpp new file mode 100644 index 0000000..2f799d9 --- /dev/null +++ b/vDevInterface/stdafx.cpp @@ -0,0 +1,8 @@ +// stdafx.cpp : source file that includes just the standard includes +// vDevInterface.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + +// TODO: reference any additional headers you need in STDAFX.H +// and not in this file diff --git a/vDevInterface/stdafx.h b/vDevInterface/stdafx.h new file mode 100644 index 0000000..e07882c --- /dev/null +++ b/vDevInterface/stdafx.h @@ -0,0 +1,15 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#pragma once +#include "targetver.h" +#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers +// Windows Header Files: +#include + + + +// TODO: reference additional headers your program requires here +#define STATIC_LIB diff --git a/vDevInterface/targetver.h b/vDevInterface/targetver.h new file mode 100644 index 0000000..87c0086 --- /dev/null +++ b/vDevInterface/targetver.h @@ -0,0 +1,8 @@ +#pragma once + +// Including SDKDDKVer.h defines the highest available Windows platform. + +// If you wish to build your application for a previous Windows platform, include WinSDKVer.h and +// set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h. + +#include diff --git a/vDevInterface/vDevInterface.cpp b/vDevInterface/vDevInterface.cpp new file mode 100644 index 0000000..95656a5 --- /dev/null +++ b/vDevInterface/vDevInterface.cpp @@ -0,0 +1,50 @@ +// vDevInterface.cpp : Defines the exported functions for the DLL application. +// +#pragma comment(lib, "vXboxInterface-Static") +#include "stdafx.h" +#include "..\API\vXboxInterface.h" +#include "vDevInterface.h" + + +extern "C" +{ + /// Status + inline VDEVINTERFACE_API BOOL __cdecl isVBusExists(void) { return vXboxNS::isVBusExists(); } + inline VDEVINTERFACE_API BOOL __cdecl GetNumEmptyBusSlots(UCHAR * nSlots) { return vXboxNS::GetNumEmptyBusSlots(nSlots); } + inline VDEVINTERFACE_API BOOL __cdecl isControllerExists(UINT UserIndex) { return vXboxNS::isControllerExists(UserIndex); } + inline VDEVINTERFACE_API BOOL __cdecl isControllerOwned(UINT UserIndex) { return vXboxNS::isControllerOwned(UserIndex); } + + + // Virtual device Plug-In/Unplug + inline VDEVINTERFACE_API BOOL __cdecl PlugIn(UINT UserIndex) { return vXboxNS::PlugIn(UserIndex); } + inline VDEVINTERFACE_API BOOL __cdecl UnPlug(UINT UserIndex) { return vXboxNS::UnPlug(UserIndex); } + inline VDEVINTERFACE_API BOOL __cdecl UnPlugForce(UINT UserIndex) { return vXboxNS::UnPlugForce(UserIndex); } + + // Data Transfer (Data to the device) + inline VDEVINTERFACE_API BOOL __cdecl SetBtnA(UINT UserIndex, BOOL Press) { return vXboxNS::SetBtnA(UserIndex, Press); } + inline VDEVINTERFACE_API BOOL __cdecl SetBtnB(UINT UserIndex, BOOL Press) { return vXboxNS::SetBtnB(UserIndex, Press); } + inline VDEVINTERFACE_API BOOL __cdecl SetBtnX(UINT UserIndex, BOOL Press) { return vXboxNS::SetBtnX(UserIndex, Press); } + inline VDEVINTERFACE_API BOOL __cdecl SetBtnY(UINT UserIndex, BOOL Press) { return vXboxNS::SetBtnY(UserIndex, Press); } + inline VDEVINTERFACE_API BOOL __cdecl SetBtnStart(UINT UserIndex, BOOL Press) { return vXboxNS::SetBtnStart(UserIndex, Press); } + inline VDEVINTERFACE_API BOOL __cdecl SetBtnBack(UINT UserIndex, BOOL Press) { return vXboxNS::SetBtnBack(UserIndex, Press); } + inline VDEVINTERFACE_API BOOL __cdecl SetBtnLT(UINT UserIndex, BOOL Press) { return vXboxNS::SetBtnLT(UserIndex, Press); } + inline VDEVINTERFACE_API BOOL __cdecl SetBtnRT(UINT UserIndex, BOOL Press) { return vXboxNS::SetBtnRT(UserIndex, Press); } + inline VDEVINTERFACE_API BOOL __cdecl SetBtnLB(UINT UserIndex, BOOL Press) { return vXboxNS::SetBtnLB(UserIndex, Press); } + inline VDEVINTERFACE_API BOOL __cdecl SetBtnRB(UINT UserIndex, BOOL Press) { return vXboxNS::SetBtnRB(UserIndex, Press); } + inline VDEVINTERFACE_API BOOL __cdecl SetTriggerL(UINT UserIndex, BYTE Value) { return vXboxNS::SetTriggerL(UserIndex, Value); } + inline VDEVINTERFACE_API BOOL __cdecl SetTriggerR(UINT UserIndex, BYTE Value) { return vXboxNS::SetTriggerR(UserIndex, Value); } + inline VDEVINTERFACE_API BOOL __cdecl SetAxisX(UINT UserIndex, SHORT Value) { return vXboxNS::SetAxisX(UserIndex, Value); } + inline VDEVINTERFACE_API BOOL __cdecl SetAxisY(UINT UserIndex, SHORT Value) { return vXboxNS::SetAxisY(UserIndex, Value); } + inline VDEVINTERFACE_API BOOL __cdecl SetAxisRx(UINT UserIndex, SHORT Value) { return vXboxNS::SetAxisRx(UserIndex, Value); } + inline VDEVINTERFACE_API BOOL __cdecl SetAxisRy(UINT UserIndex, SHORT Value) { return vXboxNS::SetAxisRy(UserIndex, Value); } + inline VDEVINTERFACE_API BOOL __cdecl SetDpadUp(UINT UserIndex) { return vXboxNS::SetDpadUp(UserIndex); } + inline VDEVINTERFACE_API BOOL __cdecl SetDpadRight(UINT UserIndex) { return vXboxNS::SetDpadRight(UserIndex); } + inline VDEVINTERFACE_API BOOL __cdecl SetDpadDown(UINT UserIndex) { return vXboxNS::SetDpadDown(UserIndex); } + inline VDEVINTERFACE_API BOOL __cdecl SetDpadLeft(UINT UserIndex) { return vXboxNS::SetDpadLeft(UserIndex); } + inline VDEVINTERFACE_API BOOL __cdecl SetDpadOff(UINT UserIndex) { return vXboxNS::SetDpadOff(UserIndex); } + inline VDEVINTERFACE_API BOOL __cdecl SetDpad(UINT UserIndex, INT Value) { return vXboxNS::SetDpad(UserIndex, Value); } + + // Data Transfer (Feedback from the device) + inline VDEVINTERFACE_API BOOL __cdecl GetLedNumber(UINT UserIndex, PBYTE pLed) { return vXboxNS::GetLedNumber(UserIndex, pLed); } + inline VDEVINTERFACE_API BOOL __cdecl GetVibration(UINT UserIndex, PXINPUT_VIBRATION pVib) { return vXboxNS::GetVibration(UserIndex, pVib); } +} diff --git a/vDevInterface/vDevInterface.h b/vDevInterface/vDevInterface.h new file mode 100644 index 0000000..1ad66c7 --- /dev/null +++ b/vDevInterface/vDevInterface.h @@ -0,0 +1,59 @@ +#include + +// The following ifdef block is the standard way of creating macros which make exporting +// from a DLL simpler. All files within this DLL are compiled with the VDEVINTERFACE_EXPORTS +// symbol defined on the command line. This symbol should not be defined on any project +// that uses this DLL. This way any other project whose source files include this file see +// VDEVINTERFACE_API functions as being imported from a DLL, whereas this DLL sees symbols +// defined with this macro as being exported. +#ifdef VDEVINTERFACE_EXPORTS +#define VDEVINTERFACE_API __declspec(dllexport) +#else +#define VDEVINTERFACE_API __declspec(dllimport) +#endif + +//namespace TmpNS { + extern "C" + { + /// Status + inline VDEVINTERFACE_API BOOL __cdecl isVBusExists(void); + inline VDEVINTERFACE_API BOOL __cdecl GetNumEmptyBusSlots(UCHAR * nSlots); + inline VDEVINTERFACE_API BOOL __cdecl isControllerExists(UINT UserIndex); + inline VDEVINTERFACE_API BOOL __cdecl isControllerOwned(UINT UserIndex); + + + // Virtual device Plug-In/Unplug + inline VDEVINTERFACE_API BOOL __cdecl PlugIn(UINT UserIndex); + inline VDEVINTERFACE_API BOOL __cdecl UnPlug(UINT UserIndex); + inline VDEVINTERFACE_API BOOL __cdecl UnPlugForce(UINT UserIndex); + + // Data Transfer (Data to the device) + inline VDEVINTERFACE_API BOOL __cdecl SetBtnA(UINT UserIndex, BOOL Press); + inline VDEVINTERFACE_API BOOL __cdecl SetBtnB(UINT UserIndex, BOOL Press); + inline VDEVINTERFACE_API BOOL __cdecl SetBtnX(UINT UserIndex, BOOL Press); + inline VDEVINTERFACE_API BOOL __cdecl SetBtnY(UINT UserIndex, BOOL Press); + inline VDEVINTERFACE_API BOOL __cdecl SetBtnStart(UINT UserIndex, BOOL Press); + inline VDEVINTERFACE_API BOOL __cdecl SetBtnBack(UINT UserIndex, BOOL Press); + inline VDEVINTERFACE_API BOOL __cdecl SetBtnLT(UINT UserIndex, BOOL Press); // Left Thumb/Stick + inline VDEVINTERFACE_API BOOL __cdecl SetBtnRT(UINT UserIndex, BOOL Press); // Right Thumb/Stick + inline VDEVINTERFACE_API BOOL __cdecl SetBtnLB(UINT UserIndex, BOOL Press); // Left Bumper + inline VDEVINTERFACE_API BOOL __cdecl SetBtnRB(UINT UserIndex, BOOL Press); // Right Bumper + inline VDEVINTERFACE_API BOOL __cdecl SetTriggerL(UINT UserIndex, BYTE Value); // Left Trigger + inline VDEVINTERFACE_API BOOL __cdecl SetTriggerR(UINT UserIndex, BYTE Value); // Right Trigger + inline VDEVINTERFACE_API BOOL __cdecl SetAxisX(UINT UserIndex, SHORT Value); // Left Stick X + inline VDEVINTERFACE_API BOOL __cdecl SetAxisY(UINT UserIndex, SHORT Value); // Left Stick Y + inline VDEVINTERFACE_API BOOL __cdecl SetAxisRx(UINT UserIndex, SHORT Value); // Right Stick X + inline VDEVINTERFACE_API BOOL __cdecl SetAxisRy(UINT UserIndex, SHORT Value); // Right Stick Y + inline VDEVINTERFACE_API BOOL __cdecl SetDpadUp(UINT UserIndex); + inline VDEVINTERFACE_API BOOL __cdecl SetDpadRight(UINT UserIndex); + inline VDEVINTERFACE_API BOOL __cdecl SetDpadDown(UINT UserIndex); + inline VDEVINTERFACE_API BOOL __cdecl SetDpadLeft(UINT UserIndex); + inline VDEVINTERFACE_API BOOL __cdecl SetDpadOff(UINT UserIndex); + inline VDEVINTERFACE_API BOOL __cdecl SetDpad(UINT UserIndex, INT Value); + + // Data Transfer (Feedback from the device) + inline VDEVINTERFACE_API BOOL __cdecl GetLedNumber(UINT UserIndex, PBYTE pLed); + inline VDEVINTERFACE_API BOOL __cdecl GetVibration(UINT UserIndex, PXINPUT_VIBRATION pVib); + } + +//} \ No newline at end of file diff --git a/vDevInterface/vDevInterface.vcxproj b/vDevInterface/vDevInterface.vcxproj new file mode 100644 index 0000000..165667a --- /dev/null +++ b/vDevInterface/vDevInterface.vcxproj @@ -0,0 +1,186 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + {45865871-F0CF-4F79-B0C1-6214395AB6D1} + Win32Proj + vDevInterface + 8.1 + + + + DynamicLibrary + true + v120 + Unicode + + + DynamicLibrary + false + v120 + true + Unicode + + + DynamicLibrary + true + v120 + Unicode + + + DynamicLibrary + false + v120 + true + Unicode + + + + + + + + + + + + + + + + + + + + + true + $(SolutionDir)$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + $(VC_LibraryPath_x86);$(WindowsSDK_LibraryPath_x86);;$(OurDir);$(SolutionDir)$(Platform)\$(Configuration)\ + + + true + $(VC_LibraryPath_x64);$(WindowsSDK_LibraryPath_x64);;$(OurDir);$(SolutionDir)$(Platform)\$(Configuration)\ + + + false + $(SolutionDir)$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + $(VC_LibraryPath_x86);$(WindowsSDK_LibraryPath_x86);;$(OurDir);$(SolutionDir)$(Platform)\$(Configuration)\ + + + false + $(VC_LibraryPath_x64);$(WindowsSDK_LibraryPath_x64);;$(OurDir);$(SolutionDir)$(Platform)\$(Configuration)\ + + + + NotUsing + Level3 + Disabled + WIN32;_DEBUG;_WINDOWS;_USRDLL;VDEVINTERFACE_EXPORTS;%(PreprocessorDefinitions) + true + + + Windows + true + + + + + NotUsing + Level3 + Disabled + _DEBUG;_WINDOWS;_USRDLL;VDEVINTERFACE_EXPORTS;%(PreprocessorDefinitions) + true + + + Windows + true + + + + + Level3 + NotUsing + MaxSpeed + true + true + WIN32;NDEBUG;_WINDOWS;_USRDLL;VDEVINTERFACE_EXPORTS;%(PreprocessorDefinitions) + true + + + Windows + true + true + true + + + + + Level3 + NotUsing + MaxSpeed + true + true + NDEBUG;_WINDOWS;_USRDLL;VDEVINTERFACE_EXPORTS;%(PreprocessorDefinitions) + true + + + Windows + true + true + true + + + + + + + + + + + + + false + + + false + + + false + + + false + + + + + Create + Create + Create + Create + + + + + + + \ No newline at end of file diff --git a/vDevInterface/vDevInterface.vcxproj.filters b/vDevInterface/vDevInterface.vcxproj.filters new file mode 100644 index 0000000..12c8f87 --- /dev/null +++ b/vDevInterface/vDevInterface.vcxproj.filters @@ -0,0 +1,42 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + + + + Header Files + + + Header Files + + + Header Files + + + + + Source Files + + + Source Files + + + Source Files + + + \ No newline at end of file diff --git a/vXboxInterface.sln b/vXboxInterface.sln index 864c131..20d953f 100644 --- a/vXboxInterface.sln +++ b/vXboxInterface.sln @@ -7,9 +7,20 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vXboxInterface", "API\vXbox EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Test", "Test\Test-vXboxInterface.vcxproj", "{8B2B1B77-C83A-4160-9CC3-2FEEFE0C407A}" ProjectSection(ProjectDependencies) = postProject + {7486ED4E-5822-46BB-BB12-385FFD6592B0} = {7486ED4E-5822-46BB-BB12-385FFD6592B0} {ADBCFC5D-A992-4442-B04A-59ADE8EEFFB4} = {ADBCFC5D-A992-4442-B04A-59ADE8EEFFB4} EndProjectSection EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vXboxInterface-Static", "API\vXboxInterface-Static\vXboxInterface-Static.vcxproj", "{7486ED4E-5822-46BB-BB12-385FFD6592B0}" + ProjectSection(ProjectDependencies) = postProject + {ADBCFC5D-A992-4442-B04A-59ADE8EEFFB4} = {ADBCFC5D-A992-4442-B04A-59ADE8EEFFB4} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vDevInterface", "vDevInterface\vDevInterface.vcxproj", "{45865871-F0CF-4F79-B0C1-6214395AB6D1}" + ProjectSection(ProjectDependencies) = postProject + {7486ED4E-5822-46BB-BB12-385FFD6592B0} = {7486ED4E-5822-46BB-BB12-385FFD6592B0} + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|x64 = Debug|x64 @@ -34,6 +45,22 @@ Global {8B2B1B77-C83A-4160-9CC3-2FEEFE0C407A}.Release|x64.Build.0 = Release|x64 {8B2B1B77-C83A-4160-9CC3-2FEEFE0C407A}.Release|x86.ActiveCfg = Release|Win32 {8B2B1B77-C83A-4160-9CC3-2FEEFE0C407A}.Release|x86.Build.0 = Release|Win32 + {7486ED4E-5822-46BB-BB12-385FFD6592B0}.Debug|x64.ActiveCfg = Debug|x64 + {7486ED4E-5822-46BB-BB12-385FFD6592B0}.Debug|x64.Build.0 = Debug|x64 + {7486ED4E-5822-46BB-BB12-385FFD6592B0}.Debug|x86.ActiveCfg = Debug|Win32 + {7486ED4E-5822-46BB-BB12-385FFD6592B0}.Debug|x86.Build.0 = Debug|Win32 + {7486ED4E-5822-46BB-BB12-385FFD6592B0}.Release|x64.ActiveCfg = Release|x64 + {7486ED4E-5822-46BB-BB12-385FFD6592B0}.Release|x64.Build.0 = Release|x64 + {7486ED4E-5822-46BB-BB12-385FFD6592B0}.Release|x86.ActiveCfg = Release|Win32 + {7486ED4E-5822-46BB-BB12-385FFD6592B0}.Release|x86.Build.0 = Release|Win32 + {45865871-F0CF-4F79-B0C1-6214395AB6D1}.Debug|x64.ActiveCfg = Debug|x64 + {45865871-F0CF-4F79-B0C1-6214395AB6D1}.Debug|x64.Build.0 = Debug|x64 + {45865871-F0CF-4F79-B0C1-6214395AB6D1}.Debug|x86.ActiveCfg = Debug|Win32 + {45865871-F0CF-4F79-B0C1-6214395AB6D1}.Debug|x86.Build.0 = Debug|Win32 + {45865871-F0CF-4F79-B0C1-6214395AB6D1}.Release|x64.ActiveCfg = Release|x64 + {45865871-F0CF-4F79-B0C1-6214395AB6D1}.Release|x64.Build.0 = Release|x64 + {45865871-F0CF-4F79-B0C1-6214395AB6D1}.Release|x86.ActiveCfg = Release|Win32 + {45865871-F0CF-4F79-B0C1-6214395AB6D1}.Release|x86.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE