Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,737,675 Members 46,718 Now Online
XDA Developers Android and Mobile Development Forum

[LIBRARIES][SOURCE] WP8 Native Access project

Tip us?
 
GoodDayToDie
Old
(Last edited by GoodDayToDie; 29th October 2013 at 04:50 AM.) Reason: Updated versions, added Processes (0.4.0, 0.2.9, 0.1.0)
#1  
Recognized Developer - OP
Thanks Meter 2645
Posts: 5,539
Join Date: Jan 2011
Location: Seattle
Default [LIBRARIES][SOURCE] WP8 Native Access project

This thread is for announcements and discussion around the WP8NativeAccess project (https://wp8nativeaccess.codeplex.com/). The purpose of this project is to provide general-purpose libraries, usable from C++ or .NET, which enable access to the underlying functions of the OS. In some cases, this will mean simple wrappers around native APIs; in other cases, these will be more advanced operations which simplify using the low-level APIs.

Some of the functions that the Native Access project exposes are already available via the official APIs. Other functions, however, are not. While I have no objection to these libraries being used in Store apps (license permitting), it is unlikely that Microsoft will permit the ones which use unofficial APIs.

Note that this library does not provide any method for elevation of privileges. Consequently, the use of these APIs will be constrained by the sandbox in which all third-party WP8 apps run, as defined by the capabilities in the app manifest. In practical terms, this means that most of the system will be either inaccessible or read-only. Even so, it has already proven useful to myself. When combined with interop-unlock and Capability-unlock hacks (making it possible for apps to obtain higher privileges), these APIs become much more useful. In fact, the EnableAllCapabilities utility uses the Registry library. Similarly, if you have the ability to use restricted Capabilities in an app you are developing, you may find these libraries useful.

The libraries are as follows:
  • FileSystem version 0.4.0: Implements functionality to read, write, and get information about files and directories, plus supports creating symbolic links and enumerating file system volumes. This version contains a breaking change from 0.3.x: the NativeFileSystem functions are now static and the constructor is removed. This library may be built with or without the macro USE_NON_PUBLIC_APIS; by default it now includes this macro and require kernelbase.lib to build. If this macro is not defined, it builds using the public APIs without requiring any special libraries.
  • Registry version 0.2.9: Implements functionality to read and write registry values, and to create and delete registry keys and values. Many, though not yet all, registry value types are fully supported. This library consists entirely of non-public (for WP8) APIs and requires the KERNELBASE.LIB and ADVAPI32LEGACY.LIB export libraries for Windows Phone 8 in order to build (the DLLs are in C:\Windows\System32 on the phone; you can use Dll2Lib.exe to extract the .LIB files).
  • Processes version 0.1.0: Implements basic functionality to get information about your process, and to create or kill a child process. Very early version.
They are licensed under the Microsoft Permissive License.

The FileSystem and Registry libraries are currently being used by my WP8 File Access Webserver project (http://forum.xda-developers.com/show....php?t=2355034).
My EnableAllSideloading app uses the Registry library (http://forum.xda-developers.com/show....php?t=2435697).
@hjc4869 has a basic FileExplorer app which uses the FileSystem library (http://forum.xda-developers.com/show....php?t=2497788).

You may need to use 7-Zip or another extraction program better than the built-in Windows Zip extractor to open the archive.
Attached Files
File Type: zip Registry_0_1_1.zip - [Click for QR Code] (11.8 KB, 1029 views)
File Type: zip NativeAccessLibraries_040_029_010.zip - [Click for QR Code] (76.4 KB, 872 views)
Win8/Windows RT projects:
List of desktop apps for hacked RT devices

WP8 projects:
Native Access WebServer and Libraries
WP8 Interop Unlocks
Storage Cleanup tool

WP7 projects:
XapHandler, Root Webserver, OEM Marketplace XAPs, Bookmarklets collection (Find On Page), Interop-unlock hacks.


Do not private message me with questions that should have been posted on the forum! Not only are you wasting your time - I'm not going to bother writing an answer to such a question for only one person - but I will probably block you from PMing me in the future as well.
The Following 11 Users Say Thank You to GoodDayToDie For This Useful Post: [ Click to Expand ]
 
GoodDayToDie
Old
#2  
Recognized Developer - OP
Thanks Meter 2645
Posts: 5,539
Join Date: Jan 2011
Location: Seattle
Reserved for OP...
Win8/Windows RT projects:
List of desktop apps for hacked RT devices

WP8 projects:
Native Access WebServer and Libraries
WP8 Interop Unlocks
Storage Cleanup tool

WP7 projects:
XapHandler, Root Webserver, OEM Marketplace XAPs, Bookmarklets collection (Find On Page), Interop-unlock hacks.


Do not private message me with questions that should have been posted on the forum! Not only are you wasting your time - I'm not going to bother writing an answer to such a question for only one person - but I will probably block you from PMing me in the future as well.
The Following 2 Users Say Thank You to GoodDayToDie For This Useful Post: [ Click to Expand ]
 
GoodDayToDie
Old
#3  
Recognized Developer - OP
Thanks Meter 2645
Posts: 5,539
Join Date: Jan 2011
Location: Seattle
Updated. This will be the main place on XDA for releases of the NativeAccess libraries going forward. Additionally, please report problems or make feature requests here.
Win8/Windows RT projects:
List of desktop apps for hacked RT devices

WP8 projects:
Native Access WebServer and Libraries
WP8 Interop Unlocks
Storage Cleanup tool

WP7 projects:
XapHandler, Root Webserver, OEM Marketplace XAPs, Bookmarklets collection (Find On Page), Interop-unlock hacks.


Do not private message me with questions that should have been posted on the forum! Not only are you wasting your time - I'm not going to bother writing an answer to such a question for only one person - but I will probably block you from PMing me in the future as well.
The Following 2 Users Say Thank You to GoodDayToDie For This Useful Post: [ Click to Expand ]
 
hjc4869
Old
#4  
Member
Thanks Meter 52
Posts: 52
Join Date: Jul 2012
Location: Wuhan

 
DONATE TO ME
I think there should be some way to list all the volumes...
Perhaps windows runtime has provided an async win32 file API wrapper which has the same ability as win32 ones ,so I think undocumented file API and registry ,process and etc are more important.
 
GoodDayToDie
Old
#5  
Recognized Developer - OP
Thanks Meter 2645
Posts: 5,539
Join Date: Jan 2011
Location: Seattle
The latest version of the NativeFileSystem library can give you the mount points (as strings) for all volumes (C:\, D:\, etc.)... I implemented that a few days ago; it should be in this update. Sorry for not highlighting that more clearly (typo in the OP fixed now).
Win8/Windows RT projects:
List of desktop apps for hacked RT devices

WP8 projects:
Native Access WebServer and Libraries
WP8 Interop Unlocks
Storage Cleanup tool

WP7 projects:
XapHandler, Root Webserver, OEM Marketplace XAPs, Bookmarklets collection (Find On Page), Interop-unlock hacks.


Do not private message me with questions that should have been posted on the forum! Not only are you wasting your time - I'm not going to bother writing an answer to such a question for only one person - but I will probably block you from PMing me in the future as well.
The Following User Says Thank You to GoodDayToDie For This Useful Post: [ Click to Expand ]
 
titi66200
Old
(Last edited by titi66200; 28th October 2013 at 11:08 PM.)
#6  
Senior Member
Thanks Meter 103
Posts: 489
Join Date: Jun 2009
Location: PERPIGNAN
Can't open "NativeAccessLibraries_040_029_010.zip"

Edit Ok with 7-zip
Nokia Lumia 1020: GDR3
HTC Titan: New Gen 2.3 OS 7.10.8862.144.
HTC HD2: New Gen 2.3 OS 7.10.8862.144.
Asus Slate EP121: Windows 8.1
 
GoodDayToDie
Old
#7  
Recognized Developer - OP
Thanks Meter 2645
Posts: 5,539
Join Date: Jan 2011
Location: Seattle
How odd, you're right. I didn't do anything terribly fancy while building that ZIP, so I really don't know what's up with that.
Win8/Windows RT projects:
List of desktop apps for hacked RT devices

WP8 projects:
Native Access WebServer and Libraries
WP8 Interop Unlocks
Storage Cleanup tool

WP7 projects:
XapHandler, Root Webserver, OEM Marketplace XAPs, Bookmarklets collection (Find On Page), Interop-unlock hacks.


Do not private message me with questions that should have been posted on the forum! Not only are you wasting your time - I'm not going to bother writing an answer to such a question for only one person - but I will probably block you from PMing me in the future as well.
 
contable
Old
#8  
contable's Avatar
Senior Member
Thanks Meter 953
Posts: 1,690
Join Date: Oct 2009

 
DONATE TO ME
I have added the NativeFileSystem library to my PDF to Office app...

Thanks again for all your work !
The Following 4 Users Say Thank You to contable For This Useful Post: [ Click to Expand ]
 
myst02
Old
#9  
myst02's Avatar
Senior Member
Thanks Meter 100
Posts: 151
Join Date: Feb 2014
@GoodDayToDie: Congratulations, good work! Unfortunately I can't import the registry library, it says it's not a valid DLL. I have Visual Studio 2013 Pro. Does it work for WP8? Please help me solving the problem. Thanks!


Sent from my Windows Phone using Tapatalk
Primary: Samsung ATIV S | WP 8.1 | currently stock

Secondary: Lumia 520 RM-915 | GDR3 | Interop unlocked

Bricked : HTC 8X | GDR3 | DevUnlock

Please press thanks if I helped!

That is what I see every day
 
Sunius1
Old
#10  
Member
Thanks Meter 33
Posts: 62
Join Date: Aug 2013
Quote:
Originally Posted by myst02 View Post
@GoodDayToDie: Congratulations, good work! Unfortunately I can't import the registry library, it says it's not a valid DLL. I have Visual Studio 2013 Pro. Does it work for WP8? Please help me solving the problem. Thanks!


Sent from my Windows Phone using Tapatalk
You need to reference .winmd file, not the .dll file.

The Following User Says Thank You to Sunius1 For This Useful Post: [ Click to Expand ]
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes