Use Delphi to OICQ surgery (2)

zhaozj2021-02-11  205

Use Delphi to OICQ surgery (2)

http://www.tongyi.net Author: ChinaByte Source: Hu Fei Hits: 3945

// gif.gif is a transparent picture file SDIR: = extractFilePath (Application.exename) 'gif.gif'; // If the image file does not exist, the error message is displayed and exits if NOT FILEEXISTS (SDIR) The beginningbox ('file installation error! Image file is not found!', 'error', 0); exit; end; // Replace all GIF files under the AD folder with this file for i: = 0 TO Slist.count - 1 Do CopyFile (Pchar (SDIR), PCHAR (SLIST [I]), FALSE); / / Find and replace all GIF files DIR under the DAT folder: = Edit1.Text 'DAT'; FindResult : = FindFirst (Dir '* .gif', FAANYFILE, Searchrec); While FindResult = 0 Do Begin Slist.add (LowerCase (Dir SearchRec.name); FindResult: = FindNext (SearchRec); End; for i: = 0 to slist.count - 1 do copyfile (pchar (sdir), pchar (slist [i]), false); Finally FindClose (SearchRec); // Release FindFirst and FindNext // System Resource SList.Free; / / Release list END; END; FINDFIRST and FINDNEXT are files that look for specified properties and types under the specified path, defined as follows: Function Findfirst (const path: string; attr: integer; var f: tsearchract: integer; function findnext (var f : Tsearchrec): Integer. FindNext is always used with FindFirst, default using FindFirst's Path and Attr parameters. Findfirst and FindNext must call FindClose to release memory. CopyFile copies the existing file to a new file, defined as follows: BOOL COPYFILE (LPCTSTSTSTSTSTSTINGFILENAME, // To copy file lpctstr lpnewfilename, // Copy the destination file BOOL BFAILIFEXISTS // If the destination file already exists, // point out how to operate If the destination file exists for TURE, it is possible to fail, otherwise it is overwritten); as for the restoring advertiler, how do you really want to restore the advertising bar? Wow, there is such a person, I have a service! Ok, as a function, simply introduce the recovery of the advertising bar. As mentioned earlier, delete all GIF files under the AD folder, the OICQ will automatically download the ad file after running. There are two ways to implement recovery functions, one is to delete the AD folder, and another method is to delete the GIF file under the AD folder. Given the removal of the advertising bar, access the AD folder, if the first method is used, then click "Remove the advertising bar" immediately after recovering the advertisement, it may be wrong. So the second method is recommended. There are two ways here briefly. Delete a folder.

转载请注明原文地址:https://www.9cbs.com/read-4193.html

New Post(0)