Problem was solved by simply call InitializePackage(GetModuleHandle('CPPPackage.bpl'));