"Maxim Fridental" <
[hidden email]> wrote in message
news:bc4ggh$ethvq$
[hidden email]...
> The call of the CoInitializeSecurity (for example after
> OLELibrary>>initialize:) is failing with the error message (roughly) "The
> security must be initialized before an interface has been marshalled or
> unmarshalled." Is it possible to call this function successfully?
I'd have thought you'd be OK in a .exe if you make sure it is either of togo
form, or (as in the case of the development system) that the VM DLL is in
the same directory as the launcher executable (e.g. Dolphin.exe). The
launchers only attempt to create the VM as a COM object if they fail to
locate it in their home directory.
In a .dll the Dolphin VM will have done some interface marshalling to start
up the image, but in any case I think CoInitializeSecurity should really be
called from the host process anyway. Actually this gives you a possible
route to get it working if you are having problems calling it from a .exe.
You could write your own custom launcher that calls CoInitializeSecurity,
and which then instantiates some COM object implemented in Dolphin. The COM
object itself needn't do anything in particular, since you are free to do
anything you can normally do in Dolphin when hosted within another process.
At development time this will launch the development image through the
services of IPDolphin.dll. When this happens all the development windows
will open as saved in the image, and you can develop as normal. At runtime
you could deploy a self-registering in-proc ToGo DLL to be shipped with your
"stub" executable that calls CoInitializeSecurity before it instantiates the
Dolphin component.
Regards
Blair