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

📄 module1.bas

📁 通过vb加载设备驱动
💻 BAS
字号:
Attribute VB_Name = "Module1"
''''''''''''''''''''''''''''''''''''''''''''''''''''



Type SERVICE_STATUS
    dwServiceType As Long
    dwCurrentState As Long
    dwControlsAccepted As Long
    dwWin32ExitCode As Long
    dwServiceSpecificExitCode As Long
    dwCheckPoint As Long
    dwWaitHint As Long
End Type

Declare Function OpenSCManager Lib "advapi32.dll" Alias "OpenSCManagerA" ( _
     lpMachineName As Any, _
     lpDatabaseName As Any, _
     ByVal dwDesiredAccess As Long) As Long
     
Declare Function CloseServiceHandle Lib "advapi32.dll" ( _
     ByVal hSCObject As Long) As Long

Declare Function CreateService Lib "advapi32.dll" Alias "CreateServiceA" ( _
     ByVal hSCManager As Long, _
     ByVal lpServiceName As String, _
     ByVal lpDisplayName As String, _
     ByVal dwDesiredAccess As Long, _
     ByVal dwServiceType As Long, _
     ByVal dwStartType As Long, _
     ByVal dwErrorControl As Long, _
     ByVal lpBinaryPathName As String, _
     ByVal lpLoadOrderGroup As Long, _
     ByVal lpdwTagId As Long, _
     ByVal lpDependencies As Long, _
     ByVal lp As Long, _
     ByVal lpPassword As Long) As Long

Declare Function OpenService Lib "advapi32.dll" Alias "OpenServiceA" ( _
     ByVal hSCManager As Long, _
     ByVal lpServiceName As String, _
     ByVal dwDesiredAccess As Long _
     ) As Long
     
Declare Function ControlService Lib "advapi32.dll" ( _
     ByVal hService As Long, _
     ByVal dwControl As Long, _
     ByRef lpServiceStatus As SERVICE_STATUS) As Long

Declare Function StartService Lib "advapi32.dll" Alias "StartServiceA" ( _
     ByVal hService As Long, _
     ByVal dwNumServiceArgs As Long, _
     ByVal lpServiceArgVectors As Long) As Long

Declare Function DeleteService Lib "advapi32.dll" ( _
     ByVal hService As Long) As Long

⌨️ 快捷键说明

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