jakob.j
jakob.j

Reputation: 963

Windows Phone 8 - private APIs?

Is it possible to use private APIs in Windows Phone 8 development similar to iOS development?

Of course, this is NOT about apps going to get published (AppStore/Marketplace). But there are a lot of use cases for non-public projects where a developer wants to call internal system functions.

With the Windows Phone 8 SDK installed, one can mount the Windows Phone 8 Emulator image located in C:\Program Files (x86)\Microsoft SDKs\Windows Phone\v8.0\Emulation\Images. In the main partition of the Windows Phone OS, one can navigate to Windows\System32 and inspect the system DLL files with a tool like Dependency Walker or IDA Pro.

There are a lot of functions that sound very interesting but which are not publicly available and thus not documented. The question is: is it possible to call them somehow from an app or by other means?

Just a few examples of interesting functions (there are much more):

I tried to get LoadLibrary (specifically, LoadLibraryExA) working somehow in a native Windows Phone App project, and to load and call these functions (the loading of the library worked). Long story short, I ended up with access violation errors or similar when trying to call the functions (maybe because of the sandboxed execution environment). Another problem is, that I can only guess the signatures (arguments) of the functions. I can't find them out with the tools I use.

Upvotes: 12

Views: 1696

Answers (3)

Patrick Sachet
Patrick Sachet

Reputation: 22

You can't, the application sandbox will enforce API usage. That means you will get an UnauthorizedAccessException every time you try to do a call to an api requiring rights you don't have. This is intimately tied with the developer account you use to unlock your phone for development purposes.

EDIT : That's also true on the c++ native side.

Upvotes: 0

mehmet6parmak
mehmet6parmak

Reputation: 4857

I think they only provide some private apis to only partners with an NDA.

http://social.msdn.microsoft.com/forums/wpapps/en-US/4af0e87a-ab4b-4652-891a-f198a32758cf/windows-phone-8-access-to-private-apis

Upvotes: 0

Jashan PJ
Jashan PJ

Reputation: 4408

Private api? We can use dll files in the windows phone. I have used private sdk's in the windows phone. I don't think windows is going to permit us to customize the OS just like Android do, So Invoke volume up..etc stuff is not going to work through private api.

Upvotes: 1

Related Questions