Previous Topic: CreateMIFGroup - Create a GroupNext Topic: CreateMIFString - Create a String Attribute


CreateMIFInteger - Create an Integer Attribute

Valid on UNIX and Windows

This function creates an integer attribute in an existing group in an existing MIF file.

Function format:

CreateMIFInteger(Filename as string, Group as string, Name as string, Value as integer, Description as string) as integer 
CreateMIFInteger(Filename as string, Group as integer, Name as string, Value as integer, Description as string) as integer
Filename

Specifies the file name of the MIF file in which to create the Integer attribute.

Group

Specifies the group in which the Integer attribute is created. It can be a string specifying the name of the group or an integer specifying the ID of the group. The ID is the value returned by a call to the CreateMIFGroup function.

Name

Specifies the name of the attribute.

Value

Integer specifying the value of the attribute.

Description

Specifies the description of the attribute.

On successful completion, the function returns the ID of the attribute within the group in the MIF file; otherwise, returns zero.

Example:

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")