Specifications

46  MDR User Guide 
8.2 Error Conditions 
Some of the functions may fail during execution and return an ERROR or NULL value, 
depending on the return type. If a function fails, the errno variable may be inspected to 
retrieve the cause of the failure. Some of the functions use standard errno values found 
in the errno.h file. The MDR specific errno values are found in the MdrDefs.h file. 
Windows programs may need to use the GetLastError function in order to retrieve the 
error value. 
8.3 API Function Description 
AddDisksToDiskGroup 
Declaration: 
STATUS AddDisksToDiskGroup (char * DiskGroupName, 
 DISK_INFO * DiskInfoTbl, 
 UINT DiskInfoTblSize, 
 BOOL  ClearRecordingTable); 
Description:  Add a list of disks to an existing disk group. 
This function adds one or several disks to an existing disk group. The disks to be added 
are specified using their information (port and controller identifiers). The disk 
information can be retrieved using the 
Scan function. 
When adding a list of disks to an existing disk group, the recording table contained on 
the disk group is cleared or kept intact according to the value or the parameter 
ClearRecordingTable. If the recording table is cleared then any recording data present 
on the initial disk group or on the disks to add will be LOST. 
Returned value: 
OK or ERROR. 
If 
ERROR is returned then the errno variable will be set accordingly. See MdrDefs.h for 
MDR errno values. 
AllocateMemory 
Declaration: 
STATUS AllocateMemory (void ** DataBuffer, 
 UINT DataBufferSize); 
Description:  Allocate memory buffer. 
This function allocates a memory buffer required by the 
ReadRecorderBlock, 
ReadRecordingBlock, WriteRecorderBlock and WriteRecordingBlock functions. 
AllocateMemory tries to allocate <DataBufferSize> bytes of memory. If the memory 
allocation is successful then the base address of the allocated buffer is stored in the 
memory address pointed to by 
<Buffer>. 
Returned value: 
OK or ERROR. 
If 
ERROR is returned then the errno variable will be set accordingly. See MdrDefs.h for 
MDR errno values. 
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com










