get_OutputPath
Description
Retrieves the output path that has been set for the packed executable file. This method returns the file path previously specified via put_OutputPath.
Syntax
HRESULT get_OutputPath([out, retval] BSTR* pstrPath);Parameters
pstrPath
Type: BSTR*
[out, retval] Receives the current path where the packed output file will be generated. The caller must free the returned string with SysFreeString.
Return Value
Returns an HRESULT.
S_OKif the output path was successfully retrieved.E_POINTERifpstrPathis null.- Other standard COM error codes on failure.
Example
CComPtr<IBxProject> project;
if (SUCCEEDED(BxPackerApi_CreateProject(&project))) {
project->put_OutputPath(CComBSTR(L"C:\\Packed\\MyApp_Packed.exe"));
CComBSTR outputPath;
if (SUCCEEDED(project->get_OutputPath(&outputPath))) {
wprintf(L"Output file will be saved to: %s\n", static_cast<wchar_t*>(outputPath));
}
}Remarks
- Use this method to verify or display the location where the packed executable will be saved.
- The returned path represents the file that will be created after invoking the build operation.
- You can call this method at any point after the output path has been set.
See Also
- put_OutputPath
- BxPackerApi_CreateProject
IBxProject::Build