Jump to content
  • Advertisement
Sign in to follow this  
Steven Ford

Accessing Xbox Live Services (cppwinrt / Creators Collection)

Recommended Posts

Hi all,

I was wondering if someone could put me out of my misery. As part of releasing a game for the creators collection on X1, I have to add support for Xbox Live (this game doesn't need any actual features from it, merely the ability to log in, but hey, those are the rules it seems).

As part of doing this, I was expecting to simply:

1. Add a reference to the appropriate nuget package
2. Set the appropriate constant / add the header file

Unfortunately, I seem to be struggling with something which would appear to be simple. 

I'm using the cppwinrt templates - Nuget package - cppwinrt

My questions are:

1. What's the difference between - Microsoft.Xbox.Live.SDK.WinRT.UWP (Nuget) and Microsoft.Xbox.Live.SDK.WinRT.UWP (Nuget). There doesn't appear to be any useful information in the Nuget pages describing what the differences are or which I should use in preference

2. I'm assuming that people have gotten this successfully to work, are there any steps other than the ones above?

Any help gratefully received. This is literally the only thing left before I can submit the game :(

Thanks

Steve

Share this post


Link to post
Share on other sites
Advertisement

I'm using the following link from MSDN. This seems to imply that the CPP version is for C++/CX and not for standard CPP. Which kind of leads me to using the Microsoft.Xbox.Live.SDK.WinRT.UWP version.

So when I do that and add the following:

#define XBOX_LIVE_CREATORS_SDK
#include "xsapi\services.h"

I get an error about not being able to find the file. Looking at the directories which have been added, then I don't see any file named that, but I do see files along the lines of (within Microsoft.Xbox.Live.SDK.WinRT.UWP.Native.Release.2018.6.20180914.1):

  • build\native\lib\x64\v140\Release\cpprest140_uwp_2_9.dll
  • build\native\lib\x64\v140\Release\cpprest140_uwp_2_9.lib
  • build\native\lib\x64\v140\Release\cpprest140_uwp_2_9.pdb
  • build\native\lib\x64\v140\Release\Microsoft.Xbox.Services.dll
  • build\native\lib\x64\v140\Release\Microsoft.Xbox.Services.pdb
  • build\native\lib\x64\v140\Release\Microsoft.Xbox.Services.winmd
  • build\native\Microsoft.Xbox.Live.SDK.WinRT.UWP.Native.Release.targets

I was, maybe naively, expecting to be able to then have everything work out of the box. This was the case when I used the initial 'cppwinrt' Nuget package. What steps need to be done in order to use this in order to be able to sign into Xbox Live?

 

Share this post


Link to post
Share on other sites

Anyone? Does anyone have any experience in making C++ header files using cppwinrt for this library? I'm guessing that's the usual approach for handling .winmd files, but I'm not having much luck.

What I'm currently trying to do is:

1. Navigate to E:\Spacegirl\packages\Microsoft.Xbox.Live.SDK.WinRT.UWP.Native.Release.2018.6.20180914.1\build\native\lib\x64\v140\Release
2. Run cppwinrt:

cppwinrt -in Microsoft.Xbox.Services.winmd -out E:\temp
   The Microsoft.Xbox.Services.Achievements projection is incomplete. A required reference may be missing.
    The Microsoft.Xbox.Services projection is incomplete. A required reference may be missing.
   The Microsoft.Xbox.Services.ContextualSearch projection is incomplete. A required reference may be missing.

    The Microsoft.Xbox.Services.Events projection is incomplete. A required reference may be missing.
    The Microsoft.Xbox.Services.Leaderboard projection is incomplete. A required reference may be missing.
error 0x80004005: Unknown namespace: Windows.Foundation
    The Microsoft.Xbox.Services.Multiplayer.Manager projection is incomplete. A required reference may be missing.

 

I'm not an expert on C++ / winrt so apologies if these appear stupid questions to anyone, any help gratefully received.

Share this post


Link to post
Share on other sites

Just in case anyone else comes across this issue.

Effectively, my takeaway is that this doesn't work if you're using VS2017 / toolset 141. Presumably it does with v140 (VS2015), but I didn't want to roll back that much.

My solution was to go back to C++/CX and then it all worked.

"£$"$%^% £$%^£$%^ "$%^ - what a waste of time! And breathe out again

Steve

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!