社区
Windows SDK/API
帖子详情
急!!!!在线等待
lqf78
2003-10-14 05:02:50
VerQueryValue函数的使用方法,最好有例子
...全文
55
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.
}
告别
等待
后端接口,前端使用
在线
mock数据
在如今前后端分离的背景下,时常会出现前端界面开发完成,
等待
后端接口联调的情况。那么有没有什么方式可以有一个后端的模拟数据昵?最 low 也是最直接的方法就是自己在本地写 json 格式的模拟数据。这种方式有个弊端就是,数据没有封装好的话,在切换环境的时候要改业务代码。所以有没有更好的方式昵?
SparkShell 启动报错,
在线
等大神解决,
急
!!!!
[root@hadoop01 bin]# ./spark-shell --master spark://hadooplog4j:WARN No appenders could be found for logger (org.apalog4j:WARN Please initialize the log4j system properly.log4j:WARN See http://logging...
在线
等。
急
~
急
,
在线
等!!!!!
**
急
,
在线
等!!!!! **
急
求错哪了,如何解决
急
求大数分解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写文章