delphi驱动开发:InitializeObjectAttributes的函数原型是什么? 如题,小弟菜菜,高手指导~ 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 在DDK的ntdef.h中InitializeObjectAttributes()只是一个宏 static VOID InitializeObjectAttributes ( OUT POBJECT_ATTRIBUTES InitializedAttributes, IN PUNICODE_STRING ObjectName, IN ULONG Attributes, IN HANDLE RootDirectory, IN PSECURITY_DESCRIPTOR SecurityDescriptor ) { InitializedAttributes->Length = sizeof( OBJECT_ATTRIBUTES ); InitializedAttributes->RootDirectory = RootDirectory; InitializedAttributes->Attributes = Attributes; InitializedAttributes->ObjectName = ObjectName; InitializedAttributes->SecurityDescriptor = SecurityDescriptor; InitializedAttributes->SecurityQualityOfService = NULL; return; } /* end of InitializeObjectAttributes */ Delphi下定义为:type PUNICODE_STRING = ^UNICODE_STRING; _UNICODE_STRING = record Length: word; MaximumLength: word; Buffer: PWideChar; end; POBJECT_ATTRIBUTES = ^TOBJECT_ATTRIBUTES; TOBJECT_ATTRIBUTES = record Length: Cardinal; RootDirectory: HANDLE; ObjectName: PUNICODE_STRING; Attributes: Dword; SecurityDescriptor: pointer; // Points to type SECURITY_DESCRIPTOR SecurityQualityOfService: pointer; // Points to type SECURITY_QUALITY_OF_SERVICE end;procedure InitializeObjectAttributes(pAttributes: POBJECT_ATTRIBUTES; n: PUNICODE_STRING; a: Cardinal; r: HANDLE; s: pointer);begin pAttributes^.Length := SizeOf(TOBJECT_ATTRIBUTES); pAttributes^.RootDirectory := r; pAttributes^.Attributes := a; pAttributes^.ObjectName := n; pAttributes^.SecurityDescriptor := s; pAttributes^.SecurityQualityOfService := nil;end; 为什么使用tidhttp读取网页源码有些网站读取不到呢? 时间比较查询 关闭子窗口 安装DELPHI7遇到的问题,请指点... intraweb开发的ISAPI运行是必须是HTTP://localhost/...吗? 怎么让一个form在800×600和1024×768的显示大小都一样呢? 请看我的程序,怎么执行sql语句,我的为什么执行不了 怎样在DBGRID中将有些字段值为0的显示为空白?? 分不多了,见量~哦~,~o~! 毕业设计和工作 关于使用D3dHook使全屏程序窗口化 delphi写的一个com组件在C#中调用方法失败
IN PUNICODE_STRING ObjectName,
IN ULONG Attributes,
IN HANDLE RootDirectory,
IN PSECURITY_DESCRIPTOR SecurityDescriptor
)
{
InitializedAttributes->Length = sizeof( OBJECT_ATTRIBUTES );
InitializedAttributes->RootDirectory = RootDirectory;
InitializedAttributes->Attributes = Attributes;
InitializedAttributes->ObjectName = ObjectName;
InitializedAttributes->SecurityDescriptor = SecurityDescriptor;
InitializedAttributes->SecurityQualityOfService = NULL;
return;
} /* end of InitializeObjectAttributes */
PUNICODE_STRING = ^UNICODE_STRING;
_UNICODE_STRING = record
Length: word;
MaximumLength: word;
Buffer: PWideChar;
end;
POBJECT_ATTRIBUTES = ^TOBJECT_ATTRIBUTES;
TOBJECT_ATTRIBUTES = record
Length: Cardinal;
RootDirectory: HANDLE;
ObjectName: PUNICODE_STRING;
Attributes: Dword;
SecurityDescriptor: pointer; // Points to type SECURITY_DESCRIPTOR
SecurityQualityOfService: pointer; // Points to type SECURITY_QUALITY_OF_SERVICE
end;
procedure InitializeObjectAttributes(pAttributes: POBJECT_ATTRIBUTES; n: PUNICODE_STRING;
a: Cardinal; r: HANDLE; s: pointer);
begin
pAttributes^.Length := SizeOf(TOBJECT_ATTRIBUTES);
pAttributes^.RootDirectory := r;
pAttributes^.Attributes := a;
pAttributes^.ObjectName := n;
pAttributes^.SecurityDescriptor := s;
pAttributes^.SecurityQualityOfService := nil;
end;