Creates a new instance of AnswerFile. Namespace: Microsoft.ComponentStudio.ComponentPlatformInterface
Assembly: Microsoft.ComponentStudio.ComponentPlatformInterface (in microsoft.componentstudio.componentplatforminterface.dll)

Usage

Visual Basic
Dim image As OfflineImage
Dim returnValue As AnswerFile
Dim cpi1 As Cpi
returnValue = cpi1.CreateAnswerFile(image)

Syntax

Visual Basic
Public Function CreateAnswerFile( _
		ByVal image As OfflineImage _
) As AnswerFile
C#
public AnswerFile CreateAnswerFile(
		OfflineImage image
);
C++
public:
AnswerFile^ CreateAnswerFile(
		OfflineImage^ image
);
J#
public AnswerFile CreateAnswerFile(
		OfflineImage image
);
JScript
public function CreateAnswerFile(
		 image : OfflineImage
) : AnswerFile;

Parameters

image

Offline image associated with the answer file. Image can be null.

Return Value

A blank answer file.

Remarks

If the image parameter is null, the answer file is not associated with any offline image, and all component setting operations will throw exceptions.

If you create a new answer file without opening a Windows image, you can add components and settings to that answer file, but you will not be able to validate the answer file. It is recommended that you open a Windows image to validate the answer file.


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