|
-
Sep 26th, 2007, 05:31 AM
#1
Thread Starter
New Member
How to Soft Reset by VB.NET
Hi
I'm using Symbol PDT8100 windows mobile OS and my applications on VB.NET 2003.
Whenever I used to softboot the symtem by pressing Func+End+Light.. most of the time it is getting Hardbooted and I'm loosing all the datas.
Thatswhy I believe if reset by an application, it won't get hardbooted. Can someone help me the coding?
Thanks in advance
By
Mohamed Faisel
-
Sep 26th, 2007, 06:16 AM
#2
Re: How to Soft Reset by VB.NET
Yes, you must use the
KernelIoControl of coredll API
Here is an example http://www.pinvoke.net/default.aspx/...ernelIoControl
it does HARD reset, The params must be set here:
Code:
uint IOCTL_HAL_REBOOT = CTL_CODE(FILE_DEVICE_HAL, 15, METHOD_BUFFERED, FILE_ANY_ACCESS);
Also the IOCTL_HAL_REBOOT is that does all the work. Here a param of
0x00000101 is set for it (in DEVICE_HAL). Do try a 0x101003C i think it reboots but NOT 100% sure. Maybe pete can give more info...
Last edited by sapator; Sep 26th, 2007 at 06:20 AM.
-
Sep 26th, 2007, 06:24 AM
#3
Frenzied Member
Re: How to Soft Reset by VB.NET
Hi,
Try....
Code:
Shared<DllImport("Coredll.dll")> _
Function KernelIoControl(dwIoControlCode As Integer, lpInBuf As IntPtr, nInBufSize As Integer, lpOutBuf As IntPtr, nOutBufSize As Integer, ByRef lpBytesReturned As Integer) As Integer
Shared<DllImport("Coredll.dll")> _
Sub SetCleanRebootFlag()
Public Sub hardReset()
Me.reset(True)
End Sub 'hardReset
Public Sub softReset()
Me.reset(False)
End Sub 'softReset
Private Sub reset(hardReset As Boolean)
Dim IOCTL_HAL_REBOOT As Integer = &H101003C
Dim bytesReturned As Integer = 0
If hardReset Then
SetCleanRebootFlag()
End If
KernelIoControl(IOCTL_HAL_REBOOT, IntPtr.Zero, 0, IntPtr.Zero, 0, bytesReturned)
End Sub 'reset
very carefully 
Pete
-
Sep 26th, 2007, 06:34 AM
#4
Re: How to Soft Reset by VB.NET
Oh. So it was 101003C
I was not sure. So if it burns your PDA or something blame it on pete,ok
-
Sep 26th, 2007, 07:44 AM
#5
-
Sep 27th, 2007, 10:55 AM
#6
Lively Member
Re: How to Soft Reset by VB.NET
How to Soft Reset by VB.NET from Desktop? Is possible?
Thank you
-
Sep 27th, 2007, 12:27 PM
#7
Frenzied Member
Re: How to Soft Reset by VB.NET
Hi,
the only way I can think, would be to use 'RAPI' to start a program on the PPC to do a soft reset
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|