Mango Restart Phone App based on DLLImport

Search This thread

Ddriver

Senior Member
Mar 28, 2005
400
22
Cool,

now take also out the Interop-Lock and we are all happy. ;)

Sent from my 7 Mozart using XDA Windows Phone 7 App
 

contable

Senior Member
Oct 25, 2009
1,755
996
As far as I know there is no way to do that right now.

In general you just have to call a .exe file in the windows folder. This way worked the first shortcuts I had for the OMNIA 7. Maybe in case of the internet sharing page it´s the softap.exe, but not important...

Another question:

Do you know the guid I have to call when your restart app is pinned ?

I mean if I want to execute the restart function directly not the app...

I would like to add the pinned tile to my created Homebrew folder, not the app with the settings page.
 

singularity0821

Senior Member
Apr 6, 2011
331
314
In general you just have to call a .exe file in the windows folder. This way worked the first shortcuts I had for the OMNIA 7. Maybe in case of the internet sharing page it´s the softap.exe, but not important...

Another question:

Do you know the guid I have to call when your restart app is pinned ?

I mean if I want to execute the restart function directly not the app...

I would like to add the pinned tile to my created Homebrew folder, not the app with the settings page.

I don't know if that's possible. The guid should be the same as it is the same app.
 

GoodDayToDie

Inactive Recognized Developer
Jan 20, 2011
6,066
2,931
Seattle
OK, I'm not sure why this needs ID_CAP_INTEROPSERVICES - you should be fine without it. Did you try it that way? Unless your code is opening a driver handle, you don't need that capability. Native code works just fine with only the Interop manifest.

To call the live tile function directly, it's the same GUID but you need to know the parameter that passed along with the live tile. Calling the app with that parameter will start it and trigger the OnNavigatedTo event with the correct parameter.
 
  • Like
Reactions: Budniu

contable

Senior Member
Oct 25, 2009
1,755
996
To call the live tile function directly, it's the same GUID but you need to know the parameter that passed along with the live tile. Calling the app with that parameter will start it and trigger the OnNavigatedTo event with the correct parameter.

So please give me a hint how to figure out the guid...

I´m sure that it is stored somewhere on device.
 

GoodDayToDie

Inactive Recognized Developer
Jan 20, 2011
6,066
2,931
Seattle
It is stored on the device, both in the file system and in the app manager. Neither of those are terribly useful though, so the simpler way is to open the XAP directly, and look in the WMAppManifest.XML file.

ProductID="{ede8d6f6-4b64-43b0-8be6-1c98def5ca85}"

As for the parameter you have to pass to make it think it's coming from the live tile, you'll either need to decompile the DLL or ask the author (or get the source code, which it would be awesome if more people just included up front).

By the way, ID_CAP_INTEROPSERVICES is already commented out of the manifest. You do not need interop-unlock for this app!
 
  • Like
Reactions: singularity0821

contable

Senior Member
Oct 25, 2009
1,755
996
It is stored on the device, both in the file system and in the app manager. Neither of those are terribly useful though, so the simpler way is to open the XAP directly, and look in the WMAppManifest.XML file.

ProductID="{ede8d6f6-4b64-43b0-8be6-1c98def5ca85}"

As for the parameter you have to pass to make it think it's coming from the live tile, you'll either need to decompile the DLL or ask the author (or get the source code, which it would be awesome if more people just included up front).

By the way, ID_CAP_INTEROPSERVICES is already commented out of the manifest. You do not need interop-unlock for this app!


I know how to get the productID, the problem is the mentioned parameter.
I want to add it to my with Jaxbot´s tool created homebrew folder...

The author don´t know either, I allready asked him.

Anyway thanks for trying to help me.


Edit: I totally agree that more people should post the sourcecode, too.
 

GoodDayToDie

Inactive Recognized Developer
Jan 20, 2011
6,066
2,931
Seattle
The author certainly does know - it's that thing which distinguishes "was I launched fromt the live tile or not?" that you check for in the OnNavigatedTo event handler. It's a string URI which is applied to the live tile when it is created, and is part of the live tile's identity (the URI must always be unique).
 

contable

Senior Member
Oct 25, 2009
1,755
996
The author certainly does know - it's that thing which distinguishes "was I launched fromt the live tile or not?" that you check for in the OnNavigatedTo event handler. It's a string URI which is applied to the live tile when it is created, and is part of the live tile's identity (the URI must always be unique).

So I don´t know either why I don´t get this information...
 

singularity0821

Senior Member
Apr 6, 2011
331
314
So done.. Sorry for not giving clear answers before...

And I also tried to figure out how to add it to folders. The parameter passed to the main page is tile. In the previous version I did it in a stupid way and I better spare you the details :eek:

Oh and if you figure out how to add it to the folder please let me know.
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 15
    I've created a simple app to restart the phone. It's based on DLLImport by fiinix.

    Cleaned it up a little and added source.

    Video by WPXBOX


    View attachment 772512
    2
    One thing I notice is that the app doesn't always work from live tile, or if phone is running for a while, it just backs out of the app on confirmation of shutdown.

    Video is here,, doesn't happen all the time, but more often than not. It's a great tool, just a small bug.
    1
    OK, I'm not sure why this needs ID_CAP_INTEROPSERVICES - you should be fine without it. Did you try it that way? Unless your code is opening a driver handle, you don't need that capability. Native code works just fine with only the Interop manifest.

    To call the live tile function directly, it's the same GUID but you need to know the parameter that passed along with the live tile. Calling the app with that parameter will start it and trigger the OnNavigatedTo event with the correct parameter.
    1
    It is stored on the device, both in the file system and in the app manager. Neither of those are terribly useful though, so the simpler way is to open the XAP directly, and look in the WMAppManifest.XML file.

    ProductID="{ede8d6f6-4b64-43b0-8be6-1c98def5ca85}"

    As for the parameter you have to pass to make it think it's coming from the live tile, you'll either need to decompile the DLL or ask the author (or get the source code, which it would be awesome if more people just included up front).

    By the way, ID_CAP_INTEROPSERVICES is already commented out of the manifest. You do not need interop-unlock for this app!
    1
    Nice application! Could you please share the source with us? I am still looking for examples that uses DLLimport :)
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone