实现GiteePages自动部署的aardio源码

问题的由来github提供开源项目管理,同时提供静态网站github page,但国内访问速度很慢,经常打不开,gitee码云在国内,提供和github一样的功能,但gitee page每次推送文件后,不会自动刷新(免费版),必须手动刷新!网上已有提供python自动刷新Gitee Pages的源码! python自动部署Gitee Pages源码 python环境要求python3 + selenium + chromedrive.exe。 先安装好python3(最好设置好国内镜像源,不然安装库,因墙的缘故可能失败) 再安装好selenium库pip install seleniumpip install Alert 下载chrome对应的chromedriver 2.python源码 123456789101112131415161718192021222324252627import timefrom selenium import webdriverfrom selenium.webdriver.common.alert import Alertoption = webdriver.ChromeOptions()#指定chrome浏览器option.binary_location=r'D:\Program Files\CentBrowser64\chrome.exe'#指定chromedriver和chrome版本要匹配driver = webdriver.Chrome(r'D:\Program Files\CentBrowser64\chromedriver.exe')driver.get('https://gitee.com/login')driver.maximize_window()time.sleep(2)user_login = driver.find_element_by_id('user_login')user_login.send_keys("gitee的用户名")driver.find_element_by_id('user_password').send_keys("gitee的登录密码")driver.find_element_by_xpath('/html/body/div[2]/div[2]/div/div[1]/div[2]/div[1]/form[1]/div/div/div/div[4]/input').click()time.sleep(2)driver.get('https://gitee.com/此处改为you_gitee_id/此处改为you_gitee_id/pages')driver.find_element_by_xpath('/html/body/div[3]/div[2]/div/div[2]/div/form/div[6]').click()Alert(driver).accept()time.sleep(5)print("成功")driver.quit()fp = open("D:\log.txt", "a+")now_time = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())fp.write("部署时间:{0}\n".format(now_time))fp.close() 提供此代码的开源项目地址:https://github.com/witmy/my-giteepages上面的代码修改了一下,指定了chrome浏览器地址和chromedriver的地址,这样就不会运行不了!特别适合小白! aardio自动部署Gitee Pages的源码python的代码,如果是新手,安装python,然后直接运行上面的源码,成功的机率很小,因为Chrome driver是需要浏览器和driver版本匹配的!上面的python源码,如果你不熟悉python,基本上调试不会成功!不过不要紧,下面我讲的,小白也会的aardio教程,一步一步复杂粘贴就能实现,你不需要会python,不需要会aardio,一样可以编译一个自动更新gitee pages的执行文件!

发现网卡变百兆自动发送邮件通知的AutoIt源码

问题的出现网吧维护中,由于交换机或水晶机或工艺上的问题,有些机器网卡正常的千兆会变成百兆,在无盘系统中启动机器或启动游戏变得很慢,用户体验相当不好!出现这个问题时,网管或维护却很难第一时间发现1000M变成100M的问题机器。以下是使用autoit3写的,发现任意网卡是100M,就会按mail.ini配置文件中指定的邮件发送邮件通知,让你第一时间发现这种网卡变100M的问题机器,及时进行处理! 把以下代码保存为au3脚本或编译为可执行文件后,需要在同目录下建一个mail.ini文件,内容如下[setup]FromAddress=发件人@qq.comtoaddress=收件人@qq.comusername=qq号password=QQ的smtp服务器提供的邮件授权码body=邮件正文内容 其中password内容,应该进入你的QQ邮箱开通smtp和取得授权码 使用方法设置好mainl.ini中的qq的smtp服务器的用户名及授权码等一切信息后,开机执行一次此代码就行,检测完成自动退出程序 autoit源码如下以下为autoit3实现发现任意一网卡是100M,自动根据设置的邮件发送邮件通知! 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162#include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <ListViewConstants.au3> #include <WindowsConstants.au3> #include <GuiListView.au3> #Include<file.au3>#NoTrayIcon$badlan=false$a = _GetAdaptersInfo() For $i = 1 To $a[0][0] $lSpeed=GetIfEntry($a[$i][3])if $lSpeed=100 then $badlan=true ExitLoopendifNextif $badlan=true then $SmtpServer = "smtp.qq.com" ; address for the smtp-server to use - REQUIRED $FromName = "发送人" ; name from who the email was sent $FromAddress = IniRead(@WorkingDir&"\mail.ini","setup","FromAddress","") $ToAddress = IniRead(@WorkingDir&"\mail.ini","setup","toaddress","") $Subject = @ComputerName&"号机器网卡为100M,请检查!" ; subject from the email - can be anything you want it to be ;$Body = "邮件正文" ; the messagebody from the mail - can be left blank but then you get a blank mail $Body = IniRead(@WorkingDir&"\mail.ini","setup","body","") $AttachFiles = "" ; the file you want to attach- leave blank if not needed $CcAddress = "" ; address for cc - leave blank if not needed $BccAddress = "" ; address for bcc - leave blank if not needed $Importance = "Normal" ; Send message priority: "High", "Normal", "Low" $Username = IniRead(@WorkingDir&"\mail.ini","setup","Username","") $Password = IniRead(@WorkingDir&"\mail.ini","setup","Password","") $IPPort = 465 ; port used for sending the mail $ssl = 1 $rc = _INetSmtpMailCom ( $SmtpServer, $FromName, $FromAddress, $ToAddress, $Subject, $Body, $AttachFiles, $CcAddress, $BccAddress, $Importance, $Username, $Password, $IPPort, $ssl )endif;msgbox(0,"",$ToAddress)Func SetListView() $a = _GetAdaptersInfo() $index = ($a[1][3]) For $i = 1 To $a[0][0] GUICtrlCreateListViewItem($a[$i][1] & '|' & _ StringLeft(Hex($a[$i][2]), 12) & '|' & _ $a[$i][6] & '|' & _ GetIfEntry($a[$i][3]) & ' MB', $ListView1) Next EndFunc ;==>SetListView Func GetIfEntry($ifIndex) Local $tagBuffer, $tBuffer, $pBuffer, $iResult, $iSpeed, $sDescr $tagBuffer = "wchar[256];dword[5];byte[8];dword[16];char[256]" $tBuffer = DllStructCreate($tagBuffer) $pBuffer = DllStructGetPtr($tBuffer) DllStructSetData($tBuffer, 2, $ifIndex, 1) $iResult = DllCall("iphlpapi.dll", "long", "GetIfEntry", "ptr", $pBuffer) $iSpeed = DllStructGetData($tBuffer, 2, 4) / 1000 / 1000 $sDescr = DllStructGetData($tBuffer, 5) $tBuffer = 0 Return SetError($iResult[0], $iSpeed, $iSpeed) EndFunc ;==>GetIfEntry Func _GetAdaptersInfo() Local $iResult, $tBuffer, $pBuffer, $aResult[1][9], $tagADPTINFO, $tAdpt ; 第一次调用传递空值,pOutBufLen ( $iResult[2] ) 设为结构所需大小,单位byte。 $iResult = DllCall("iphlpapi.dll", "dword", "GetAdaptersInfo", "ptr", 0, "ulong*", 0) $tBuffer = DllStructCreate("byte[" & $iResult[2] & "]") ; 定义$iResult[2] 字节的缓存区域 (分配内存空间)。 $pBuffer = DllStructGetPtr($tBuffer) ; 获取内存指针。 ; 第二次调用,GetAdaptersInfo把网卡信息复制到指定的内存空间 ($tBuffer) 中。 $iResult = DllCall("iphlpapi.dll", "dword", "GetAdaptersInfo", "ptr", $pBuffer, "ulong*", $iResult[2]) ; $iResult[0]值为0则调用成功,否则为系统错误号。 ; 数据转换, byte --> IP_ADAPTER_INFO $tagADPTINFO = "ptr NextAdpt; dword ComboIndex; char AdptName[260]; char AdptDescr[132];uint AddrLength;byte MacAddr[8];dword Index;uint Type; uint DhcpEnabled;ptr CurrentIpAddr;ptr NextIpAddr; char IpAddr[16];char IpAddrMask[16]; dword IpAddrCxt; ptr NextGateway; char GatewayAddr[16]; char GatewayAddrMask[16];dword GatewayCxt; ptr NextDhcp; char DhcpAddr[16]; char DhcpAddrMask[16];dword DhcpCxt; int HaveWins; ptr NextPriWinsServer; char PriWinsServerAddr[16]; char PriWinsServerAddrMask[16]; dword PriWinsServerCxt; ptr NextSecWinsServer; char SecWinsServerAddr[16]; char SecWinsServerAddrMask[16]; dword LeaseObtained; dword LeaseExpires" While $pBuffer $tAdpt = DllStructCreate($tagADPTINFO, $pBuffer) $aResult[0][0] += 1 ReDim $aResult[$aResult[0][0] + 1][9] $aResult[$aResult[0][0]][0] = DllStructGetData($tAdpt, "AdptName") ; 网卡名称 $aResult[$aResult[0][0]][1] = DllStructGetData($tAdpt, "AdptDescr") ; 网卡描述 $aResult[$aResult[0][0]][2] = DllStructGetData($tAdpt, "MacAddr") ; 网卡MAC $aResult[$aResult[0][0]][3] = DllStructGetData($tAdpt, "Index") ; 网卡索引号 $aResult[$aResult[0][0]][4] = DllStructGetData($tAdpt, "Type") ; 类型 $aResult[$aResult[0][0]][5] = DllStructGetData($tAdpt, "DhcpEnabled") ; DHCP是否启用 true = 启用, false = 禁用 $aResult[$aResult[0][0]][6] = DllStructGetData($tAdpt, "IpAddr") ; IP 地址 $aResult[$aResult[0][0]][7] = DllStructGetData($tAdpt, "GatewayAddr") ; 网关地址 $aResult[$aResult[0][0]][8] = DllStructGetData($tAdpt, "DhcpAddr") ; DHCP地址, 只有DhcpEnabled为true时,此值才有效。 $pBuffer = DllStructGetData($tAdpt, "NextAdpt") ; [下一张网卡信息的内存地址。] $tAdpt = 0 WEnd $tBuffer = 0 Return SetError($iResult[0], 0, $aResult) EndFunc ;==>_GetAdaptersInfo; The UDFFunc _INetSmtpMailCom ( $s_SmtpServer, $s_FromName, $s_FromAddress, $s_ToAddress, $s_Subject = "", $as_Body = "", $s_AttachFiles = "", $s_CcAddress = "", $s_BccAddress = "", $s_Importance= "Normal", $s_Username = "", $s_Password = "", $IPPort = 25, $ssl = 0 ) Local $objEmail = ObjCreate ( "CDO.Message" ) $objEmail.From = '"' & $s_FromName & '" <' & $s_FromAddress & '>' $objEmail.To = $s_ToAddress Local $i_Error = 0 Local $i_Error_desciption = "" If $s_CcAddress <> "" Then $objEmail.Cc = $s_CcAddress If $s_BccAddress <> "" Then $objEmail.Bcc = $s_BccAddress $objEmail.Subject = $s_Subject If StringInStr ( $as_Body, "<" ) And StringInStr ( $as_Body, ">" ) Then $objEmail.HTMLBody = $as_Body Else $objEmail.Textbody = $as_Body & @CRLF EndIf If $s_AttachFiles <> "" Then Local $S_Files2Attach = StringSplit ( $s_AttachFiles, ";" ) For $x = 1 To $S_Files2Attach [ 0 ] $S_Files2Attach [ $x ] = _PathFull ( $S_Files2Attach [ $x ] ) ConsoleWrite ( '@@ Debug(62) : $S_Files2Attach = ' & $S_Files2Attach & @LF & '>Error code: ' & @error & @LF ) ;### Debug Console If FileExists ( $S_Files2Attach [ $x ] ) Then $objEmail.AddAttachment ( $S_Files2Attach [ $x ] ) Else ConsoleWrite ( '!> File not found to attach: ' & $S_Files2Attach [ $x ] & @LF ) SetError ( 1 ) Return 0 EndIf Next EndIf $objEmail.Configuration.Fields.Item ( "http://schemas.microsoft.com/cdo/configuration/sendusing" ) = 2 $objEmail.Configuration.Fields.Item ( "http://schemas.microsoft.com/cdo/configuration/smtpserver" ) = $s_SmtpServer If Number ( $IPPort ) = 0 then $IPPort = 25 $objEmail.Configuration.Fields.Item ( "http://schemas.microsoft.com/cdo/configuration/smtpserverport" ) = $IPPort ;Authenticated SMTP If $s_Username <> "" Then $objEmail.Configuration.Fields.Item ( "http://schemas.microsoft.com/cdo/configuration/smtpauthenticate" ) = 1 $objEmail.Configuration.Fields.Item ( "http://schemas.microsoft.com/cdo/configuration/sendusername" ) = $s_Username $objEmail.Configuration.Fields.Item ( "http://schemas.microsoft.com/cdo/configuration/sendpassword" ) = $s_Password EndIf If $ssl Then $objEmail.Configuration.Fields.Item ( "http://schemas.microsoft.com/cdo/configuration/smtpusessl" ) = True EndIf ;Update settings $objEmail.Configuration.Fields.Update ; Set Email Importance Switch $s_Importance Case "High" $objEmail.Fields.Item ( "urn:schemas:mailheader:Importance" ) = "High" Case "Normal" $objEmail.Fields.Item ( "urn:schemas:mailheader:Importance" ) = "Normal" Case "Low" $objEmail.Fields.Item ( "urn:schemas:mailheader:Importance" ) = "Low" EndSwitch $objEmail.Fields.Update ; Sent the Message $objEmail.Send If @error Then SetError ( 2 ) Return $oMyRet [ 1 ] EndIf $objEmail= ""EndFunc ;==>_INetSmtpMailCom; 成品下载地址

使用croc两网吧之间同步互传文件

故事背景网吧A和网吧B之间经常有这样的事情发生:网吧A更新游戏,如pubg,更新量很大,比如40G,网吧A速度很快,已经更新完成,但网吧B速度慢,到游戏开服也只更新了20G。如果把网吧A的游戏同步更新到网吧B呢?一般的做法是用U盘从网吧A拷到网吧B但网吧使用无盘服务器,需要在服务器上插U盘,风险较高!并且比较麻烦,从网吧A拷了游戏还要跑网吧B操作。如果在网吧A开通ftp,再从网吧B下载,速度不敢保证,并且还得映射端口,各种复杂的操作!普通小白做不到!其中直接同步,可以采用syncthing实现两网吧P2P文件同步,syncthing需要双方安装,总之操作不够简单!croc是使用golang 编写的工具,允许任何两台计算机简单和安全地传输文件和文件夹。据我所知,croc 是唯一的 CLI 文件传输工具。对,你没听错,只需要一个文件croc.exe,分别拷到网吧A和网吧B的游戏目录,同时运行就可以互传文件或文件夹!如果网吧A和网吧B的带宽均不高,网吧间互传文件很慢,那么你也可以从网吧A用U盘拷游戏到网吧B,从客户机使用croc和网吧B的服务器同步文件,局域网传文件相当快,比在服务器插U盘相比,中毒风险直接排除! 功能介绍  croc 的特性:允许任意两台计算机传输数据(使用一个中继)  提供端到端加密(使用 PAKE)  支持方便的跨平台传输,支持 Windows、Linux、Mac  允许多文件传输  允许恢复被中断的传输  不需要本地服务器或端口转发  通过压缩和多路复用比虫洞、rsync、scp 更快(加速 1.5x 到 4x)  支持IPv6和IPv4;  支持使用Tor之类的代理; 简单使用方法 如需发送文件,可以直接运行下列命令: 123$ croc send [file(s)-or-folder]Sending 'file-or-folder' (X MB)Code is: code-phrase 接下来,在另一台电脑上使用下列命令来进行文件或目录接收: 1$ croc code-phrase 这里的code-phrase即密码短语,用于建立密码认证密钥协议(PAKE),该协议将生成一个密钥供发送方和接收方用于端到端加密。 自定义密码短语我们可以使用下列方式来配置自己的密码短语,必须是4个字符以上:

Delphi实现类似Android锁屏的密码锁控件

