It seems that the issue is that COM is not being initialized. This normally happens in Application.Initialize
because of the initialization procedure that is added by using ComObj
. But you report in a comment that InitProc
is nil
inside Application.Initialize
which indicates that ComObj
is not included in your project.
So, you can solve the issue readily by including ComObj
in your project. Or if you want to be explicit about it, just call CoInitilize(nil)
at the very start of your .dpr file.