BxPackerApi_CreateProject
Description
Creates a new BoxedApp Packer project and returns an interface pointer to IBxProject.
Use the returned interface to configure inputs, virtual files, registry settings, and to build the final executable.
Syntax
HRESULT BXPACKERAPI BxPackerApi_CreateProject(IBxProject** ppProject);Parameters
ppProject
Type: IBxProject**
[out] Receives a pointer to an IBxProject interface for the newly created project. Pass the address of a valid pointer variable. The caller is responsible for releasing the interface when done.
Return Value
Returns an HRESULT.
S_OKon successE_POINTERifppProjectis null- Other failure codes may be returned to indicate initialization errors
Example
#include "BxPackerApi.h"
int main() {
IBxProject* project = nullptr;
HRESULT hr = BxPackerApi_CreateProject(&project);
if (FAILED(hr)) {
// handle error
return 1;
}
// Configure the project via IBxProject...
// project->AddInputExe(L"app.exe");
// project->AddFile(L"data\\config.json", L"config.json");
// project->SetOutputPath(L"packed\\app_packed.exe");
// project->Build();
// Release when finished
project->Release();
return 0;
}