Search

Technical Discussion Group Forum

This forum is provided for user discussion. While Beacon EmbeddedWorks support staff and engineers participate, Beacon EmbeddedWorks does not guarantee the accuracy of all information within in the Technical Discussion Group (TDG).

The "Articles" forums provide brief Articles written by Beacon EmbeddedWorks engineers that address the most frequently asked technical questions.

To receive email notifications when updates are posted for a Beacon EmbeddedWorks product download, please subscribe to the TDG Forum of interest.

TDG Forum

PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 19 Apr 2010 09:01 AM by  szakeri555@yahoo.com
KernelIoControl IOCTL_HAL_REBOOT for windows ce on imx31_10
 0 Replies
Sort:
You are not authorized to post a reply.
Author Messages

szakeri555@yahoo.com



New Member


Posts:
New Member


--
19 Apr 2010 09:01 AM
    does the following work as is? Or should something in the code like "lpd" change?

    BOOL ret_value;
    DWORD dwResetType = 1;
    #define IOCTL_HAL_REBOOT \
    CTL_CODE(FILE_DEVICE_HAL,('l'+'p'+'d'+0),METHOD_BUFFERED,FILE_ANY_ACCESS)
    ret_value = KernelIoControl(IOCTL_HAL_REBOOT
    ,&dwResetType
    ,sizeof( dwResetType )
    ,NULL
    ,0
    ,NULL);
    if ( !ret_value )
    {
    printf("Hard reset failed! \r\n %i",GetLastError());
    }
    You are not authorized to post a reply.