Go to previous topic
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
Author Messages
szakeri555@yahoo.com
New Member
New Member
Posts:


--
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());
    }


    ---