question

Marty Burgess avatar image
Marty Burgess asked

Windows/C++ SDK - What data is passed through void* userData?

Hi guys,

for the win32/cpp SDK, the callback functions all return some form of PlayFab data (PlayFabError&, LoginResult&, etc) as well as void* userData. is this for internal use, or are we able to access information from this? if so, what info is passed here?

sdks
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
brendan avatar image
brendan answered

This was added to the SDK by request. If you have a look at the generated API calls, you'll see that each of them also takes a userData pointer as input. When the call returns, the userData that was passed in is returned. It's a simplified way to keep track of your requests - allowing you to pass in arbitrary data that you can use however you need, for figuring out which call was which.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.