手机锁屏之后,开屏的时候,要求咱们输入密码的那个滑动效果输入的控件。 Android的那个锁屏的效果,用过的人应该都知道是个什么效果,也就是横竖各3行,排列成九宫格的效果,然后由用户在上面滑动以此来达到密码输入进而进行解锁和加密的效果。那么首先,俺们可以分析一下,他的具体形成思路,实际上是很简单的,就是一个排列,然后根据滑动产生的内容形成密码来达到解密的目的,那么最主要的就是这个密码和他本身的密码是如何对应解密的,实际上很简单,咱们给他排列的九宫格,都固定好位置 1 2 34 5 67 8 9 就像这样,排列的给他的位置固定好,然后每一个格子表示一个字符或者说字符串,进而用户滑动的时候,将对应的位置序列进入到一个列表中去保存,然后鼠标放开的时候,那么入队的选择位置进行组合,那么就是对应的密码了,比如 这样的输入就是表示123,如此顺序记录,就可以形成密码了,然后用户进行滑屏录入之后和以前的进行比较就可以知道密码是否正确了,当然我这个组合是相当简单的,如果想要整的复杂,可以给每个顺序位置给定复杂的字符串,这样形成的密码就足够的复杂了!给一般人去看,也是看不明白的。 那么分析清楚了,思路也就简单了,鼠标按下的时候,开始可以滑动形成密码,鼠标按下的第一个点,作为队列的第一个,然后再滑过的就顺序的一一的记录到队列中,鼠标放开的时候,从队列中获取各个顺序位置,组合形成密码然后和原密码比对,判断密码是否正确!源码如下: 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313{ Delphi实现的类似Android鼠标锁屏效果的控件 作者:不得闲 2012-7-23}unit AndroidLockControl;interfaceuses Windows,Classes,SysUtils,Graphics,Controls;type TDxLockItem = class private r: TRect; IsEnter: Boolean; IsChecked: Boolean; Value: AnsiChar; FRadio: TPoint; public constructor Create; end; TInPutPwdEvent = procedure(Sender: TObject;InputPwd: string) of object; TDxAndroidLock = class(TGraphicControl) private FItemSpace: Integer; FRowCount: Integer; FColCount: Integer; FItemRaidio: Integer; Items: TList; FUseNum: Boolean; FPassword: string; IsDown: Boolean; LastInItem: TDxLockItem; PwdItems: TList; FOnInputPwd: TInPutPwdEvent; procedure SetItemSpace(const Value: Integer); procedure SetItemRaidio(const Value: Integer); procedure SetUseNum(const Value: Boolean); protected procedure paint;override; procedure MouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override; procedure MouseMove(Shift: TShiftState; X, Y: Integer); override; procedure MouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override; procedure CalcItemRects; public constructor Create(AOwner: TComponent);override; destructor Destroy;override; property Password: string read FPassword write FPassWord; published property ItemSpace: Integer read FItemSpace write SetItemSpace default 10; property OnInputPwd: TInPutPwdEvent read FOnInputPwd write FOnInputPwd; property ItemRaidio: Integer read FItemRaidio write SetItemRaidio default 20; property UseNum: Boolean read FUseNum write SetUseNum; end;implementationuses pngimage;{$R LockRc.RES}var PngIn,PngOut: TPngImage;{ TDxAndroidLock }procedure TDxAndroidLock.CalcItemRects;var i,j: Integer; p: TPoint; r: TRect; item: TDxLockItem;begin p.Y := FItemRaidio; for i := 1 to 3 do begin p.X := FItemRaidio; r.Left := p.X - FItemRaidio;r.Top := p.Y - FItemRaidio; r.Right := p.x + FItemRaidio;r.Bottom := p.Y + FItemRaidio; for j := 1 to 3 do begin item := Items[3*(i-1)+j - 1]; item.Value := AnsiChar(3*(i-1)+j+48); item.FRadio := p; item.r := r; p.X := p.X + FItemRaidio * 2 + FItemSpace; r.Left := p.X - FItemRaidio;r.Right := p.X + FItemRaidio; end; p.Y := p.Y + FItemRaidio * 2 + FItemSpace; end;end;constructor TDxAndroidLock.create(AOwner: TComponent);var i: Integer;begin inherited; LastInItem := nil; PwdItems := TList.Create; FPassWord := ''; Items := TList.Create; FItemSpace := 10; FRowCount := 3; FColCount := 3; FItemRaidio := 20; Width := FItemRaidio * 2 * 3 + FItemSpace * 2; Height := FItemRaidio * 2 * 3 + FItemSpace * 2; for i := 0 to 8 do begin Items.Add(TDxLockItem.Create); end; CalcItemRects;end;destructor TDxAndroidLock.Destroy;begin while Items.Count > 0 do begin TDxLockItem(Items[Items.Count - 1]).Free; Items.Delete(Items.Count - 1); end; PwdItems.Free; inherited;end;procedure TDxAndroidLock.MouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer);begin IsDown := Button = mbLeft; if IsDown then begin if LastInItem <> nil then begin LastInItem.IsChecked := IsDown; PwdItems.Add(LastInItem); end; Invalidate; end;end;procedure TDxAndroidLock.MouseMove(Shift: TShiftState; X, Y: Integer);var i: Integer; p: TPoint; OldInItem,Item: TDxLockItem;begin OldInItem := LastInItem; p := Point(x,y); LastInItem := nil; for i := 0 to items.Count - 1 do begin item := Items[i]; if PtInRect(Item.r,p) then begin LastInItem := Item; LastInItem.IsEnter := True; LastInItem.IsChecked := IsDown; Break; end; end; if LastInItem <> OldInItem then begin if OldInItem <> nil then OldInItem.IsEnter := False; if IsDown then begin if LastInItem <> nil then begin PwdItems.Add(LastInItem); end; Invalidate; end; end;end;procedure TDxAndroidLock.MouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Integer);var i: Integer; item: TDxLockItem; Np: string;begin IsDown := False; for i := 0 to items.Count - 1 do begin item := Items[i]; item.IsChecked := False; end; for i := 0 to PwdItems.Count - 1 do Np := Np + TDxLockItem(PwdItems[i]).Value; PwdItems.Clear; Invalidate; if Assigned(FOnInputPwd) then FOnInputPwd(self,Np);end;procedure DrawLineArrow(canvas: TCanvas; p1, p2: TPoint);const l = 6; //箭头长度 w = 4; //箭头宽度var slope, angle: Double; points: array[0..2] of TPoint; Xl,b: Single;begin canvas.Brush.Color := canvas.Pen.Color; canvas.Brush.Style := bsSolid; canvas.MoveTo(p1.X,p1.Y); canvas.LineTo(p2.X,p2.Y); if (p2.Y <> p1.Y) and (P2.X <> p1.X) then begin xl := (P2.Y - p1.Y) / (P2.X - p1.X); b := p2.Y - xl * p2.X; p2.X := (p2.X - p1.X) div 2 + p1.X; p2.Y := Trunc(p2.X * xl + b); end else if p2.Y = p1.Y then p2.X := (p2.X - p1.X) div 2 + p1.X else P2.Y := (p2.Y - p1.Y) div 2 + p1.Y;//画箭头 points[0] := Point(p2.x, p2.y);//箭头顶点 if (p2.x - p1.x = 0) then begin //垂直 if (p2.y - p1.y > 0) then slope := -1 else slope := 1; points[1] := Point(p2.x - w, p2.y + Trunc(l * slope)); points[2] := Point(p2.x + w, p2.y + Trunc(l * slope)); end else begin //倾斜 slope := (p2.y - p1.y) / (p2.x - p1.x); angle := ArcTan(slope); if (p2.x - p1.x > 0) then angle := angle - PI; points[1] := Point(p2.x + trunc(l * cos(angle) - w * sin(angle)), p2.y + trunc(l * sin(angle) + w * cos(angle))); points[2] := Point(p2.x + Trunc(l * cos(angle) + w * sin(angle)), p2.y + Trunc(l * sin(angle) - w * cos(angle))); end; canvas.Polygon(points);end;procedure TDxAndroidLock.paint;var i: Integer; item,item1: TDxLockItem; r: TRect;begin if not IsDown then begin for i := 0 to Items.Count - 1 do begin item := items[i]; r.Left := item.FRadio.X - 5;r.Right := item.FRadio.X + 5; r.Top := item.FRadio.Y - 5;r.Bottom := item.FRadio.Y + 5; Canvas.Draw(r.Left,r.Top,pngIn); end; end else begin //绘制指向线条 Canvas.Pen.Width := 2; Canvas.Pen.Color := clGreen; for i := 0 to PwdItems.Count - 2 do begin item := PwdItems[i]; item1 := PwdItems[i + 1]; Canvas.MoveTo(item.FRadio.X,item.FRadio.Y); Canvas.LineTo(item1.FRadio.X,item1.FRadio.Y); DrawLineArrow(Canvas,item.FRadio,item1.FRadio); end; for i := 0 to Items.Count - 1 do begin item := items[i]; if item.IsChecked then begin Canvas.Draw(item.r.Left,item.r.Top,pngOut); end; r.Left := item.FRadio.X - 5;r.Right := item.FRadio.X + 5; r.Top := item.FRadio.Y - 5;r.Bottom := item.FRadio.Y + 5; Canvas.Draw(r.Left,r.Top,pngIn); end; end;end;procedure TDxAndroidLock.SetItemRaidio(const Value: Integer);begin FItemRaidio := Value;end;procedure TDxAndroidLock.SetItemSpace(const Value: Integer);begin FItemSpace := Value;end;procedure TDxAndroidLock.SetUseNum(const Value: Boolean);begin FUseNum := Value;end;{ TDxLockItem }constructor TDxLockItem.Create;begin r := Rect(0,0,0,0); IsEnter := False;end;initialization PngIn := TPngImage.Create; PngIn.LoadFromResourceName(Hinstance,'InnerGra'); PngOut := TPngImage.Create; PngOut.LoadFromResourceName(Hinstance,'Outer');finalization PngIn.Free; PngOut.Free;end. 运行之后的效果就是转载自: https://www.cnblogs.com/DxSoft/archive/2012/07/23/2604941.html

多个局域网如何组建成一个局域网互相访问_softether的安装及使用

