Related
mamaich said:
Occasionally I've found this page - http://blogs.msdn.com/sloh/archive/2005/05/27/422605.aspx
It has an interesting code at the bottom. I've already made a program that can hook system calls, I'll try to hook EnterCriticalSection and WaitForMultipleObjects and force them to use that code. Maybe this would reduce the occasional lockdowns.
Click to expand...
Click to collapse
I've made such a program. It gave no noticeable improvements for me, but I've attached it to this post with source code.
Source code would be interesting to people, who need to hook kernel functions that are implemented in nk.exe.
The function uses LoadKernelLibrary to load DLL, DLL relocates SystemAPISets table to writeable memory and hooks needed functions.
Code has no comments and looks ugly, but is short and should be easy to understand.
mamaich: thanks so much for this. I need all the hooking code I can get my hands on right now.
Will look at this ASAP. In your debt
V
Thanks...I've just started programming in EVC++ 4, so it might be useful.
Project is compiled with VS2005, it can be ported to eVC4. And it is designed for WM5, but should work also with older OSes, maybe minor modifications in internal OS structures may be necessary.
I had developed a software. The software are using the external dll library, how can I compile the exe embedded *.dlls??
PS: I am using a VS 2005, Language: VB.net
Also I would like to know how to protect my application code avoid the decompiler to decompile ???
sorry for my poor english.
Welcome to the forum.
Your English is fine, but unfortunately there is no simple answer to your questions.
I will start with the last one first:
There is no one simple way to protect your code. There are whole books and articles written on it and if you google you will even find commercial products that "scramble" compiled apps to make it difficult to disassemble and reverse engineer.
Unfortunately I can not give you more specific info like book titles since I am not too interested on the subject.
I can tell you this: whether you app gets hacked or not is a matter of how much it costs vs. how useful / desirable it is. That means that if your program is really grate and everyone wants it but it costs a lot someone will put in the effort and eventually crack it no matter what you do.
As for your first question: unless you have source code or the obj files for the DLL to link to there is no way to combine it with your exe. If something was released as a DLL library and only as a DLL library it will remain just that.
Like mentioned above; the only possibility to 'protect' your .NET application is to obfuscate the code. there are some good (but commercial) tools out there. Google for it and if you're lucky you can find a comparison as well. (hopefully somebody tested some tools already to compare them)
You cannot recompile a DLL unless you've the source code as well.
it's easier to do if one dont use .net
Something interesting that I found out while thinking about how to interop Unlock WP8: The "PhoneReg.exe" app which is a signed app used for developer unlocking a device is written in un-obfuscated C#.net code!
If anyone has access a program such as Dis#, we should be able to reverse-engineer this and at least figure out what types of data are being passed back and forth between different account types (e.g. Student dev unlock, vs regular dev unlock). Then we can maybe guess at what needs to be passed to Interop-Unlock these devices!
Based on my understanding of how the WP7 interop unlock works, all the Developer unlock does is modify a registry value. As the value gets higher, the more "Development stuff" you can do.
I'll see if I can scare up a copy of that app. Decompiling .NET code is trivial - you don't even need a paid tool, there are many perfectly good free ones (I usually use JustDecompile) - assuming it's not obfuscated.
With that said, bear in mind that we can't currently modify the data that the app receives from the network. That was actually how the original ChevronWP7 unlocker for WP7 worked, but Intercepting (or in the case CWP7U, spoofing) the data was blocked when Microsoft added a feature commonly called "certificate pinning", where rather than checking whether the server's SSL certificate is trusted in general (which you could do by installing a cert manually), the phone now checks for a specific cert (Microsoft's).
However, it's possible (a bit unlikely, but possible) that we'll find a vulnerability in the app. For example, they may have slightly messed up the cert pinning in a way we can exploit (I checked for cert pinning, but I didn't check for ways they might have screwed it up), or they might have left in some debug code we can mess with (that's how HTC interop unlock on WP7 was achieved), or some other such weakness.
If there's some way to help out by testing and such tasks in willing to test on my Lumia 920, if any vulnerability is found Just send me a PM if so
Sent from my Lumia 920 using Board Express
Cool. Good to know. What was nice about the program I mentioned is that it supposedly decompiles everything and then builds it into a nice Microsoft C# project that can be imported into Visual Studio. (I was able to do that, but bits of code within some classes and methods are missing and just have a code comment called //trial)
Some of the interesting code bits I noticed include:
1. the wonderful "NativeMethods.cs" file. This is a wrapper that allows you to call functions within "PhoneREG.dll" such as "GetAuthToken" and "GetWinPhone8Port"
2. "connectionManager.cs" It opens up a session to the phone using port 27077 to pass data.
3. The files called "lockCommand.cs" and "unlockCommand.cs" The deal with passing and converting some kind of "authToken" to the phone.
4. The "SignInDialog.cs" code provides everything necessary to sign into widows Live. It has variables to store oAUTH tokens.
My thoughts are as follows:
1. we could maybe write a custom app that functions as normal, but edits the ByteArray before it gets sent to the phone. Basically you would need an MSDN developer account of some sort, but signing in with this app will give you Interop Privileges.
2. Maybe there will be something "hidden" if we can figure out what this app is talking to on the phone via port 27077.
That sounds interesting. I'll try to look at the data tomorrow before I head to work and see if I can find anything Hopefully I will
Sent from my Lumia 920 using Board Express
If we can actually bypass interop lock with a non-MS signature, that would be fantastic... and I'd be astonished. That wasn't possible in WP7 (Mango or later, when the interop-lock was present) and isn't possible in Windows RT either.
Can you either send the app, or post a link to where you got it from?
Hi guys,
just wanted to give you all a huge *thumbs up*! You're doing great work here!
I have a Lumia 920 for about 2 weeks now.
So, as i did some Lumia 800 and Lumia 900 custom roms, and became a little "bored" to WP7, i would be happy if i could help you by testing some stuff on my Lumia 920
If you need my help, just let me know
lordmaxey said:
Hi guys,
just wanted to give you all a huge *thumbs up*! You're doing great work here!
I have a Lumia 920 for about 2 weeks now.
So, as i did some Lumia 800 and Lumia 900 custom roms, and became a little "bored" to WP7, i would be happy if i could help you by testing some stuff on my Lumia 920
If you need my help, just let me know
Click to expand...
Click to collapse
I know your feeling I made WM6.5.x, Android and WinPho 7 roms for the HTC HD2 before I got my Lumia 920
Sent from my Lumia 920 using Board Express
I have a dev unlocked Lumia 820 and can do any testing if required
If you are running a Windows 8 PC and can install the Windows Phone 8 SDK, the PhoneReg tool can be found at C:\Program Files (x86)\Microsoft SDKs\Windows Phone\v8.0\Tools\Phone Registration
There are some other tools that I haven't poked around at that could be interesting to try and decompile and "re-work" such as the XapSignTool. (I think this might be written in C++ though)
The SDK in its entirety can be downloaded from http://developer.windowsphone.com/en-us/downloadsdk. You want "SDK 8.0".
I'll get my dev unlock in a month. Will get it as a birthday gift So by then I'll be able to help out more.
Should've checked the USB port stuff this morning, but I didn't have time for it but will do it when I get home in 2 hours
Sent from my Lumia 920 using Board Express
EDIT: Can't seem to find a usable USB sniffer that works under Windows 8, or I've been configuring those I've tried wrong. Enabled TESTSIGNING in BCDEDIT and rebooted, so Test Mode is activated, but no tool seem to work
Regards
The phone itself can communicate with a Windows 7 PC, just not if you want to use the SDK. Perhaps try the same experiment under Windows 7? You might be able to copy the "Phone tools" directory off of Windows 8 onto Windows 7. It uses .net 4.5, so make sure the runtime is installed.
I have already gone down this road and can fairly confidently say it is a dead-end. The only interesting thing I found was the ability to switch a phone to use the internal Microsoft development authentication servers. Best of luck though - maybe I missed something.
SynergeTechSolutions said:
I have already gone down this road and can fairly confidently say it is a dead-end. The only interesting thing I found was the ability to switch a phone to use the internal Microsoft development authentication servers. Best of luck though - maybe I missed something.
Click to expand...
Click to collapse
Thats sad. Do you have any data collected from the communications on port 27077? That's what we're looking for right now.
Sent from my Lumia 920 using Board Express
SynergeTechSolutions said:
I have already gone down this road and can fairly confidently say it is a dead-end. The only interesting thing I found was the ability to switch a phone to use the internal Microsoft development authentication servers. Best of luck though - maybe I missed something.
Click to expand...
Click to collapse
bummer
Any details about what you found out?
Did you see if the internal (test, I assume) server mode used cert pinning? If not, we can spoof those servers and basically re-implement the original ChevronWP7 unlocker (in a more elegant form, too).
Not quite the Goal you want to move to but maybe what you have found out so far can be used to enable Dev Unlocking and XAP deployment to Dev Unlocked WP8 devices from Windows 7. I believe there are quite a lot of developers who would be happy to have that possibility.
I do know that when you activate dev unlock on WP8 devices, it does it using the Windows Phone IP over USB service ("C:\Program Files (x86)\Common Files\Microsoft Shared\Phone Tools\CoreCon\11.0\Bin\IpOverUsbSvc.exe"). The IpOverUSBSvc is more or less just a .NET wrapper (I figured this would be the case). If anyone is good at x86 assembly and can get into the IpOverUsbPc.dll, we may get somewhere.
snickler said:
I do know that when you activate dev unlock on WP8 devices, it does it using the Windows Phone IP over USB service ("C:\Program Files (x86)\Common Files\Microsoft Shared\Phone Tools\CoreCon\11.0\Bin\IpOverUsbSvc.exe"). The IpOverUSBSvc is more or less just a .NET wrapper (I figured this would be the case). If anyone is good at x86 assembly and can get into the IpOverUsbPc.dll, we may get somewhere.
Click to expand...
Click to collapse
several tools exists for decompiling DLLs to have a look at the source (which I assume will be .NET)
Reflector is one - commercial - solution, but in Adrian Banks blogs you will find alternatives that are free - and some commercial ones also.
http://www.adrianbanks.co.uk/?p=71
NielDK said:
several tools exists for decompiling DLLs to have a look at the source (which I assume will be .NET)
Reflector is one - commercial - solution, but in Adrian Banks blogs you will find alternatives that are free - and some commercial ones also.
http://www.adrianbanks.co.uk/?p=71
Click to expand...
Click to collapse
the DLL I mentioned is unfortunately a COM dll. I already ran ILSpy against the exe to find that out. We will need someone with x86 assembly experience
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/showthread.php?t=2355034).
My EnableAllSideloading app uses the Registry library (http://forum.xda-developers.com/showthread.php?t=2435697).
@hjc4869 has a basic FileExplorer app which uses the FileSystem library (http://forum.xda-developers.com/showthread.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.
Reserved for OP...
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.
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.
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).
Can't open "NativeAccessLibraries_040_029_010.zip"
Edit Ok with 7-zip
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.
I have added the NativeFileSystem library to my PDF to Office app...
Thanks again for all your work !
@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
myst02 said:
@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
Click to expand...
Click to collapse
You need to reference .winmd file, not the .dll file.
Thanks! Can we also modify hex registry values with it?
Sent from my Windows Phone using Tapatalk
If you have the required permissions, yes. There's read/write functions for REG_BINARY, and also a simple wrapper around RegSetValue that will work for any type.
However, the library doesn't actually give you any privileges your app didn't already have. Without special Capabilities (which usually require hacks to enable), you won't have write access anywhere in the registry at all...
GoodDayToDie said:
If you have the required permissions, yes. There's read/write functions for REG_BINARY, and also a simple wrapper around RegSetValue that will work for any type.
However, the library doesn't actually give you any privileges your app didn't already have. Without special Capabilities (which usually require hacks to enable), you won't have write access anywhere in the registry at all...
Click to expand...
Click to collapse
OK, thanks, but another question: I referenced .winmd file, but it gives me error, the component was not found. Any idea how to fix it?
Do you have the DLL and the WINMD in the same location? Are you creating a WP8.0 app (I don't know if apps targeting 8.1 specifically will work)? Are you building for ARM?
Yeah, I have. Library now working, but it doesn't recognize the commands, I mean if I write NativeRegistry.ReadDWORD command not found :/ Can you help me?
Sent from my RM-915_lta_lta_330 using Tapatalk
You're going to need to be way more specific.
How far did you get, i.e. can you compile the app? Install the app? Launch the app? Does it crash immediately or does it actually load? Etc.
What, *exactly*, breaks? Does it break when you try to reference the NativeRegistry library, or only when you try to actually use ReadDWORD function, or some time later? If you are able to call readDWORD, what is the return value? If it fails, what is the error code?
Are you getting an exception, or does it just not work? If it's an exception, give me as much detail about it as you can (the type, the message, the code where it happened, etc. if possible).
myst02 said:
Yeah, I have. Library now working, but it doesn't recognize the commands, I mean if I write NativeRegistry.ReadDWORD command not found :/ Can you help me?
Sent from my RM-915_lta_lta_330 using Tapatalk
Click to expand...
Click to collapse
Try to rebuild the solution.
GoodDayToDie said:
You're going to need to be way more specific.
How far did you get, i.e. can you compile the app? Install the app? Launch the app? Does it crash immediately or does it actually load? Etc.
What, *exactly*, breaks? Does it break when you try to reference the NativeRegistry library, or only when you try to actually use ReadDWORD function, or some time later? If you are able to call readDWORD, what is the return value? If it fails, what is the error code?
Are you getting an exception, or does it just not work? If it's an exception, give me as much detail about it as you can (the type, the message, the code where it happened, etc. if possible).
Click to expand...
Click to collapse
Hi, I can't even build it, it doesn't recognize the command and makes a red line under it. I can reference the library, but not use any commands like ReadDWORD, WriteDWORD and so on. Screenshot is attached, this is happening if I load your EnableAllSideloading App, for example. With self-created projects I have the same problem. My system is Win 8.1 Pro x64 and I'm using Visual Studio 2013 Professional. Can you help me? Thanks!
You have added
Registry.winmd in reference library
and
Using Registry;
in your source code
Source code for EnableAllSideloading already has the requisite using directives...
When you look in the project's References, is the Registry library referenced correctly? By default it'll try to use a relative path that I use on my PC, but probably not the same path you use. You may need to manually adjust the reference, or delete it and re-create it.
Alternatively, what auto-fix options does Visual Studio give you when you click on those red lines?
That's an app to help you lock screen and adjust volume with tiles. It calls functions in ShellChromeAPI.dll . Finally, it got published with English version.
link: http://www.windowsphone.com/en-us/store/app/quick-tiles/1725cca2-2349-4d33-b5d5-8b04e7810c04
(You may need to switch your phone language to English to download the English version. otherwise, the Chinese version will be shown. Forgive me for my tight schedule and I have to split different languages into different XAPs, for I only spent 2 hours developing this app...)
I've found two ways to pass the marketplace API detect, one is to use P/Invoke and the other is to load LoadLibraryExW without extern that from the lib provided by Microsoft.
both methods will be provided here in a month, and I may provide write some wrappers or static libraries.
Notice that I only found ways to access restricted API, but get higher privilege is not possible.
By this way, I think @GoodDayToDie 's HTTP Server with registry browser can be published with some simple modify. Even publishing the samsung interop unlock guide, which launches the toast using undocumented, is possible. Maybe we should try to find more useful functions which can be called without privilege in different dlls.
hjc4869 said:
That's an app to help you lock screen and adjust volume with tiles. It calls functions in ShellChromeAPI.dll . Finally, it got published with English version.
link: http://www.windowsphone.com/en-us/store/app/quick-tiles/1725cca2-2349-4d33-b5d5-8b04e7810c04
(You may need to switch your phone language to English to download the English version. otherwise, the Chinese version will be shown. Forgive me for my tight schedule and I have to split different languages into different XAPs, for I only spent 2 hours developing this app...)
I've found two ways to pass the marketplace API detect, one is to use P/Invoke and the other is to load LoadLibraryExW without extern that from the lib provided by Microsoft.
both methods will be provided here in a month, and I may provide write some wrappers or static libraries.
Notice that I only found ways to access restricted API, but get higher privilege is not possible.
By this way, I think @GoodDayToDie 's HTTP Server with registry browser can be published with some simple modify. Even publishing the samsung interop unlock guide, which launches the toast using undocumented, is possible. Maybe we should try to find more useful functions which can be called without privilege in different dlls.
Click to expand...
Click to collapse
What restricted API's possible to upload ?
ngame said:
What restricted API's possible to upload ?
Click to expand...
Click to collapse
you can load any API functions. but only some of them can be called and only a few is really useful.
I only tested the following functions
BOOL Shell_IsLocked()
void Shell_TurnScreenOn(BOOL)
void Shell_AdjustVolume(int)
hjc4869 said:
That's an app to help you lock screen and adjust volume with tiles. It calls functions in ShellChromeAPI.dll . Finally, it got published with English version.
link: http://www.windowsphone.com/en-us/store/app/quick-tiles/1725cca2-2349-4d33-b5d5-8b04e7810c04
(You may need to switch your phone language to English to download the English version. otherwise, the Chinese version will be shown. Forgive me for my tight schedule and I have to split different languages into different XAPs, for I only spent 2 hours developing this app...)
I've found two ways to pass the marketplace API detect, one is to use P/Invoke and the other is to load LoadLibraryExW without extern that from the lib provided by Microsoft.
both methods will be provided here in a month, and I may provide write some wrappers or static libraries.
Notice that I only found ways to access restricted API, but get higher privilege is not possible.
By this way, I think @GoodDayToDie 's HTTP Server with registry browser can be published with some simple modify. Even publishing the samsung interop unlock guide, which launches the toast using undocumented, is possible. Maybe we should try to find more useful functions which can be called without privilege in different dlls.
Click to expand...
Click to collapse
Interesting. But almost useless cause now all can freely make a developer unlock. Store apps can use RPC but this requires InteropServices CAP.
-W_O_L_F- said:
Interesting. But almost useless cause now all can freely make a developer unlock. Store apps can use RPC but this requires InteropServices CAP.
Click to expand...
Click to collapse
yes I tried it before in beta app .
ID_CAP_INTEROPSERVICES , Xbox live and exe files in xap are unable to upload !
And those APIs work without having the restricted capabilities in the manifest file?
After the update, it went back to Chinese... it would be nice if you set English as the default language, at least for European and American countries
mcosmin222 said:
And those APIs work without having the restricted capabilities in the manifest file?
Click to expand...
Click to collapse
Yes.
-W_O_L_F- said:
Yes.
Click to expand...
Click to collapse
Hmmm
This looks interesting.
P/Invoke? How did you manage to use it? I thought it was not available for Silverlight?
pinvoke is possible with silverlight, but according to microsoft it is illegal on the marketplace.
which is half true. you cant pinvoke a native dll compiled for arm, but the wp8 own dlls seem to make an exception
mcosmin222 said:
you cant pinvoke a native dll compiled for arm, but the wp8 own dlls seem to make an exception
Click to expand...
Click to collapse
What is the difference?
Useless guy said:
What is the difference?
Click to expand...
Click to collapse
Go ask microsoft.
If you scroll down you will find that p/invoke is not allowed in wp8 sdk
http://msdn.microsoft.com/en-us/lib...jj206940(v=vs.105).aspx#BKMK_Appcompatibility
however, the OP seems to have managed to do it with a DLL contained in the WP8 system.
I never actually tried to p/invoke something on the marketplace. Maybe this needs additional research to see if arm compiled third party dlls can be used.
I remember some guy on the forum trying to p/invoke a native ARM dll and got type load exceptions.
by native i mean something which is not compiled with C++/CX for windows phone. As in pure C/C++ targeted for ARM.
mcosmin222 said:
Go ask microsoft.
If you scroll down you will find that p/invoke is not allowed in wp8 sdk
http://msdn.microsoft.com/en-us/lib...jj206940(v=vs.105).aspx#BKMK_Appcompatibility
however, the OP seems to have managed to do it with a DLL contained in the WP8 system.
I never actually tried to p/invoke something on the marketplace. Maybe this needs additional research to see if arm compiled third party dlls can be used.
I remember some guy on the forum trying to p/invoke a native ARM dll and got type load exceptions.
by native i mean something which is not compiled with C++/CX for windows phone. As in pure C/C++ targeted for ARM.
Click to expand...
Click to collapse
I know what pinvoke is perfectly, don't send me to msdn as long as I'm able to find it by myself.
Both an unmanaged dll and a WinRT component are native. CLR wraps every COM\WinRT object in the Runtime Callable Wrapper, but the object itself stays in the unmanaged heap.
If you think that WinRT or C++/CX are not native, you're wrong.
To @hjc4869
How did you manage to bypass marketplace analysis using P\Invoke? I'm fairly certain that MS checks metadata for DllImport attribute.
I'm going to try the second way, thanks!
Useless guy said:
I know what pinvoke is perfectly, don't send me to msdn as long as I'm able to find it by myself.
Both an unmanaged dll and a WinRT component are native. CLR wraps every COM\WinRT object in the Runtime Callable Wrapper, but the object itself stays in the unmanaged heap.
If you think that WinRT or C++/CX are not native, you're wrong.
To @hjc4869
How did you manage to bypass marketplace analysis using P\Invoke? I'm fairly certain that MS checks metadata for DllImport attribute.
I'm going to try the second way, thanks!
Click to expand...
Click to collapse
never said you don't know what p/invoke is.
I just wanted to show you that it is illegal in wp8 SDK (which that link leads to).
And if you actually read that link, you would see that invoking winRT or C++/CX (compiled for WP8) is allowed. This is probably due to the fact that these methods still execute in a sandbox. While MS won't allow arm compiled dll without the WP8 SDK because it can't verify its security.
mcosmin222 said:
And if you actually read that link, you would see that invoking winRT or C++/CX (compiled for WP8) is allowed. This is probably due to the fact that these methods still execute in a sandbox. While MS won't allow arm compiled dll without the WP8 SDK because it can't verify its security.
Click to expand...
Click to collapse
What does it mean - compile for WP8? I can add to the package any dll that uses Win32 (non-restricted) and compiled for ARM. The library will work on both WP and W8 without recompilaton.
Useless guy said:
What does it mean - compile for WP8? I can add to the package any dll that uses Win32 (non-restricted) and compiled for ARM. The library will work on both WP and W8 without recompilaton.
Click to expand...
Click to collapse
Will it? When you compile a C++ dll for desktop, it references kernel32.dll and unless you explicitly exclude it from the linker, it couldn't possible work on WP8 since there's no kernel32.dll.
Hi all
Trying to play with this method, but it seems LoadLibraryExW is not available. The only function available is LoadPackagedLibrary and when I try to run it, I've got C00000D error which is STATUS_INVALID_PARAMETER.
---------- Post added at 01:03 PM ---------- Previous post was at 12:49 PM ----------
It seems LoadPackagedLibrary only loads .dll from installation folder of application and do not allows full path in name. Thats why I got invalid argument error
Useless guy said:
What is the difference?
Click to expand...
Click to collapse
Code signature.
Sunius1 said:
Will it? When you compile a C++ dll for desktop, it references kernel32.dll and unless you explicitly exclude it from the linker, it couldn't possible work on WP8 since there's no kernel32.dll.
Click to expand...
Click to collapse
Kernel32.dll is the huge part of Win32 and it exists on both WP and Windows. WPSDK doesn't include kernel32.lib, but I'm pretty sure it can be easily generated from dll file.
#define WINAPI_PARTITION_DESKTOP and kernel32.lib should work, I think.
UPD:
I forgot, kernel32 could be removed as it's just the compatability layer for kernelbase.dll and new windows 8 api sets (api-ms-*.dll).
clrokr said:
Code signature.
Click to expand...
Click to collapse
DLLs are signing on certification process.