色盲眼镜多少钱:delphi 在瑞星2010全保护下创建文件夹
来源:百度文库 编辑:九乡新闻网 时间:2024/10/05 22:06:22
delphi 在瑞星2010全保护下创建文件夹
program createfolder;uses
Windows;
const
DIRECTORY_ALL_ACCESS = STANDARD_RIGHTS_REQUIRED or $F;
FILE_CREATE = $00000002;
FILE_DIRECTORY_FILE = $00000001;
OBJ_CASE_INSENSITIVE = $00000040;
type
NTSTATUS = ULONG;
PUnicodeString = ^TUnicodeString;
TUnicodeString = packed record
Length: Word;
MaximumLength: Word;
Buffer: PWideChar;
end;
UNICODE_STRING = TUnicodeString;
PUNICODE_STRING = ^UNICODE_STRING;
PLargeInteger = ^TLargeInteger;
TLargeInteger = packed record
LowPart: Cardinal;
HighPart: Integer;
end;
PObjectAttributes = ^TObjectAttributes;
TObjectAttributes = packed record
Length: Cardinal;
RootDirectory: THandle;
ObjectName: PUNICODE_STRING;
Attributes: Cardinal;
SecurityDescriptor: Pointer;
SecurityQualityOfService: Pointer;
end;
OBJECT_ATTRIBUTES = ^TObjectAttributes;
POBJECT_ATTRIBUTES = ^OBJECT_ATTRIBUTES;
PIoStatusBlock = ^TIoStatusBlock;
TIoStatusBlock = packed record
Status: NTSTATUS;
Information: Cardinal; //ULONG_PTR
end;
IO_STATUS_BLOCK = TIoStatusBlock;
procedure RtlInitUnicodeString (var Buffer: TUnicodeString;Source: PWideChar); stdcall;external 'ntdll.dll' name 'RtlInitUnicodeString';
function createrixing(Filefname:PWideChar): bool;
var
hmod, hFile: dword;
FileAccess: ulong;
stat: integer;
FileAttr, FileShare, CreateDispos, CreateOptions: ulong;
oba: TObjectAttributes;
iosb: IO_STATUS_BLOCK;
pNtCreateFile, pUniName: pointer;
uniname: UNICODE_STRING;
begin
result := false;
hmod := GetModuleHandle('ntdll.dll');
pNtCreateFile := GetProcAddress(hmod, 'NtCreateFile');
FileAccess := DIRECTORY_ALL_ACCESS;
FileAttr := FILE_ATTRIBUTE_NORMAL;
FileShare := FILE_SHARE_READ or FILE_SHARE_WRITE;
CreateDispos := FILE_CREATE;
CreateOptions := FILE_DIRECTORY_FILE;
RtlInitUnicodeString(uniname, Filefname);
oba.Length := SizeOf(TObjectAttributes);
oba.RootDirectory := 0;
oba.Attributes :=OBJ_CASE_INSENSITIVE;
oba.ObjectName := @UniName;
oba.SecurityDescriptor := nil;
oba.SecurityQualityOfService := nil;
asm
push 0
push 0
push CreateOptions
push CreateDispos
push FileShare
push FileAttr
push 0
lea eax , iosb
push eax
lea eax ,oba
push eax
push FileAccess
lea eax ,hFile
push eax
call pNtCreateFile
mov stat , eax
end;
if (stat <> 0) then result := false else result := true;
end;
begin
if not (createrixing('\??\C:\Program Files\Rising\Rav\lpk.dll')) then messagebox(0, pchar('文件夹创建失败'), '提示', 0) else
messagebox(0, pchar('创建成功'), '提示', 0)
end.
delphi 在瑞星2010全保护下创建文件夹
在AIX环境下如何创建ovpass
delphi 获取文件创建,修改时间
创建别人打不开删不掉的文件夹
在Windows下创建.htaccess文件的方法
体验IE9浏览器的“追踪保护”功能 - 瑞星网
delphi
创建一个让人看不见的文件夹
创建一个别人看不到打不开的文件夹
如何用命令符创建文件夹
如何创建一个别人打不开也删不掉的文件夹-
INDOWS下文件夹
WINDOWS下文件夹简介
delphi 2010 fastMM 内存泄露使用方法 - SUNSTONE的Delphi...
如何用Delphi在TWebBrowser中調用JavaScript
如何在DELPHI中使用汇编
linux创建root用户以及在当前用户下切换到root用户
利用Delphi的File Of Type创建并管理属于你自己的数据库
第二讲Delphi操作数据库基础(下)
制造超强加密文件夹【保护个人隐私】
创建一个让人看不见的文件夹11111
教你创建一个别人打不开删不掉的文件夹jkl
教你创建一个别人打不开删不掉的文件夹
创建一个让人看不见的文件夹2