1af2aaa64b94522a0556bd1ec5c327926c3e53ccd8a5cce18e30a1a06212345c39a0594ac69cb5f1cd1efdccf8f8c467cb00d5665bf4b7596eee3bea313b472f73605f819af6268411d9122ba6b7631c6c3dc2b3288d760da6593fc3ab568204a1c2a685d9c713821606443c4ec7fe09e5a0afca762525fd133d75ebfc1cec126cb3355c673cfa1a780e5f0d79ffbe7845ac5b634edbea8b3255789a2228f6ea620d97584378534e4299ad0a04028479cee9636724a1f0113c8c4cc72eaa794aa31ca5c2b77e3078b297045e2910b55be686d71cf8566edf5abeeda8b26c5c0347bf6c0ecd90d18f311ed2edd963bc0d7fb79adc1da87bd419ca2b7abc12c25db43d1b59860cb53cec064e6eb60931e72f4f14ed8a0a765ca25d8229d2284074bc9556b3fd53a98926df74eee856b77f23c0e3ee43bccde4390666e5441263e5724eae7d3b4b7f140184c12e89fe18190ce2b752abe43c2469a35e5ad8506e7a99f1d2a69fb4b55a24b98391c12261e6c7406deb92827bb78a68346541f90d73efda46e6270535c935fcbd2c76f1c40b554b64f04565f78cb8a55c9f69dc291465a637971e4f95656a6c0a3181ee0316d04d315f76281fc79c7723865fd60eb70bf5184f182af89f09f42c2a4e6a3da4ee7e16b483798559e3c4a8d609038f5b1cc57b17b02f718e6e935878cbf3ec488982e5b2797a8087364539789754217147399a2aae33dac303c263b870118197d583fa1bfa944ed19ff5c66dd758a232d5da51af3c8c19420617d130680793f4988a580f14365b26b680b2d40c78dbfb6e32814ee2d8b4224a9cd773e7281dd89cfec49e33cecf0b547b34cea9135f4f09c3e66549c42f5766a1af954e32673e3f1a123efa57dc909e65e5ded61069d07f2275b5cb9222d8bd560163f40788f558c5b619c1d303c5725bfc5cf3a229932ce353d0b1f4ffce92491e291173a9929d47471260e7eae3ce64be6a645fca513c8a7d5873620fdd3ab74f9529602749ffa068ff7a1302947964d04f13e7a66fdd0e17dda486ef9bde17f0f34a05f26a2918de2b2b847c716fc4aa365ea75b67f836775e442ad03335dc011c46304d480b4f7d66afecf21b947539e6dbbaef8f5995a196dda323c1c2bfa45d2c802683dcbe1e4d1fffb7876241f9b67feca9014c1b3a8183b13dc5ed776b67c2c97d260e6c34155097692f23adecc0cde13ba9f3017c12ace5519cfb9d200f1182e8e6417b6f9f23030aee6f719f72929c6f0aad7f556cad29ef9986fc43b03376137255b7c660cd840609d435e8da6c8ca8e3192c5910b051a08bb04500be85180234b010030d59b1c9d718a571da10647bd6ca327f10df82a1fddfbdf1a485237db8d1d0d7b67b5563eb051fdc6e2ad655165fbd67a075722633d0e4d41458b5ce489cec91dab3b2ed3ba2acd0d9085241fdd9d81268afbc5b2b88e81e6b980081dc108b1759d393bc3742cfa9a6e09c1367e84c4d572b89265de8136a3daf9a8c55967466d74add7f0f39a362f98913c8afd7074da07a6934b98b5d689ab62167aa8f518fdc262dc661a0b49c0d8e7075533af52774b4cbba149008d01ff968ad5817b6499c38f6e726ae9fbbe3655ef9ae25fbc0a0eaa1df45995196275c1a69b657a9e028f5224919e67ed43ba86f77e40b1e94513b1fd31d0059915fe382d06c9fc4836cc69bcb0ec81ee634b757bd2de56d69b386448edfc8ad4b1b2675b31dd3896f5bbdd4df5baf7ac93b2adbead6a7b2e9f99d6f9c496501cafc2cafc5323ed50628e32b9ff2e7adad5c30de93e229e80e8f8fab425d0e76d333e9b0cf6d692ed3db10b79ade834bbe05b9f15e1a75d2bcd8e911a0e484ee5ba8fae2df5a4c4da537c51fbbcf4d767cbfc9b28d7ec0c27b8bc7dffd4e0486a3de69816bda7e08d4c16f5707defc7d67f7ee8f60967be3d282995a1dc9ac80c2167d648344bd4fef7191a3b7396d3be96e8bfa33b79e3149d29e3f2eb7c8288e92257204c198ca0541e578e08c5b61c5123c6d07fd6ba221972a1065c09996d90400cf1a76279e8dbdc9d7a6411ebd303371e714777ba8d7716dda16ee9148a3cc807929585dec72f5a4327f72467214fb637fd82e9877c8c100e106ba731a0937a05a6b7dd3fc431605e1bceff2d00592fa82e912680779a46b583a71b5e50fcc5c856c258e7ba8f45eb9c9cedbd45db959c1dcdc2760bdde45b5c0c7acafaafb30a0d6c624de80b4258d4eb0d9a3eeeebbbe966dbe23e9d23c1ae7499ee4e1f6676961f2e5816a1eaa1fefeef98aaee77b6592fe9d2e4eef0de3019d82bb22abededff90da990749ee279876195991dd5c2132ac6fcd943d95650a72014ba49ff554b67d15885652569162e0278254809de8f14e7e84b55d80f09b351abb454e3d71509f697929ecda17bce4df04874de1316a1a142f07fa0183e7c873577fb985a278e40b7e65fc0d3d6dc20860d50d17a69c56b34b20cfb6e48f214df582c4b4470ecc96e37fc005b138c793012d1a3d4bffce75ada3bfd0d0972d2faa7592405c92bcd5df3477c4b3612cb150d0b88e4fcece0792bdea716f848cd6d0bb587c32267f2eaba9f60172274457c6da177e8e946cc9e873f4dd6a281b4a82e2a90a301fb6bc4d7ac7f618c845b0c705203bd0766681e618c2e39d5bcf344f6d0656bc1e56572fadb50a4aceb9feb9cdba91b2d53a29a93d9a976343bfd9da9a46e768bc12c859207388ce439d98b5dbe488e0104e25844c1a61176d6c1d3d85715fdcf7815fa32097b73d728b1db818de8d14c64128367ce53f4172c4a006e6e335f7d70c1103414843d6c8c157b202b827dd9bd96d86025a95173405816ffac516614ac78399688f172a9dfad10bdf65c929805e7d67f54fb53f416b26bec9baee37798e7966140c6167e8968a0d6dd8d414f99567f9ebf33a7f2daa2cef091d389d97a11113fad0b3ad8dc0aa074a0a6f79f06b33af3638a09c8449544565f83dd733452c3258c1c3668b2b89d0328c740a570f1332db01b85d41bb1452ef947bbe85d0962e3341e9c3771d6205b446628198630092f09daf1c7a44d52c167af42e601070604d92d52c073284c21008d853559a244977fec4ab5e1fb613812a98f1491622bda05726a32ff915a4de22074fb0fbf22a0b324e16a78984eed987ab94cd9ca7493b9873b05152f47058bfc71d9839e58296e3f3fd0cdd456e32eeee26906850654d50b654cfbd1d3d8846099771dc65d8ff0e7cd804a6b55687d15a0195fc79768760b84ffacd89bd95baa4e1e218f10f19acbe27050637cf01f2d8cb635b9a4403260edbacc437af32c387a67a2a2cd772c5e7567d878ec194b1984d559854aed8b133c0bf435f2f906c3f30c9cfa84412f1c8f97ae3b770f2011b6b28662d0c4282d088dffde036a9ad2dae174727a33d21caa06e5caca1ab0346ba4ae336ca7c18b637f2ecb2236d83ebeb1b8e134d112a3da1ed51a42da9032b9805652e6db679acc56b665868378beda2f17766c7a13165283c093ec81fb9cc2f1647940a4850c466fd347f370c43c6c97bbd31483172dfa9998e76124943584603ffcb1c63d151e260a1a36f64e57bb0b5061c0762c3e360b01bd02668d37b793cfdf0413e3148533c6ee3e0120ed4d09596f57b7d94f9a2f2d0e958f7f6348898a47648e36fbacd81844a3c37581d97fec904adee4b79ad20670cad59da21fa60c7dc5cfd9215567761f3984db39bf62814db8649f5574e5b4fbc124892c86cafed6e833ee520a762629fec745d03d838b41f56d97c19da09d5594e278141015e1844b2eef4d4b1c5e2f62b241aa68e391391ebb7d91e82b3a52ec2e421734d029efc368133f4a10a2201198743276ee03a19229be581970683a9d4817f028a72c64bbd7176e9bc389303341ddb352f8fffa277077bd9e47cd818e27128fac0a57be928343490eccd0051a08797e0b57b97443dfaf466c08ef6bccc6db980a4b5926cac219ec6b30d7175f6f21cb97c1827028c10934f1dfcf2b4e2098870b30b1226d178f3e246e0d23ff5a91e294ddce262326cc55ec2b33fb0e9d22ff03f034e60fb6f771a7732ad59e8a63907af1a55492c8b55aa96892fd3c7ff7a67b4030945fdfcf2e3ad13ba0aac112272d1bab54327dee1b158e14f5d2a8195055021a2e3ed64716ca624ca4fd7c17289815c6512f421746ccc760b1f06886120c3d3d601b425b9f3aa97306e7927d73f1cbd41491813a98d0f29691997d72906a94a558d9f05acb0b4ef1b65cb002330826659536b5262a61b4bb920eeaff82d4464705a8682e92964f4782718030034de61829ad8736e2907b4376f2e33ece18dcd9e75fdedb5868afa64b840ca90f74f384335557d87a93421a6cf0fd65c755fa8195e7ec38eae344fc5ce33d6a1eeabe3d30a8969de3c3859ebfe23bf7d749eda08a028c49f6817cc7c9093c430b1c5f41bb66147fceca9dbbd93567ebd30d4eef4dbaab170ffcf942db181b496d8f0a1d0e00c658b6328e99046d503ef65caf2815a40bfd116fe8eb218febe2d6aa9f9d8be8498267325f02913d7d236667ca80b09a2ccd78bed8c061d9d4ef6d3e8610774bf403535728eaa1904570beb963788ee3f8c21fac3835b39a6a7dc6b66137d003f1b2538c0aeb74d8587676e53d125de75db5de1064c35afb1e468a480d418691435f2ad452d735101b6f93c5790a4ac98302e6727548414bdbc36cbb4a737fd5f435f26eed05779419939e4882fdbcfb2ae20f3d70247bfc32847eae5dd71cbddd0198aadecf21e5f7a72a47cd09cc289b8ab70475476af38261920f7085b3ebb4ca3ea40d71809215d5c7096f462db7de4be9fd384a5c4b6612a31c5364263ca6060840e54e3ca29a3438e8d6beef8cf5f44d9b4327a9b57f020cdc480a211d7127731ee128f11d6231758c56aa44c12fb793dead5bd0f9912908b9c0d9dcbb01d1392edb486cec36b6d2a24f2eb1a7cbe7805e0e29081071da7611ee163476c446bf1d79ef16cbbcdba2add10421ecf8bce71e5e0f43e443a4a3b0f2e7d187856fea53eb64292b990fa0d21f8cea79812071b19fd1ff70419a25037e3b63a86edf7e8e39b557842863fa31954d8d8d92a26a21b62e5247a941a9f635781638cf3bdcc2b5f6b3557471d2279dfe96c19a230de7d0eeb6dd7085ebd59d4904b20310c06103106bcfa0ba8c44ebe4fe79ffe3bd8807b556195bfdf63ebb25722ff99e47e7686d2ba82e27997b4f31cf0bbb760e8c97fd6bd8712c829fe44b5a772c4e737a73ef1bfa1446a87351a1e62259226c03b2387b66ac77a59ebbb2ce676a720b23978bc1629700d50f06687fa60d36e9da6d22d1ef3ff10d463e13eb9ee296a11450eceba00da5b31d7c871cb5a98ced52dab57fd7bb1b4eda8142b9593a37d77200df52f9e786dbb3b4cbe87f3c4ba3ee516892c3c92a23d076d02f65e2f171ea0d8b7557358533a84f03478f1eccf91163a8322f6ab9b495eebc23804e95e1027f7758eb68f9cd34b6c1be795d0b4b7d5c1a36a0f8e304af40f740c8820a41a1f9063dce2d02def17b9a68308bd1b9f281e28a06b34e1eecac7acf5a7c50caf39bcd44c3af5e242630e761ece89dc6892ee17802ad56e161f06aafeb08e3fec5030212357d2b5e5ef2ebc36efa9801f5eb19036dbf7a8b5fb911ada0391e41e65c22218eeaf27bd4b783c935d4d2b1699df5ba0bf5ff2a4d792b57b0f0980a37bb37ca0d1fd37c3c7dab30d2ca1994943b2c7a2820adad706693e4791ac0cd500ddf55235c47dd21d6bb60eb557fc21e82fd0b5f635fbda00dc11dd430af293f124452a5f6f1f394e0b6c9c50c935bff6c91da6d3df8d15ac044f71c560a363da8157b1f06b2c26240cd65b1cff50b3a6545fbd59b37d8268c0777534705c29215cf262ddf4a37bad2ccd5fe715be78f34c6126b1e2468827fc2c1a74b113a751f96cd8107f143d514aeb81aa7f54a72ceba9a328afe2f054b2c7100813dbd7865e538cf5074bc3db2f530b5d0d97af080ee1c43186359ef78757f5bea7a5201357a5da09f3aba6cb8330fa6ad4cb6838530ae5aa3df4595c7fa1d0e5d425edf69153815f93a1ab4ad3ddc558c2139cb47585c4824ca4fd5e4f4b396eb4597dce2a5d80bfffef89b7a6524c120d9a433424400d4fa8990f4b4a1a3f09934adb80567b9cf181e83b2080f86c67907e335324d43f51d97e02955e92488f93086edbbb9ef98254fddb9830bbb4f099aa39de590d7c9a9372a4df7989963a38164ff920703f2ba5d142dea9a9041fd066e86a7e65405bc0c7345b3e22edb2854e3c31e4622e2d60baa1bdf19ff072ac279804240458977aa076cb1348c87e2406c12e18da65c12e74dc9396c289c341197181f986c3c089920ee767f6e3638c4c680cbca71c5af1947a7eb385120dccf568cb7bf7a984cf63aa4defd4ac3e850241598ce2b1dad30495d296b7db732cf88b4e2a59be02e36385a97fcbdb6d422b97cd55f82c7a9c285b2212b617939e49ccb5f39d7fe1e220ce4213c7a3a4ade4387e44e6b076ba14e3fcb9ac0cab36c34e99bd97fdd5e5d5659ce056f91f71eb7436d6aa5ec0779d1691f53a61d977da835209b699836f61669eeb33788dda4af3592b406e5b885c178c2769c45d9dc87cfa34e277b659952c1da75dad3a0ff6d912d7dc074a66ef9b9b3161c4cca0c5971e0be41d800c7b314e3c363a293fc71eced3f8f9d43b18b6d6ad7588368fd79f88a1ff77ae619b4ce37f051ecd22637f9557edf5f10bdf2ad33f3c1712a20715b2bb5be04195cc6a7311ad888b975809d20fe98aca88a23cd38be4aea88ae04d912ed426da83c90941862523ea7ab565cc61627f648b57964c56d162a8ef32bee955198ea8476d25273a6a9b3ccf67b088c006e007b8a896629a3a81097f0521a0feef2e22c04372e22bd9c86490b073c6cc5a49c7215828aa480aacd2c0ca07a459eabc8514dcebfe05c5c2a6e8dc7e21e540cef55c3800a217f2faf12caa615f96fc24949e70f41702f90122f91a8a7da3a0f1d4bff7dadaff9f9c66f9ba3d1b970212c214099dd00647cf4539759d540c9a15a534c39c6d1b55c147eac41e5b6962ec866815f36e60749e1fb4197d15a39bf3b1a676863bffebd06a5a31a91fa71a90c86c3a26b4892edfdf5952fb344677e30f2b3f26994dde5b819a5a52e4df435df37a2858394452c19230a3ae6577a76c5aa00904bf78d8c427935050234d8ea1208d0dcdb59b676e982c6a8919cdac76dcaadb5d5de54b4e3f0519786974816ea25c48e256f9d9713a60079fbcfaf8367528d209c8dc73a076af693b2476c02acb2bfdfa563132b97e9dbf72b6d87da445d20007ad8f112d57cc4b13447ba9baf41a4cda397fa167a1788ec103b4ef014e555b4e7fc008a212fccaf24f6c54a6a5b211b8a40d2fc87bb08adc9eefff1e87bb240864e99e685cdf10393ae01cb3ea34cce58cb2fb3f04a742b9aac854c08879212c55c2f9e3041725f921c1e5016ba32c493cfdb0914dc6e2427c9331953178dc03c9b4ec16ab9bffdddd436bdc0fb65c8f9f391ad33a4381cd4b379a10c85eaf49fd1b5d38427273971a1749cd6976eaa00c50c4db83761089b8d30deb8a97375f39cc9f739eeca7380ae41adac7046c3fc3d53d8461c609c4e8dbc53c0df90ba0366b72ba2fa0f4030d7710c6d242f6012e4d6f6bcfce43aa2fe2064f928b27ba2b0875fa924b98b5f6261867d2ffc06b1a58508183a1e4f0fb56d45baaa4fd65bdca6bade63a692a9c1ed39b4ecbfcf31027da5ac7afcdd4461ac4084c81ab72f4edd150c6a3b33932590c7321f3926a5aac81e73f76d1bddc550082626e114d79ce768b37b0c4eafd6b8e20c51508d43212d1aed1ae8d28168b499d51d364e550000575a756bf8650136f8b07bda5bb040d78b60bd7e7e823fad0b0b0cff5fcaa2520b0334f48bd0b6e9d62b0f90b8bc68795fbfb99a97ccaabc51f36bf2b90c513b4a55d883bef12ba44bfc17431e9abde52afd2cf30e9a4f098d39d85d5632592b690324f8e257f59e880b687cb7782bc7aabd3fa038becdc6af066f56985f427d87ba539696e558ad99aecad76bfbf35df4271e9c4ef01bdab8fbdc0200ff9523795627310c89898e80af964d3c47acfa033a3579b4b550170eed3605fc13c3229d3aa04fedf360bf5e60456adc5b2af1043a65615a7ad4268d9342de95762017b7341da38f8983abe731332a737917893d3290fb362b1f5634d2fa4725281ad06341a3a93fa8c5e736e66a5fed01454301a96c335fac3e648a9d8b1e58a750e4191c83dfe4f0972f43564493620143f088d72c1abc6434ee26bf8ec8ed1c0234627047dccb399bcf2e4a378a831067689f2436778512f3c10bda7be51c3d4a486efda20e2554589e3054822ccf8fc141ff1d10df36cd390287963424c47daa5fc7971b257cbce3b0a781ba1d5c91dd89c3ce926ec01f23131f91af0a4e2ab7ef4f461b501ea128565b7867ce7d1909f67c9fcc95dd690ffcbc1fb99546285f2d9249498203fe14d52a0f4c57af41194e98ec60d02cfe8dea508da0741b5f0441880a6d51191a23ae2357874721781c592b2957434bcee304d125dc241c90d9ef25410c782a686a83f2d3a7d8d303f30ac08e265098678846ee6faa2c74c2e9cafbcf850eda106d2648e7690d06f0d5c406f725f1df8cfa5d43bfe2b3a3fe5f2f8d9aa37555af66a09e81847e5c564b2ae07a15a229bd68522c31e15e178cb47469e7f7e0ed8fe1ff24dbcfb1977f12a618fdee7a1c1db4f868e5508f4ec0bd91a246c2bbb3a0de596da98d348d02abea4e98e23c15cad8602872370c3548d7fbe1362af6b874f3a392622b87d7d192513135ffa6fa521034a093ddb7d1ea94bbfa6d09798b49a7abd6751afdf29443d019fb65cb963547a6d231a58f67bf9b45834c24c54eb94313dc803fbcfe27c746e0f6d26e5753cb1dd8352ea211f3008e8244f326cad6411a69df58bef7f5d63cbcf51595da6434a55bd06bd919c4b053b8172cdb80a310e0f8a4f1d7a2b2f1af8f37407152198e6e822b4fe2d963c32d7f2ed6c505fb2d7270842a54fe2491638f2049a06224fd79184e084e9b07fe8a2677328c50f625d2375a29d21d67f98c125e5776109b40a71d0849352f6569c48c159459d0b428ee66f403185b5c9dbdfff77f269cb99401a0323c697628fc8afe808a9fd5010b8646af89b8c0f210965923b94706fded156a2aabd2b359378b96754fbfb44cf5eef66ddc5afe34c848fc35d97ee1cafb19c96a1d405b6917b4f878ad0375e9a675ddd4367dc5dd8e14e7378186ca244e02a3635e2cc58b0bcdd4758796b3e628d77dbef68b701056040321214682251255bc9593672ff2e7d56b2193a771373aa74f32161fa07e78a63a97d827449a8a7ca468e8180f2faa937aa554c49d468a8afef660a094a0d27d8d8f7b63278889ff04d6f011d0983c5c2fc638d5824025e85fcfd585618e616e83cbd5e06298ea7a4186e14ce9b0526dd3958e250bb9cb1d3c158541f7c11e77de71f780496d51dd2c80e7cd9ff607b4db4434c77cff79d7498787816f98831ab480447320f3b51d7064b8d04e5be8e7ff438c512c347b4096b7fe6f8201d61ba224867fc9cea3454b6a9d2bb3db796fa6379d27d3292e09bbf10019c5d224dc3d9910261e477e371ef85cdf27cb5dcdefd516426ab7f3aab281aca444b98e194 输入密码查看内容

