Link to home
Start Free TrialLog in
Avatar of ailts
ailts

asked on

Using a Visual Basic ActiveX dll in Delphi

I have read how to use a Visual Basic Active X dll in Delphi on Borland;s delphi WEB pages.  I followed there instructions, but recieve this error.

"Project TestConfig.exe raised exception class EOleSysError with message 'Colnitialize has not been called'.  Process Stopped. Use Step or Run to Continue."

Here is my code:
var
  testconfig: Variant;

testconfig := CreateOleObject('Configurator.InferenceEngine');

I have search delphi help and the WEB for this error message with no luck.  Any ideas?



ASKER CERTIFIED SOLUTION
Avatar of inthe
inthe

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of inthe
inthe

ps,
for second method you may need add "activex" to the uses section.
Avatar of ailts

ASKER

Why was that line not generated automatically like it was supposed to be?

Avatar of ailts

ASKER

To clarify my previous comment.  Why was the line "Application.Initialize;" not generated automatically?  I was under the impression that you did not need to edit the project file at all.  this line was all I needed to add to my code to get it to run.
usually you would use the second method but first also works sometimes.
it is not needed for many apps to have this,for d5 anyway half the apps that need this use comobj which does this inside itself.