论坛风格切换切换到宽版
  • 4461阅读
  • 4回复

Inno中如何使用记录类型的变量 [复制链接]

上一主题 下一主题
离线swlove
 
发帖
102
金钱
0
威望
0
只看楼主 倒序阅读 0 发表于: 2008-03-25
Delphi中定义有如下记录类型:

_LARGE_INTEGER = record
  case Integer of
  0: (
    LowPart: DWORD;
    HighPart: Longint);
  1: (
    QuadPart: LONGLONG);
end;

LARGE_INTEGER = _LARGE_INTEGER;

我想这Inno里使用该记录类型,该如何修改呢 ?
离线gnatix

发帖
7696
金钱
-8279
威望
-828
只看该作者 1 发表于: 2008-03-26
INNO 可能不支持
离线swlove
发帖
102
金钱
0
威望
0
只看该作者 2 发表于: 2008-03-26
我想利用Inno获得如下硬盘分区信息
1:1                       C:\
1:2                       D:\
1:3                       E:\
1:4                       F:\
1:5                       G:\
1:6                       H:\
2:1                       J:\

在Delphi下可引用下 dll可做到
[attachmentid=24378]
QUOTE

function [color=#000000]GetVolumeInfo(DriverLetter: Char): TDiskExtent; stdcall; external 'diskdll.dll';

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
var
i, DType, k, g: integer;
Disk: string;
begin
Memo1.Clear;
k := 0;
g := 0;
for i := 65 to 90 do
begin
 
Disk := chr(i) + ':\';
 
DType := GetDriveType(PChar(Disk));
 
if not ((DType = 0) or (DType = 1) or (DType = 5)) then
  begin
    if
GetVolumeInfo(Chr(i)).DiskNumber = k then
   
g := g + 1
   
else begin
   
k := GetVolumeInfo(Chr(i)).DiskNumber;
   
g := 1;
   
end;
   
Memo1.Lines.Add(Format('%d:%d%38s', [k + 1, g, Disk]));
 
end;
end;
end;
附件: disk.rar (40 K) 下载次数:2
离线solen

发帖
34
金钱
50
威望
5
只看该作者 3 发表于: 2008-03-27
api

[Code]
function GetDriveType(nDrive: String): Integer;
external 'GetDriveTypeA@kernel32.dll stdcall';

procedure InitializeWizard();
begin
case GetDriveType('C:\') of
2: MsgBox('可移动磁盘', mbInformation, MB_OK);
3: MsgBox('固定驱动器', mbInformation, MB_OK);
4: MsgBox('远程驱动器', mbInformation, MB_OK);
5: MsgBox('光驱', mbInformation, MB_OK);
6: MsgBox('Ram 磁盘', mbInformation, MB_OK);
else MsgBox('未识别', mbInformation, MB_OK);
end;
end;
离线flyingkisser
发帖
*
金钱
*
威望
*
只看该作者 4 发表于: 2011-01-05
[code]
type
HelloStruct = record
   Var1: dword;
   var2: dword;
end;

我的inno版本 inno 5.4.0 unicode