实现进程被结束就蓝屏的函数

1. 保护进程,结束就蓝屏RtlSetProcessIsCritical函数可以启用或关闭开启之后变得和系统进程一样被杀系统直接蓝屏系统进程也是此函数实现的上图可以用于进程保护设置自己为保护进程,这样结束掉就会蓝屏,蓝屏信息翻译就是 重点保护进程。 设置为保护进程:RtlSetProcessIsCritical(True,Null(或Nothing),False) 取消(关闭时记得加上去。):RtlSetProcessIsCritical(False,Null,False)把进程做crss中止就蓝屏,防止进程被杀这是最不占用CPU的方式了 以下为C代码 1234567891011121314151617181920212223#include<stdio.h>#include<Windows.h>typedef (NTAPI*Rtl)(ULONG,BOOL,BOOL,PBOOL);typedef (NTAPI*PT1)(BOOL, PBOOLEAN, BOOL);typedef (NTAPI*PT2)(BOOL,PBOOLEAN,BOOL);void Protect(){ BOOL B; ULONG SE_DEBUG_PRIVILEGE = 20; Rtl RtlAdjustPrivilege=(Rtl)GetProcAddress(GetModuleHandleW(L"ntdll"),"RtlAdjustPrivilege"); PT1 RtlSetProcessIsCritical=(PT1)GetProcAddress(GetModuleHandleW(L"ntdll"), "RtlSetProcessIsCritical"); PT2 RtlSetThreadIsCritical=(PT2)GetProcAddress(GetModuleHandleW(L"ntdll"), "RtlSetThreadIsCritical"); RtlAdjustPrivilege(SE_DEBUG_PRIVILEGE,TRUE,FALSE,&B); RtlSetProcessIsCritical(TRUE,NULL,FALSE); RtlSetThreadIsCritical(TRUE, NULL, FALSE); //BY 1361784102}void main(){ Protect(); getchar(); //BY 1361784102} vb代码如下: 12345678910Option ExplicitPublic Declare Function RtlAdjustPrivilege Lib "ntdll.dll" (ByVal Privilege As Long, ByVal Enable As Boolean, ByVal Client As Boolean, WasEnabled As Long) As LongPublic Declare Function RtlSetProcessIsCritical Lib "ntdll" (Optional ByVal NewValue As Boolean, Optional ByVal Value As Boolean, Optional ByVal WinLogon As Boolean = True)Sub Main() RtlAdjustPrivilege 20, True, False, 0 RtlSetProcessIsCritical False, False, True EndEnd Sub 2. RtlAdjustPrivilege提权后NtRaiseHardError制造系统蓝屏VB代码如下:

