Classe non enregistrée, ClassID: {9616B8B3-FE6E-4122-AC93-E46DBD571F87}

Hi,

I've got trouble with PDF Creator 2.1 and Delphi 2010.

It's seems that a Class is not registered....

Here's the code sample :

procedure TForm8.Button1Click(Sender: TObject);
var
  LQueue: IQueue;
  LPrintJob: IPrintJob;
  LPDFCreator: IPDFCreator;

begin
  LQueue := coQueue.Create;
  LQueue.Initialize;

  LPrintJob := CoPrintJob.Create;

  LQueue.WaitForJob(5000);

  LPrintJob := LQueue.NextJob;
  LPrintJob.SetProfileByGuid('DefaultGuid');
  LPrintJob.ConvertTo('c:\\test.pdf');

  LQueue.ReleaseCom;
end;

The instruction in red raise the exception :

" Le projet Project4.exe a déclenché la classe d'exception EOleSysError avec le message 'Classe non enregistrée, ClassID: {9616B8B3-FE6E-4122-AC93-E46DBD571F87}'. "

Any help would be appreciate ...

Thanks

Hey,


you don’t have to explicitly create a PrintJob object because it doesn’t make much sense. Instead, the queue object gives you the PrintJob objects you need, so declaring the PrintJob as you have done under var is enough. In order to solve your problem, removing the red line should be enough.

Let me know, if there are further problems.

Regards,
Sazan