Siegmar Gieseler wrote:I have developed an application with PivotCube and wolud like to distribute it using a CD.
But when I try to run the application it chows a message like this:
Server not registered!Please check zCube.dll registration
The "zCube.dll"is in the same directory of the ".exe" file.
Is there any way to run an application without registering the "zCube.dll" file ?
1. Here from site HowTo section
How to deploy my application with zCube.dll?
zCube.dll is 'In-Process' OLE server, so it must be registered in Windows before your application will try to work with PivotCube.
You may do this by 3 ways
a. from command line by command (from directory where zCube.dll placed) regsvr32.exe zCube.dll
b. most installation program(like InstallShield,Wise etc) support option like 'register on deploy'
c. from your application code
procedure TForm1.RegisterServerClick(Sender: TObject);
var
LibName:string;
HLib:THandle;
RServ:TDLLRegisterServer;
begin
LibName:='zCube.dll';
HLib:=LoadLibrary(pchar(LibName));
if HLib>HINSTANCE_ERROR then begin
RServ:=GetProcAddress(HLib,'DllRegisterServer');
if Assigned(RServ) then begin
if RServ=S_OK then ShowMessage(Format('Server %s was successfully registered',[LibName]))
else ShowMessage(Format('Can not register server %s',[LibName]));
end else ShowMessage('Method DllRegisterServer does not supported in the selected library');
FreeLibrary(HLib);
end else ShowMessage(Format('Library %s was not found',[LibName]));
end;
2. You may order PivotCube VCl full source package and compile your application in NONDLL mode. In this case zCube.dll code will embedded into your application as part of PivotCube VCL.