RAPI Shell

Discussion in 'Questions (Windows Mobile)' started by linum, Mar 5, 2009.

  1. linum

    linum Active Member Licensed User

    Can I invoke RAPI to launch my application?


    rapi.DeviceShell("myapp""\Program Files\myapp\myapp.exe")
    My program goes crazy when I try that code on my app. Am I typing it wrong, or is it not possible to invoke a custom made app?

    Thank you...
  2. agraham

    agraham Expert Licensed User

    Why are you passing the name and path of your exe to itself?
  3. linum

    linum Active Member Licensed User

    I have a desktop app and a Handheld app and I want to be able to click on a button (on my desktop app) that will automatically start my handheld app, that's why I'm using that code but obviously I don't understand the syntax.

    So, if I want to launch the app, can I leave the first argument blank? Like:

    rapi.DeviceShell("","\Program Files\myapp.exe")

    Or is it the other way around?:

    rapi.DeviceShell("\Program Files\myapp.exe","")
  4. agraham

    agraham Expert Licensed User

    The other way round. The RAPI help is a bit unclear, this is better

    Launches an application on the device.
    Syntax: DeviceShell (AappNname As String, AppArguments As String)
  5. linum

    linum Active Member Licensed User

    Ok, I'm using:

    rapi.DeviceShell("\Program Files\myapp\myapp.exe""")
    The device shows the wait cursor, like if it was trying to open the program but then the device kicks out an error:

    An error occurred on sub__main_app_start.

    I don't know why it wont open the app. I don't want to send any arguments. I just want to start the app remotely.

    Thanks for any help you can give me...
  6. Erel

    Erel Administrator Staff Member Licensed User

    Your syntax looks correct.
    Does the error message includes any other description?
    What happen you manually launch your device application? Does it work correctly?
  7. linum

    linum Active Member Licensed User

    I don't know what happened but when I tried it right now to write down the complete error description it worked perfectly.

    I'll keep messing around with different instances to see if it's something else that kicks that error.

    Thank you for your help...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice