Lock Device

I have a Windows Mobile 5 PDA (Dell Axim X50v). I want to make a program (in Vb2005 using WM SDK) to create a program that locks the device using the method built into windows mobile.

That is my first objective. My second objective is to make the app run from the today screen or system tray.

I have searched these forums but the only "lock device" related topics are about people making their locking programs, when i want to use the one built into WM

Thanks in Advance,
James


Answer this question

Lock Device

  • iosys

    anyone
  • toddhd

    Try calling the native API SetSystemPowerState with POWER_STATE_PASSWORD for the StateFlags argument.



  • careyr

    Any one

  • kevinj

    That's mot the lock I mean I want the one where it comes up asking for a password or 4 digit pin.

  • Mystret

    from pm.h: #define POWER_STATE_PASSWORD (DWORD)(0x10000000)

    equals to: &H10000000



  • Mnkylord

  • dn8

    It didn't work. I can make it turn off the device but when i want it to lock the device it does not work.
    I have tried with a password set on the device and without.

    I have attached the code below.
  • DSent

    Does anyone know what the value is for POWER_STATE_PASSWORD

    E.g: &H100

    Or in numerical format

  • Lock Device