get_InputPath

Description

Retrieves the path to the input executable file that will be packed into the resulting executable.

This property allows developers to confirm which file is currently assigned as the primary target for packaging.

Syntax

HRESULT get_InputPath([out, retval] BSTR* pstrPath);

Parameters

pstrPath
Type: BSTR*
[out, retval] Receives a string containing the path of the input file set for packing.

Return Value

Returns an HRESULT.

  • S_OK if the input path was successfully retrieved.
  • E_POINTER if pstrPath is null.
  • Other standard COM error codes on failure.

Example

CComPtr<IBxProject> project;
if (SUCCEEDED(BxPackerApi_CreateProject(&project))) {
    CComBSTR inputPath;
    if (SUCCEEDED(project->get_InputPath(&inputPath))) {
        wprintf(L"Input file path: %s\n", static_cast<LPCWSTR>(inputPath));
    }
}

Remarks

  • The input path specifies which executable will be packed.
  • It can be set using put_InputPath.
  • The path must point to an existing file, otherwise the build process will fail.
  • The input file determines the entry point of the final packed executable and its dependencies.

See Also