devxlogo

How did Windows start?

How did Windows start?

If you need to know how Windows was started you have just to call an API function: GetSystemMetrics. Passing the SM_CLEANBOOT constant as parameter, the function returns a Long value with this meaning:

0 = Normal boot
1 = Fail-safe boot
2 = Fail-safe with network boot

Here ia an example that shows how to call the function:

Private Declare Function GetSystemMetrics Lib "user32" (ByVal nIndex As Long) _    As LongPublic Const SM_CLEANBOOT = 67Private Sub Command1_Click()    Select Case GetSystemMetrics(SM_CLEANBOOT)        Case 0: MsgBox "Normal boot"        Case 1: MsgBox "Fail-safe boot"        Case 2: MsgBox "Fail-safe with network boot"    End SelectEnd Sub  

See also  Is Machine Learning Automating Creativity in Graphic Design?
devxblackblue

About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.

About Our Journalist