I'm writing a COM+ application in delphi that reads some information from a file, processes it and saves it to another file.
I'm running the app via a PHP webpage - the webpage simply calls a single method within the app via COM+.
As part of the application, I need to use a few non-visible components (such as Data Sources etc). Because the app runs in the background, there is no need for a user interface, so forms should not be needed.
But I need somewhere to stick my data components. So I created a form called "dm" and associated unit "dmU". I add my data components to the form and use the object inspector to set the properties how I want them. All good so far.
The program builds and I can run it ok, except the program will crash every time I try to access the component on the form, or even the form itself via code.
likewise "dm.show;" will crash the program, as you would expect.
Because I'm running the program via PHP, I don't get any more details on the error. It just says an exception occured, and by commenting backwards I have found this line to be the culprit.
So my question is....
How can I access these hidden data components without crashing the program?
Is there a property of the form I need to set, or perhaps a special form I need to use instead?