windows universal aka uwp

doug sanden highaspirations@hotmail.com
Mon May 2 16:38:00 GMT 2016


I got pthread-win32 to work in windows universal on a mobile emulator
Here's my hacked files and uwp/vs2015 project, and see also the TlsFuncs.cpp in the project directory
http://dug9.users.sourceforge.net/web3d/temp/doug_pthreads_uwp_hack_may2_2016.zip

I didn't do thorough tests - just enough to see the app is loading and doing a bit of pthreads.
HTH
-Doug

more..

I hacked pthreads-win32 to get it working on uwp:
- TlsAlloc, Free, Get, Set - weren't in the current WindowsApp.Lib - but are supposed to be in 'Windows 1607' whatever that is
-- so I #ifdefed some in (vs linking to kernel32.lib, which I shouldn't have to do / may mess things up)
- no SetThreadContext, and no LoadProgram, but has QueryUserAPC (not Ex)
- linked with the uwp default WindowsApp.lib only.

more..
Windows universal / uwp means it will run on hand-held devices, laptops, desktops running windows 10
For all the basics, you link to one .lib WindowsApp.lib and it links to all the little libs and at runtime pulls in all the little dlls.

there's a nuget package for pthreads. 
https://github.com/coapp-packages/pthreads
that can be loaded in VisualStudio 2015 and referenced in projects.
But it doesn't work on windows universal uwp, I found. In the nuget package management conditions it filters itself out for uwp apps, if I try and force link and package the dll, on a mobile device it says 'The app failed to start' and 'A dependent dll failed to load'.

https://msdn.microsoft.com/en-us/library/windows/apps/br205757.aspx
- follow the link to UWP, and it has lists for ALL vs EXT
There are 2 classes of APIs, which I'll refer to as ALL and EXT
ALL - guaranteed to be on all win10 uwp devices
EXT- maybe. Maybe not on a specific device. Guard / check.

Here's my hacked files and uwp/vs2015 project, and see also the TlsFuncs.cpp in the project directory
http://dug9.users.sourceforge.net/web3d/temp/doug_pthreads_uwp_hack_may2_2016.zip



More information about the Pthreads-win32 mailing list