Inferno986

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


Re: .NET Compact Framework Lock Device

Inferno986

Any one




Re: .NET Compact Framework Lock Device


Re: .NET Compact Framework Lock Device

Inferno986

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




Re: .NET Compact Framework Lock Device

Michael Koster

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






Re: .NET Compact Framework Lock Device

Inferno986

Does anyone know what the value is for POWER_STATE_PASSWORD

E.g: &H100

Or in numerical format




Re: .NET Compact Framework Lock Device

Michael Koster

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

equals to: &H10000000






Re: .NET Compact Framework Lock Device

Inferno986

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.



Re: .NET Compact Framework Lock Device

Inferno986

anyone