可实现维护通道的vbs脚本类

前言闲来无事,为了方便,用vbs写了一个类! 别瞧不上vbs脚本语言,其实当你学习的语言越多,发现所有编程语言都是那么一回事,最终的目的都是完成某项功能,vbs的 好处就是可以使用系统的计事本直接编辑,不需要任何语言安装环境,python开源库是多,但却必须安装python的语言环境, c++等语言生成的程序功能是可以足够强大,但要立即增加修改功能却很麻烦(因为需要安装编程环境)! vbs特别适合拿来即用,代码不对随时可以修改!就好比批处理虽然功能不强,windows却一直保留到现在!也许windows的激活 slmgr.vbs和office的激活ospp.vbs一直保留到现在的原因可能就是说明vbs还是有存在的道理的!如果你仔细看了这个vbs自定义 类,你就会发现vbs也可以实现很多功能!比如这个vbs类中的中止线程函数,所有语言实现,都是取得线程ID,然后发送中止线 程的消息,其实此自定义类就用了三句代码,这就是其他软件中的根据窗口关闭网吧广告的功能,也可以中止那些在任务管理器 中无法结束的进程! 介绍vbs常用函数代码,包括一些特色函数,杀毒软件可能会报毒,使用notepad++等软件可直接查看源代码,未进行任何加密 最大的特色,可以让vbs使用windows api函数,api能办到的功能,vbs也能做到! 自定义vbs类的函数,见demo\demo.vbs文件 软件架构lib目录的MyVbsClass.vbs和dynwrapx.dll为核心文件,即vbs自定义类 demo为示例代码, 维护通道是使用vbs自定义类写的网吧开机维护通道 虽然是明文方式写的vbs脚本,一样能实现如深蓝维护通道等类软件中的绝大部份功能,一样可以关闭网吧的广告及广告窗口! 安装教程

让电源键关机变重启

让电源键关机变重启 使用说明 注意:需要关闭无盘的闪电关机,开启闪电关机,本软件无效! 功能:运行本工具,按电源键,或系统中点关机,会执行重启!总之就是不关机,关机就是重启,关机直接重启,关机会重启,说三遍! 适用范围:息屏挖矿,按电源键会关机,本软件作用就显现了!机器正在挖矿,显示器黑屏,总有顾客以为机器是关了的,去按电源键开机,这时机器就会关机。顾客就会以为这台机器有问题,明明按了开关键,结果机器没开起,有些会立马换一台机器,重复上面的操作。使用了本软件,按了电源键不会关机,直接变成重启,顾客不会置疑了,呼叫网管的次数少了! 下载地址

八圈9.5版关闭侧边栏工具-怎样关闭8圈侧边栏

如果说8圈智能场所管理平台等,提高了网吧运营管理的效率,让整个管理流程更加便捷;那么8圈机器人,就是让整个运营管理更加智能化,降低人为因素造成的失误,在原有的基础上提高运营管理的准确性、安全性。 据李金平介绍,8圈机器人能够轻松解决困扰网吧业主的收银员不负责,收银员成本高,招聘难,员工不稳定,财务统计困难,身份证冒用现象频发等系列问题。 不仅如此,8圈机器人优势明显: 设置简单、操作方便,无需专人指导一点就会;全天候24小时工作,节省人工成本开支提高竞争力;在财务管理上,自助收银,机器人收入按班次自动汇总,当班收入掌上8圈随时可查,更安全;AI人脸识别,杜绝人证不一致。 临时卡开卡及充值 临时卡办理会员 会员卡开卡及充值 结帐下机 9.5版去侧边栏下载地址: 点击开始下载

显示器亮度,对比度,色温缩放调节,笔记本亮度调节AUTOIT源码

