⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 form1.frm

📁 利用两个不常用的函数将你的计算机搞死 不怕的就试试
💻 FRM
字号:
VERSION 5.00
Begin VB.Form Form1 
   Caption         =   "死机测试"
   ClientHeight    =   3195
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   4680
   LinkTopic       =   "Form1"
   ScaleHeight     =   3195
   ScaleWidth      =   4680
   StartUpPosition =   3  '窗口缺省
   Begin VB.CommandButton cmdFatalAppExit 
      Caption         =   "Fatal AppExit"
      Height          =   405
      Left            =   2430
      TabIndex        =   1
      Top             =   2625
      Width           =   1995
   End
   Begin VB.CommandButton cmdFatalExit 
      Caption         =   "Fatal Exit"
      Height          =   405
      Left            =   135
      TabIndex        =   0
      Top             =   2625
      Width           =   1995
   End
   Begin VB.Label Label1 
      Caption         =   "警告!!!!!请小心使用,先保存其他程序!"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   26.25
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H000000FF&
      Height          =   2280
      Left            =   210
      TabIndex        =   2
      Top             =   330
      Width           =   4230
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

'***************************************************************
'死机程序
'警告:不要在VB IDE中运行此程序,请编译成EXE文件后运行
'***************************************************************

Private Declare Sub FatalAppExit Lib "kernel32" Alias "FatalAppExitA" (ByVal uAction As Long, ByVal lpMessageText As String)

Private Declare Sub FatalExit Lib "kernel32" (ByVal code As Long)


Private Sub cmdFatalAppExit_Click()
    FatalAppExit 0, "如果你的机器和我一样...." & vbLf & vbLf & "并且你在VB IDE用这个东东...嘿嘿,你死定了! :("
End Sub


Private Sub cmdFatalExit_Click()
    FatalExit 1
End Sub
'******************************************************
'函数简介:
'FatalExit

'The FatalExit function transfers execution control to the debugger. The behavior of the debugger thereafter is specific to the type of debugger used.

'VOID FatalExit(
'int ExitCode // error code
');

'Parameters

'ExitCode

'Specifies the error code associated with the exit.

'Return Value

'This function does not return a value.

'Remarks

'An application should only use FatalExit for debugging purposes. It should not call the function in a retail version of the application because doing so will terminate the application.
 
'-------------------------------------------
'FatalAppExit

'The FatalAppExit function displays a message box and terminates the application when the message box is closed. If Windows is running with a kernel debugger, the message box gives the user the opportunity to terminate the application or to cancel the message box and return to the application that called FatalAppExit.

'VOID FatalAppExit(

'UINT uAction, // reserved

'LPCTSTR lpMessageText // address of string to display in message box
');
'Parameters

'uAction

'Reserved; must be zero.

'lpMessageText

'Points to a null-terminated string that is displayed in the message box. The message is displayed on a single line. To accommodate low-resolution screens, the string should be no more than 35 characters in length.

'Return Value

'This function does not return a value.

'Remarks

'An application calls FatalAppExit only when it is not capable of terminating any other way. FatalAppExit may not always free an application's memory or close its files, and it may cause a general failure of Windows. An application that encounters an unexpected error should terminate by freeing all its memory and returning from its main message loop.
 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -