Represents a category of validation results that indicates problems with offline image catalogs. Namespace: Microsoft.ComponentStudio.ComponentPlatformInterface
Assembly: Microsoft.ComponentStudio.ComponentPlatformInterface (in microsoft.componentstudio.componentplatforminterface.dll)

Usage

Visual Basic
Dim catalogValidationResultCode1 As CatalogValidationResultCode

Syntax

Visual Basic
Public Class CatalogValidationResultCode
		Inherits OfflineImageValidationResultCode
C#
public class CatalogValidationResultCode : OfflineImageValidationResultCode
C++
public ref class CatalogValidationResultCode : OfflineImageValidationResultCode
J#
public class CatalogValidationResultCode extends OfflineImageValidationResultCode
JScript
public class CatalogValidationResultCode extends OfflineImageValidationResultCode

Example

In this example, you use the CatalogValidationResultCode enumeration to test the catalog file in the directory indicated below. To run the example, use a catalog path that exists on your computer.

// CatalogValidationResultEnum.cs

using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.ComponentStudio.ComponentPlatformInterface;

class CatalogValidationResultEnum
{
	static void Main(string[] args)
	{
		OfflineImageInfo descriptor = 
			Cpi.Instance.GetOfflineImageInfo(
			@"C:\MyWorkingFolder\install_Windows Vista ULTIMATE.clg");
		SimpleCpiResult result = descriptor.ValidateCatalog();

		// Test the current code:
		if (result.CurrentCode == 
			CpiResultCode.CatalogNotMatchImage ||
			result.CurrentCode == CpiResultCode.InvalidCatalog)
		{
		// Catalog does not match image, or is out-of-date
		// or is created using earlier version of Cpi.
		// Regenerate catalog:
			descriptor.CreateCatalog();
			Console.WriteLine("The catalog is created.");
	}
		else if (result.CurrentCode == 
			CpiResultCode.CatalogNotExist)
		{
			// Display a message:
			Console.WriteLine(result.Message);
	}
		else if (result.CurrentCode == CpiResultCode.Ok)
		{
			// Display a message:
			Console.WriteLine(result.Message);
	}
}
}
/* Output:
Pass
*/

Inheritance Hierarchy

System.Object
   Microsoft.ComponentStudio.ComponentPlatformInterface.CpiResultCode
     Microsoft.ComponentStudio.ComponentPlatformInterface.OfflineImageValidationResultCode
      Microsoft.ComponentStudio.ComponentPlatformInterface.CatalogValidationResultCode

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Platforms

Development Platforms

Windows XP Home Edition, Windows XP Professional, Windows Server 2003, Windows Vista, and Windows 2000

Target Platforms

See Also