通过调用dxva2.dll文件,修改显示器的设置,和按显示器上的物理按钮效果一样,有效的解决显示器上按钮不好设置,按钮功能不明的问题,有些显示器不支持,如果你使用的无效果,说明你显示器不支持此调节功能!下载地址:源码 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407#include <WinAPI.au3>#include <WinAPIFiles.au3>#include <WinAPIGdi.au3>#include <GUIConstantsEx.au3>#include <GuiSlider.au3>#include <Array.au3>Opt("GUIOnEventMode", 1)$g_szVersion = "RU1Y2-D59U9"If WinExists($g_szVersion) Then ExitAutoItWinSetTitle($g_szVersion)Global Const $Dxva2 = DllOpen("Dxva2.dll")If @error Then Exit 1Global Const $tagSTRUCT = "HANDLE hPhysicalMonitor;WCHAR szPhysicalMonitorDescription[128];"Global Const $tag_MC_TIMING_REPORT = "BYTE bTimingStatusByte; DWORD dwHorizontalFrequencyInHZ; DWORD dwVerticalFrequencyInHZ"Global Const $tag_DISPLAY_BRIGHTNESS = "byte ucDisplayPolicy; byte ucACBrightness; byte ucDCBrightness"Global Const $IOCTL_VIDEO_QUERY_SUPPORTED_BRIGHTNESS = _WinAPI_IOCTL($FILE_DEVICE_VIDEO, 0x125, $METHOD_BUFFERED, $FILE_ANY_ACCESS)Global Const $IOCTL_VIDEO_QUERY_DISPLAY_BRIGHTNESS = _WinAPI_IOCTL($FILE_DEVICE_VIDEO, 0x126, $METHOD_BUFFERED, $FILE_ANY_ACCESS)Global Const $IOCTL_VIDEO_SET_DISPLAY_BRIGHTNESS = _WinAPI_IOCTL($FILE_DEVICE_VIDEO, 0x127, $METHOD_BUFFERED, $FILE_ANY_ACCESS)Global $idSlider1, $idSlider2, $idButton1, $idButton2, $idLabel1, $idLabel2Global $hMonitor, $brightness, $contrast, $switch1, $switch2, $VCPReplyGlobal $idLabel3, $idSlider3, $hDevice, $BRIGHTNESS_LCD_Array$hDevice = LCD()If Not @error Then LCD_Set($hDevice) If $hDevice Then _WinAPI_CloseHandle($hDevice) DllClose($Dxva2) ExitEndIf$hMonitor = _WinAPI_MonitorFromWindow(_WinAPI_GetDesktopWindow(), $MONITOR_DEFAULTTOPRIMARY) ;返回主显示器句柄$hMonitor = _GetPhysicalMonitorsFromHMONITOR($hMonitor) ;获取物理显示器句柄$StringLength = CapabilitiesRequestAndCapabilitiesReply($hMonitor)$Gui = GUICreate("显示器设置", 262, 220, -1, -1)GUISetOnEvent($GUI_EVENT_CLOSE, "_exit")$idSlider1 = GUICtrlCreateSlider(10, 30, 240, 20, BitOR($TBS_TOOLTIPS, $TBS_AUTOTICKS))GUICtrlSetOnEvent($idSlider1, "Brightness")GUICtrlSetLimit($idSlider1, 100)$idSlider2 = GUICtrlCreateSlider(10, 82, 240, 20, BitOR($TBS_TOOLTIPS, $TBS_AUTOTICKS))GUICtrlSetOnEvent($idSlider2, "Contrast")GUICtrlSetLimit($idSlider2, 100)$idButton1 = GUICtrlCreateButton("宽屏切换", 16, 160, 85, 25)GUICtrlSetOnEvent($idButton1, "Button1")$idButton2 = GUICtrlCreateButton("恢复默认", 158, 160, 85, 25)GUICtrlSetOnEvent($idButton2, "Button2")$idLabel1 = GUICtrlCreateLabel(" 亮度调节:不可用", 10, 10, 140, 20)$idLabel2 = GUICtrlCreateLabel("对比度调节:不可用", 10, 60, 140, 20)$Combo1 = GUICtrlCreateCombo("", 102, 120, 100, 25, 0x0003)GUICtrlSetOnEvent($Combo1, "Color")GUICtrlCreateLabel("色温调节", 32, 124, 48, 20)_GUICtrlSlider_SetTipSide($idSlider1, $TBTS_TOP)_GUICtrlSlider_SetTipSide($idSlider2, $TBTS_TOP)If $StringLength <> "" Then $VCP_Array = Manage_vcp($StringLength) $VCPReply = _GetVCPFeatureAndVCPFeatureReply($hMonitor, 0x86) If $VCPReply[0] = 0 Then GUICtrlSetState($idButton1, $GUI_DISABLE) $brightness = _GetMonitorBrightness($hMonitor) ;获取监视器亮度 ConsoleWrite($brightness[1] & @CRLF) $contrast = _GetMonitorContrast($hMonitor) ;获取监视器对比度 If $brightness[2] <> 0 Then $switch1 = True If $contrast[2] <> 0 Then $switch2 = True If $switch1 Then GUICtrlSetData($idSlider1, $brightness[1]) GUICtrlSetData($idLabel1, "设置亮度:" & $brightness[1]) EndIf If $switch2 Then GUICtrlSetData($idSlider2, $contrast[1]) GUICtrlSetData($idLabel2, "设置对比度:" & $contrast[1]) EndIf For $i = 0 To UBound($VCP_Array) - 1 If $VCP_Array[$i][0] = "14" Then If $VCP_Array[$i][1] <> "" Then $Color_Array = StringSplit($VCP_Array[$i][1], " ", 2) $Color_String = "" For $S = 0 To UBound($Color_Array) - 1 $temp = Select_Color($Color_Array[$S]) If $temp <> "" Then $Color_String &= $temp & "|" Next EndIf ExitLoop EndIf Next If $Color_String <> "" Then $VCPCode = _GetVCPFeatureAndVCPFeatureReply($hMonitor, 0x14) GUICtrlSetData($Combo1, $Color_String, Select_Color($VCPCode[1] - 1)) Else GUICtrlSetData($Combo1, "不支持", "不支持") GUICtrlSetState($Combo1, $GUI_DISABLE) EndIf GUISetState(@SW_SHOW, $Gui)Else WinSetTitle($Gui, "", "未发现DDC/CI") GUICtrlSetData($Combo1, "不支持", "不支持") GUICtrlSetState($idSlider1, $GUI_DISABLE) GUICtrlSetState($idSlider2, $GUI_DISABLE) GUICtrlSetState($idButton1, $GUI_DISABLE) GUICtrlSetState($Combo1, $GUI_DISABLE) GUISetState(@SW_SHOW, $Gui)EndIfWhile 1 Sleep(50)WEndFunc LCD() Local $iDevice $iDevice = _WinAPI_CreateFileEx("\\.\LCD", $OPEN_EXISTING, $GENERIC_READ + $GENERIC_WRITE, $FILE_ANY_ACCESS, 0) Return (@error) ? (SetError(1, _WinAPI_GetLastErrorMessage(), False)) : ($iDevice)EndFunc ;==>LCDFunc LCD_Set($iDevice) Local $brightness = DllStructCreate("BYTE[256]") Local $DISPLAY_BRIGHTNESS = DllStructCreate("BYTE[3]") $success = _WinAPI_DeviceIoControl($iDevice, $IOCTL_VIDEO_QUERY_SUPPORTED_BRIGHTNESS, Null, 0, DllStructGetPtr($brightness), 0xff) If $success = False Then Return $BRIGHTNESS_LCD_Array = Brightness_lcd(DllStructGetData($brightness, 1)) $success = _WinAPI_DeviceIoControl($iDevice, $IOCTL_VIDEO_QUERY_DISPLAY_BRIGHTNESS, Null, 0, DllStructGetPtr($DISPLAY_BRIGHTNESS), 0x03) If $success = False Then Return $DISPLAY_BRIGHTNESS_READ = Int(BinaryMid(DllStructGetData($DISPLAY_BRIGHTNESS, 1), 3, 1)) $Gui = GUICreate("内置LCD显示器", 262, 80, -1, -1) GUISetOnEvent($GUI_EVENT_CLOSE, "_exit") $idSlider3 = GUICtrlCreateSlider(10, 30, 240, 20, BitOR($TBS_TOOLTIPS, $TBS_AUTOTICKS)) GUICtrlSetLimit($idSlider3, 100) $idLabel3 = GUICtrlCreateLabel(" 亮度调节:", 10, 10, 140, 20) GUICtrlSetData($idSlider3, $DISPLAY_BRIGHTNESS_READ) GUICtrlSetData($idLabel3, "设置亮度:" & $DISPLAY_BRIGHTNESS_READ) GUICtrlSetOnEvent($idSlider3, "Brightness_set_lcd") GUISetState(@SW_SHOW, $Gui) WinSetTitle($Gui, "", "内置LCD显示器") While 1 Sleep(50) WEndEndFunc ;==>LCD_SetFunc Brightness_set_lcd() Local $lcd_BRIGHTNESS, $DISPLAY_BRIGHTNESS, $success $lcd_BRIGHTNESS = GUICtrlRead($idSlider3) GUICtrlSetData($idLabel3, "设置亮度:" & $lcd_BRIGHTNESS) For $i = 0 To UBound($BRIGHTNESS_LCD_Array) If $lcd_BRIGHTNESS <= $BRIGHTNESS_LCD_Array[$i] Then $DISPLAY_BRIGHTNESS = DllStructCreate($tag_DISPLAY_BRIGHTNESS) DllStructSetData($DISPLAY_BRIGHTNESS, "ucDisplayPolicy", 3) DllStructSetData($DISPLAY_BRIGHTNESS, "ucACBrightness", $BRIGHTNESS_LCD_Array[$i]) DllStructSetData($DISPLAY_BRIGHTNESS, "ucDCBrightness", $BRIGHTNESS_LCD_Array[$i]) $success = _WinAPI_DeviceIoControl($hDevice, $IOCTL_VIDEO_SET_DISPLAY_BRIGHTNESS, DllStructGetPtr($DISPLAY_BRIGHTNESS), DllStructGetSize($DISPLAY_BRIGHTNESS), Null, 0) If $success = False Then Return ExitLoop EndIf NextEndFunc ;==>Brightness_set_lcdFunc Select_Color($iValue) Local $String If StringIsXDigit($iValue) Then $iValue = Dec($iValue) Switch $iValue Case 1 $String = "sRGB" Case 2 $String = "原生显示" Case 3 $String = "4000K" Case 4 $String = "5000K" Case 5 $String = "6500K" Case 6 $String = "7500K" Case 7 $String = "8200K" Case 8 $String = "9300K" Case 9 $String = "10000K" Case 10 $String = "11500K" Case 11 $String = "User1" Case 12 $String = "User2" Case 13 $String = "User3" Case Else EndSwitch Return $StringEndFunc ;==>Select_ColorFunc Color() Local $iValue = GUICtrlRead($Combo1) Select Case $iValue = "sRGB" _SetVCPFeature($hMonitor, 0x14, 0x01) Case $iValue = "原生显示" _SetVCPFeature($hMonitor, 0x14, 0x02) Case $iValue = "4000K" _SetVCPFeature($hMonitor, 0x14, 0x03) Case $iValue = "5000K" _SetVCPFeature($hMonitor, 0x14, 0x04) Case $iValue = "6500K" _SetVCPFeature($hMonitor, 0x14, 0x05) Case $iValue = "7500K" _SetVCPFeature($hMonitor, 0x14, 0x06) Case $iValue = "8200K" _SetVCPFeature($hMonitor, 0x14, 0x07) Case $iValue = "9300K" _SetVCPFeature($hMonitor, 0x14, 0x08) Case $iValue = "10000K" _SetVCPFeature($hMonitor, 0x14, 0x09) Case $iValue = "11500K" _SetVCPFeature($hMonitor, 0x14, 0x0a) Case $iValue = "User1" _SetVCPFeature($hMonitor, 0x14, 0x0b) Case $iValue = "User2" _SetVCPFeature($hMonitor, 0x14, 0x0c) Case $iValue = "User3" _SetVCPFeature($hMonitor, 0x14, 0x0d) Case Else EndSelectEndFunc ;==>ColorFunc Button1() Local $VCPCode If $switch1 And $switch2 Then $VCPCode = _GetVCPFeatureAndVCPFeatureReply($hMonitor, 0x86) ConsoleWrite($VCPCode[1] & @CRLF) If $VCPCode[1] = 8 Then _SetVCPFeature($hMonitor, 0x86, 0x02) GUICtrlSetData($idButton1, "窄屏") Else _SetVCPFeature($hMonitor, 0x86, 0x08) GUICtrlSetData($idButton1, "宽屏") EndIf EndIfEndFunc ;==>Button1Func Button2() GUICtrlSetData($idButton2, "Reset..") Sleep(250) GUISetState(@SW_HIDE) If $switch1 Or $switch2 Then _RestoreMonitorFactoryDefaults($hMonitor) Sleep(1000) EndIf _DestroyPhysicalMonitor($hMonitor) ;关闭监视器句柄 DllClose($Dxva2) ExitEndFunc ;==>Button2Func Brightness() If Not $switch1 Then Return GUICtrlSetData($idLabel1, "设置亮度:" & GUICtrlRead($idSlider1)) _SetMonitorBrightness($hMonitor, GUICtrlRead($idSlider1))EndFunc ;==>BrightnessFunc Contrast() If Not $switch2 Then Return GUICtrlSetData($idLabel2, "设置对比度:" & GUICtrlRead($idSlider2)) _SetMonitorContrast($hMonitor, GUICtrlRead($idSlider2))EndFunc ;==>ContrastFunc _GetMonitorBrightness(Const $h_monitor) Local Const $MinimumBrightness = DllStructCreate("dword_ptr") Local Const $CurrentBrightness = DllStructCreate("dword_ptr") Local Const $MaximumBrightness = DllStructCreate("dword_ptr") DllCall($Dxva2, "bool", "GetMonitorBrightness", _ "handle", $h_monitor, _ "ptr", DllStructGetPtr($MinimumBrightness), _ "ptr", DllStructGetPtr($CurrentBrightness), _ "ptr", DllStructGetPtr($MaximumBrightness)) If @error Then Return SetError(1, _WinAPI_GetLastErrorMessage(), False) Local Const $brightness[3] = [DllStructGetData($MinimumBrightness, 1), _ DllStructGetData($CurrentBrightness, 1), _ DllStructGetData($MaximumBrightness, 1)] Return $brightnessEndFunc ;==>_GetMonitorBrightnessFunc _GetMonitorContrast(Const $h_monitor) Local Const $MinimumContrast = DllStructCreate("dword_ptr") Local Const $CurrentContrast = DllStructCreate("dword_ptr") Local Const $MaximumContrast = DllStructCreate("dword_ptr") DllCall($Dxva2, "bool", "GetMonitorContrast", _ "handle", $h_monitor, _ "ptr", DllStructGetPtr($MinimumContrast), _ "ptr", DllStructGetPtr($CurrentContrast), _ "ptr", DllStructGetPtr($MaximumContrast)) If @error Then Return SetError(1, _WinAPI_GetLastErrorMessage(), False) Local Const $contrast[3] = [DllStructGetData($MinimumContrast, 1), _ DllStructGetData($CurrentContrast, 1), _ DllStructGetData($MaximumContrast, 1)] Return $contrastEndFunc ;==>_GetMonitorContrastFunc _SetMonitorBrightness(Const $h_monitor, Const $NewBrightness) DllCall($Dxva2, "bool", "SetMonitorBrightness", "ptr", $h_monitor, "dword", $NewBrightness) Return (@error ? SetError(1, _WinAPI_GetLastErrorMessage(), False) : True)EndFunc ;==>_SetMonitorBrightnessFunc _SetMonitorContrast(Const $h_monitor, Const $contrast) DllCall($Dxva2, "bool", "SetMonitorContrast", "ptr", $h_monitor, "dword", $contrast) Return (@error ? SetError(1, _WinAPI_GetLastErrorMessage(), False) : True)EndFunc ;==>_SetMonitorContrastFunc _GetPhysicalMonitorsFromHMONITOR(Const $pMonitor) Local $Number = DllStructCreate("DWORD") Local $i, $tagPhysical, $M = 1 $Ret = DllCall($Dxva2, "bool", "GetNumberOfPhysicalMonitorsFromHMONITOR", _ "handle", $pMonitor, _ "ptr", DllStructGetPtr($Number)) $NumberOfMonitors = DllStructGetData($Number, 1) For $i = 1 To $NumberOfMonitors $tagPhysical &= $tagSTRUCT Next $MonitorArray = DllStructCreate($tagSTRUCT) $Ret = DllCall($Dxva2, "bool", "GetPhysicalMonitorsFromHMONITOR", _ "handle", $pMonitor, _ "DWORD", $NumberOfMonitors, _ "ptr", DllStructGetPtr($MonitorArray)) Return DllStructGetData($MonitorArray, 1) ;返回第一个显示器句柄EndFunc ;==>_GetPhysicalMonitorsFromHMONITORFunc CapabilitiesRequestAndCapabilitiesReply(Const $h_monitor) Local Const $tagStringLength = DllStructCreate("dword_ptr") DllCall($Dxva2, "bool", "GetCapabilitiesStringLength", "handle", $h_monitor, "ptr", DllStructGetPtr($tagStringLength)) Local Const $CapabilitiesStringLength = DllStructGetData($tagStringLength, 1) Local Const $CapabilitiesString = DllStructCreate("char[" & $CapabilitiesStringLength & ']') DllCall($Dxva2, "bool", "CapabilitiesRequestAndCapabilitiesReply", _ "handle", $h_monitor, _ "ptr", DllStructGetPtr($CapabilitiesString), _ "dword", DllStructGetSize($CapabilitiesString)) Return (@error) ? (SetError(1, _WinAPI_GetLastErrorMessage(), False)) : (DllStructGetData($CapabilitiesString, 1))EndFunc ;==>CapabilitiesRequestAndCapabilitiesReplyFunc _RestoreMonitorFactoryDefaults(Const $h_monitor) DllCall($Dxva2, "bool", "RestoreMonitorFactoryDefaults", "ptr", $h_monitor) Return (@error) ? (SetError(1, _WinAPI_GetLastErrorMessage(), False)) : (True)EndFunc ;==>_RestoreMonitorFactoryDefaultsFunc _SetVCPFeature(Const $h_monitor, Const $VCPCode, Const $NewValue) DllCall($Dxva2, "bool", "SetVCPFeature", _ "handle", $h_monitor, _ "byte", $VCPCode, _ "dword", $NewValue) Return (@error) ? (SetError(1, _WinAPI_GetLastErrorMessage(), False)) : (True)EndFunc ;==>_SetVCPFeatureFunc _GetVCPFeatureAndVCPFeatureReply(Const $h_monitor, Const $VCPCode) Local Const $CurrentValue = DllStructCreate("dword_ptr") Local Const $MaximumValue = DllStructCreate("dword_ptr") Local Const $VCPCodeType = DllStructCreate("dword_ptr") DllCall($Dxva2, "bool", "GetVCPFeatureAndVCPFeatureReply", _ "handle", $h_monitor, _ "byte", $VCPCode, _ "ptr", DllStructGetPtr($VCPCodeType), _ "ptr", DllStructGetPtr($CurrentValue), _ "ptr", DllStructGetPtr($MaximumValue)) If @error Then Return SetError(1, _WinAPI_GetLastErrorMessage(), False) Local Const $VCPFeatureReply[3] = [DllStructGetData($VCPCodeType, 1), DllStructGetData($CurrentValue, 1), DllStructGetData($MaximumValue, 1)] Return $VCPFeatureReplyEndFunc ;==>_GetVCPFeatureAndVCPFeatureReplyFunc Manage_vcp(Const $String) Local $Exp, $i, $tmp, $OUT_String $Exp = StringRegExp($String, "(?<=vcp\()([A-Za-z0-9]{2}[\)\(]?\s?)*(?=\))", 2) If @error Then Return $Exp = StringRegExp($Exp[0], "([0-9A-Fa-f]{2})(\(.+?\))?", 4) If @error Then Return Local $Array[UBound($Exp)][2] For $i = 0 To UBound($Exp) - 1 $tmp = $Exp[$i] $Array[$i][0] = StringStripWS(StringLeft($tmp[0], 2), 8) $OUT_String = StringStripWS(StringTrimLeft($tmp[0], 2), 3) If $OUT_String <> "" Then $OUT_String = StringTrimLeft(StringTrimRight($OUT_String, 1), 1) $Array[$i][1] = $OUT_String EndIf Next Return $ArrayEndFunc ;==>Manage_vcpFunc _DestroyPhysicalMonitor(Const $h_monitor) DllCall($Dxva2, "bool", "DestroyPhysicalMonitor", "ptr", $h_monitor) Return (@error) ? (SetError(1, _WinAPI_GetLastErrorMessage(), False)) : (True)EndFunc ;==>_DestroyPhysicalMonitorFunc Brightness_lcd(Const $BRIGHTNESS_Lcd) Local $BRIGHTNESS_String, $tmp, $i For $i = 1 To BinaryLen($BRIGHTNESS_Lcd) $tmp = Int(BinaryMid($BRIGHTNESS_Lcd, $i, 1)) If $i = 1 Then $BRIGHTNESS_String &= $tmp & ";" Else If $tmp = 0 Then ExitLoop $BRIGHTNESS_String &= $tmp & ";" EndIf Next Return StringSplit(StringTrimRight($BRIGHTNESS_String, 1), ";", 2)EndFunc ;==>Brightness_lcdFunc _exit() If $hDevice Then _WinAPI_CloseHandle($hDevice) _DestroyPhysicalMonitor($hMonitor) ;关闭监视器句柄 DllClose($Dxva2) ExitEndFunc ;==>_exit