社区
Windows SDK/API
帖子详情
急!!!!在线等待
lqf78
2003-10-14 05:02:50
VerQueryValue函数的使用方法,最好有例子
...全文
57
1
打赏
收藏
急!!!!在线等待
VerQueryValue函数的使用方法,最好有例子
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
1 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
pankun
2003-10-14
打赏
举报
回复
这个例子里面就有这个函数的使用方法
回收站文件个数和大小总和
get the number of Files in the Recycle Bin and their total size?
type
PSHQueryRBInfo = ^TSHQueryRBInfo;
TSHQueryRBInfo = packed record
cbSize: DWORD;
// Size of the structure, in bytes.
// This member must be filled in prior to calling the function.
i64Size: Int64;
// Total size of all the objects in the specified Recycle Bin, in bytes.
i64NumItems: Int64;
// Total number of items in the specified Recycle Bin.
end;
const
shell32 = 'shell32.dll';
function SHQueryRecycleBin(szRootPath: PChar; SHQueryRBInfo: PSHQueryRBInfo): HResult;
stdcall; external shell32 Name 'SHQueryRecycleBinA';
function GetDllVersion(FileName: string): Integer;
var
InfoSize, Wnd: DWORD;
VerBuf: Pointer;
FI: PVSFixedFileInfo;
VerSize: DWORD;
begin
Result := 0;
InfoSize := GetFileVersionInfoSize(PChar(FileName), Wnd);
if InfoSize <> 0 then
begin
GetMem(VerBuf, InfoSize);
try
if GetFileVersionInfo(PChar(FileName), Wnd, InfoSize, VerBuf) then
if VerQueryValue(VerBuf, ', Pointer(FI), VerSize) then
----------------------------------------------
Result := FI.dwFileVersionMS;
finally
FreeMem(VerBuf);
end;
end;
end;
procedure TForm1.Button1Click(Sender: TObject);
var
DllVersion: integer;
SHQueryRBInfo: TSHQueryRBInfo;
r: HResult;
begin
DllVersion := GetDllVersion(PChar(shell32));
if DllVersion >= $00040048 then
begin
FillChar(SHQueryRBInfo, SizeOf(TSHQueryRBInfo), #0);
SHQueryRBInfo.cbSize := SizeOf(TSHQueryRBInfo);
R := SHQueryRecycleBin(nil, @SHQueryRBInfo);
if r = s_OK then
begin
label1.Caption := Format('Size:%d Items:%d',
[SHQueryRBInfo.i64Size, SHQueryRBInfo.i64NumItems]);
end
else
label1.Caption := Format('Err:%x', [r]);
end;
end;
{
The SHQueryRecycleBin API used in this method is
only available on systems with the latest shell32.dll installed with IE4 /
Active Desktop.
}
SparkShell 启动报错,
在线
等大神解决,
急
!!!!
本文记录了使用Spark shell连接到Spark集群时遇到的错误情况。详细分析了错误日志,包括因连接失败导致的中断异常及初始化上下文时发生的空指针异常等问题。探讨了解决这些问题的方法,有助于用户更好地理解并解决Spark运行时可能遇到的问题。
告别
等待
后端接口,前端使用
在线
mock数据
本文介绍如何利用MockJS和
在线
平台EasyMock为前端开发提供模拟数据,解决前后端分离下
等待
后端接口的问题。文章详细解释了MockJS的语法特点和
在线
Mock的创建步骤。
在线
等。
急
~
该博客标题为'
在线
等。
急
~',内容为空,未提供具体技术问题描述,缺乏可分析的信息技术相关内容,无法提取有效技术细节或上下文。
急
,
在线
等!!!!!
博客作者
急
求问题错误所在及解决办法,但未明确具体问题内容。
急
求大数分解c++代码!!!!
文章寻求在C++中不会报错且可运行的大数分解算法实现,包括rho算法、二次筛法以及椭圆曲线方法,作者
急
需求助。,
Windows SDK/API
1,184
社区成员
22,326
社区内容
发帖
与我相关
我的任务
Windows SDK/API
Delphi Windows SDK/API
复制链接
扫一扫
分享
社区描述
Delphi Windows SDK/API
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章