GivePass / x360ce

Automatically exported from code.google.com/p/x360ce
1 stars 0 forks source link

x360ce project error: 'GetVersionExA': was declared deprecated #827

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
GTAV is coming to PC so I am trying to fix/update remaining things.

Note 1: I assume that we can remove "DirectX SDK (June 2010)" as requirement to 
build project and replace with "Windows SDK for Windows 8.1", because "DirectX 
SDK" is integrated part of "Windows SDK" now:

   http://msdn.microsoft.com/en-US/windows/desktop/bg162891

I've tried to use "Windows SDK for Windows 8.1". Dinput8  and libMiniHook 
projects build successfully, x360ce results in:

  Error 2 error C4996: 'GetVersionExA': was declared deprecated
  c:\proj\racer_s\x360ce\x360ce\x360ce\utilities\misc.h 173 1 x360ce

I am not C++ coder, so I've found this article. Maybe it will be helpful:

  http://www.codeproject.com/Articles/678606/Part1-Overcoming-Windows-8-1s-deprecation-of-GetVe

Original issue reported on code.google.com by ejocys on 24 Jan 2014 at 3:55

GoogleCodeExporter commented 9 years ago
GetVersionExA is used in the way it is working correctly for Windows 8 and 
Windows 8.1.
Disable /sdl switch to build it, this is not a error, it is only warning. 
New version APIs that Microsoft provide are useless because they do not provide 
edition name, and also for Windows 8.1 to correctly detect NT6.3 version, exe 
(not DLL file) is required to contain manifest file with proper supportedOS id, 
so we cannot use API function to get 6.3 version because we get 6.2 if app 
(game) is not compiled for Window s 8.1.
This is next stupid Microsoft change in API, that does nothing but only breaks 
compatibility and require workarounds...

Original comment by tapcio on 24 Jan 2014 at 4:08

GoogleCodeExporter commented 9 years ago
"Note 1: I assume that we can remove "DirectX SDK (June 2010)" as requirement 
to build project and replace with "Windows SDK for Windows 8.1", because 
"DirectX SDK" is integrated part of "Windows SDK" now:"

No we can not, because This SDK creates applications and runtime that rely on 
xinput1_4.dll which is not present in Windows XP, Vista or 7.

Original comment by danialho...@gmail.com on 25 Jan 2014 at 9:42

GoogleCodeExporter commented 9 years ago
Not to mention, Backwards compatible with VC2010 is required because some games 
will not run with the vc2013 compiles.

Original comment by danialho...@gmail.com on 25 Jan 2014 at 9:46

GoogleCodeExporter commented 9 years ago
Sorry but VC2010 will not be support in feature because of C++11 requirement.
Yes, I know about some troubled games on some PCs - it will be resolved.

PS: xinput header is only required for some static macros, so you can use DXSDK 
one as well as Windows SDK one.

Original comment by tapcio on 25 Jan 2014 at 10:36

GoogleCodeExporter commented 9 years ago
I will maintain VCX compatibility, as 2012/2013 are full of problems with many 
games.

there is nothing you can do in 2012/2013 that the wrapper needs.

Original comment by danialho...@gmail.com on 25 Jan 2014 at 11:24

GoogleCodeExporter commented 9 years ago
also, are we going to stick with these google nazi's now that the download 
section has been nuked.

Original comment by danialho...@gmail.com on 25 Jan 2014 at 11:34

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Yes, I can do, first of all, use static CRT.
Also, if needed, I have access to Intel Compiler which is full C++11 compatible.
VS2010 will need boost, and I do not like it.

Original comment by tapcio on 25 Jan 2014 at 12:13

GoogleCodeExporter commented 9 years ago
im not actually sure of the dinput dll is needed now krossx added the other 
initialisation code.

Original comment by danialho...@gmail.com on 25 Jan 2014 at 12:30

GoogleCodeExporter commented 9 years ago
I have another issue with building the project:

Error   1   error RC1015: cannot open include file 
'afxres.h'. D:\Projects\Racer_S\x360ce\x360ce\x360ce\x360ce.rc  10  1   x360ce

This header is a part of the Microsoft Foundation Classes for C++ (MFC 
Library). Visual Studio 2012 Express edition doesn't contain MFC.

There are multiple ways to solve this:

a) User must install Visual Studio 2012 Professional in order to open x360ce 
project.
b) I saw suggestions that it is possible to replace it with windows.h or 
winresrc.h
   In this case project will compile, because both files can be found in all windows SDKs:

   c:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Include\
   c:\Program Files (x86)\Windows Kits\8.0\Include\um\
   c:\Program Files (x86)\Windows Kits\8.1\Include\um\

More info:
http://stackoverflow.com/questions/3566018/cannot-open-include-file-afxres-h-in-
vc2010-express

P.S.: I am downloading "Visual Studio Express 2012 for Windows Phone" in order 
to see if it contains "Microsoft Foundation Classes for C++" (MFC Library).

Original comment by ejocys on 25 Jan 2014 at 3:12

GoogleCodeExporter commented 9 years ago
Yes, this is good solution.

Original comment by tapcio on 25 Jan 2014 at 3:16

GoogleCodeExporter commented 9 years ago
FYI found another workaround:

"Microsoft Visual Studio 2012 Update 4" ISO image contains "Microsoft Visual 
C++ 2012 Microsoft Foundation Class Libraries", but package won't install 
without Setup.exe. Fortunately this MSIEXEX command can be used to install this 
package:

msiexec /i E:\packages\vc_libraryselectablemfc\vc_libraryselectablemfc.msi 
ADDEPLOY=1

Original comment by ejocys on 25 Jan 2014 at 3:36

GoogleCodeExporter commented 9 years ago
But x360ce do not require AFX/MFC so first solution is better.

Original comment by tapcio on 25 Jan 2014 at 3:38

GoogleCodeExporter commented 9 years ago
Ok. I took liberty to replace and commit:

#include "afxres.h"

with:

// #include "afxres.h"
#include "WinResrc.h"
#define IDC_STATIC  -1

Original comment by ejocys on 25 Jan 2014 at 3:49

GoogleCodeExporter commented 9 years ago
"(...)krossx added the other initialisation code." where ????

Original comment by tapcio on 25 Jan 2014 at 7:10

GoogleCodeExporter commented 9 years ago
https://code.google.com/p/x360ce/source/detail?r=848

Original comment by danialho...@gmail.com on 26 Jan 2014 at 12:33

GoogleCodeExporter commented 9 years ago
turns out that xinput can check status on just about any function, and some 
games were failing to enumerate our xinput device because we weren't returning 
availability on all the common ones.

Original comment by danialho...@gmail.com on 26 Jan 2014 at 12:35

GoogleCodeExporter commented 9 years ago
This resolve anything ? In almost all games that I tested XInput loop is done 
in this way: XInputGetState -> works (return == ERROR_SUCCES) -> update state. 
All UE3 games are using this method.

dinput8.dll is needed because some games loads xinputx_x.dll dynamically AFTER 
filtering devices using COM, so hooks will never work (dll is not loaded to 
process).
So dinput8.dll loads x360ce, then HOOK_LL replace original xinput instance with 
x360ce instance.

Original comment by tapcio on 26 Jan 2014 at 2:29

GoogleCodeExporter commented 9 years ago
It resolved Ring Runners not working

http://ngemu.com/threads/problem-with-ring-runner-flight-of-the-sages.159282/#po
st-2135594

dinput8 is a weird one, because whether dll is loaded dynamically or not it 
always follows the system dll load order of current directory > Windows folder 
> System folder.

Original comment by danialho...@gmail.com on 26 Jan 2014 at 5:16