前のトピック: CreateMIFFile - MIF ファイルの作成次のトピック: CreateMIFInteger - 整数属性の作成


CreateMIFGroup - グループの作成

UNIX および Windows で有効です。

CreateMIFGroup は既存の MIF ファイル内にグループを作成します。

この MIF および Inv 関数の形式は、以下のとおりです。

CreateMIFGroup(Filename as string, Name as string, Description as string, Class as string) as integer
Filename

グループを作成する MIF ファイルの名前を指定します。

名前

作成するグループの名前を指定します。

説明

グループの説明を指定します。

クラス

グループのクラスを指定します。

この関数が正常に完了すると、MIF ファイル内のグループに割り当てられた ID が返されます。それ以外の場合は、0 が返されます。

例: CreateMIFGroup 関数

Dim Dir as String
Dim DriveFree as Integer

'Get directory
Dir = GetDirectory(3)
DriveFree = GetDiskFreeMB(3)

'Create .MIF file
CreateMIFFile(ComputerPath+"Disk.MIF","My Disk Inventory ","","")
CreateMIFGroup(ComputerPath+"Disk.MIF","Disk Info","Disk information","AMClass")
CreateMIFString(ComputerPath+"Disk.MIF","Disk Info","Current Dir",Dir,"Dir name")
CreateMIFInteger(ComputerPath+"Disk.MIF","Disk Info","Free in MB",DriveFree,"Free MB")