MsiGetTargetPath

[This is preliminary documentation and subject to change.]

The MsiGetTargetPath function returns the full target path for a folder in the Directory table.

UINT MsiGetTargetPath(
  MSIHANDLE hInstall,   // installer handle
  LPCTSTR szFolder,     // folder identifier
  LPTSTR szPathBuf,     // buffer to return full path
  DWORD *pcchPathBuf    // in/out buffer character count
);
 

Parameters

hInstall
Handle to the installation.
szFolder
Specifies the folder identifier. This is a primary key in the Directory table.
szPathBuf
Specifies a buffer to return the full path.
pcchPathBuf
Specifies the in/out buffer character count.

Return Values

ERROR_BAD_PATHNAME
An invalid path was supplied.
ERROR_INVALID_HANDLE
An invalid or inactive handle was supplied.
ERROR_INVALID_PARAMETER
An invalid parameter was supplied.
ERROR_MORE_DATA
A buffer was too small to hold the entire value.
ERROR_SUCCESS
The function succeeded.

QuickInfo

  Windows NT: Requires version 4.0 or later. Available as a redistributable for Windows NT 4.0.
  Windows: Requires Windows 95 or later. Available as a redistributable for Windows 95.
  Windows CE: Unsupported.
  Header: Declared in msiquery.h.
  Import Library: Use msi.lib.
  Unicode: Implemented as Unicode and ANSI versions on Windows NT.

See Also

Database Access Reference, Installer Location Functions