wlasne_moduly
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
dodatkowe_funkcje [2018/06/17 12:13] – [Funkcje] admin | wlasne_moduly [2019/03/26 02:22] (current) – admin | ||
---|---|---|---|
Line 11: | Line 11: | ||
uPSC_std | uPSC_std | ||
uPSC_classes | uPSC_classes | ||
- | | + | |
- | | + | |
uPSC_dateutils | uPSC_dateutils | ||
uPSC_dll | uPSC_dll | ||
Line 19: | Line 19: | ||
- | ==== Typy ==== | + | ==== Typy modułów |
- | <code delphi> | + | <code delphi> |
Line 63: | Line 63: | ||
<code delphi> | <code delphi> | ||
+ | function CreateIniFile(const AFileName: string): TIniFile; | ||
+ | |||
TIniFile = class | TIniFile = class | ||
function SectionExists(const Section: string): Boolean; | function SectionExists(const Section: string): Boolean; | ||
Line 76: | Line 78: | ||
==== Funkcje ==== | ==== Funkcje ==== | ||
- | |||
- | <code delphi> | ||
- | <code delphi> | ||
- | <code delphi> | ||
<code delphi> | <code delphi> | ||
Line 111: | Line 109: | ||
RS, SDBM, SHIFTANDXOR, | RS, SDBM, SHIFTANDXOR, | ||
MOTOROLADOCSIS | MOTOROLADOCSIS | ||
+ | // windows // | ||
+ | LM, NTLM | ||
</ | </ | ||
- | <code delphi> | + | <code delphi> |
function CryptoDecrypt(const data, key, iv: string; mode: TCipherMode; | function CryptoDecrypt(const data, key, iv: string; mode: TCipherMode; | ||
Line 137: | Line 137: | ||
function IsValidNum(const s: string): boolean;</ | function IsValidNum(const s: string): boolean;</ | ||
- | <code delphi> | + | <code delphi>procedure RegistryScan(RootType: |
+ | procedure AddItem(App, | ||
+ | |||
+ | <code delphi> | ||
+ | |||
+ | function ExtractFilePath(const FileName: string): string; | ||
+ | function ExtractFileDrive(const FileName: string): string; | ||
+ | function ExtractFileName(const FileName: string): string; | ||
+ | function ExtractFileExt(const FileName: string): string; | ||
+ | function ExtractFileDir(Const FileName: string): string; | ||
+ | |||
+ | function FileExists(const FileName: string): Boolean; | ||
+ | function DirectoryExists(const DirName: string): Boolean; | ||
+ | |||
+ | function ParamStr(l: LongInt): | ||
+ | function ParamCount: LongInt; | ||
+ | </ | ||
==== Parametry przekazywane z aplikacji ==== | ==== Parametry przekazywane z aplikacji ==== | ||
- | <code delphi> | + | <code delphi>var |
- | <code delphi>FileRecord = TFileRecordObj</ | + | |
+ | FileRecord = TFileRecordObj</ | ||
===== Przykład ===== | ===== Przykład ===== | ||
Line 172: | Line 189: | ||
ini := CreateIniFile(FileRecord.Full); | ini := CreateIniFile(FileRecord.Full); | ||
try | try | ||
- | str := ini.ReadString(' | + | str := ini.ReadString(' |
if IsValidHex(str) and (Length(str) > 0) then | if IsValidHex(str) and (Length(str) > 0) then | ||
begin | begin | ||
Line 191: | Line 208: | ||
==== Obsługa rejestru ==== | ==== Obsługa rejestru ==== | ||
- | <code delphi> | + | <code delphi> |
- | function ModuleType: TModuleType; | + | |
begin | begin | ||
Result := mtRegistry; | Result := mtRegistry; | ||
Line 205: | Line 221: | ||
begin | begin | ||
RegistryScan(ROOT_KEY, | RegistryScan(ROOT_KEY, | ||
- | // execute OnCheck on each nodes | ||
RegistryScan(ROOT_KEY, | RegistryScan(ROOT_KEY, | ||
RegistryScan(ROOT_KEY, | RegistryScan(ROOT_KEY, | ||
Line 231: | Line 246: | ||
else | else | ||
s := ModuleName; | s := ModuleName; | ||
- | AddItem(s, | + | AddItem(s, ' |
- | | + | |
- | | + | |
- | Trim(CryptoDecrypt(Registry.ReadString(Value), | + | |
- | # | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
end; | end; | ||
end; | end; |
wlasne_moduly.txt · Last modified: 2019/03/26 02:22 by admin