GenerateMetadata.SearchPath Method

Definition

Searches for a specified file in a specified path.

This API supports the product infrastructure and is not intended to be used directly from your code.

public:
 static int SearchPath(System::String ^ path, System::String ^ fileName, System::String ^ extension, int numBufferChars, System::String ^ buffer, cli::array <int> ^ filePart);
public static int SearchPath (string path, string fileName, string extension, int numBufferChars, string buffer, int[] filePart);
static member SearchPath : string * string * string * int * string * int[] -> int
Public Shared Function SearchPath (path As String, fileName As String, extension As String, numBufferChars As Integer, buffer As String, filePart As Integer()) As Integer

Parameters

path
String

The path to be searched for the file.

fileName
String

The name of the file for which to search.

extension
String

An extension to be added to the file name when searching for the file.

numBufferChars
Int32

The size of the buffer that receives the valid path and file name.

buffer
String

The buffer that receives the path and file name of the file found.

filePart
Int32[]

The variable that receives the address of the last component of the valid path and file name.

Returns

If the search succeeds, the return value is the length of the string copied to buffer. If the search fails, the return value is 0.

Remarks

For more information, see SearchPath function.

Applies to