| Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date | |
| All threads index page 2 | |
Hello, I've came across a strange behavior using an COM object created by Qt and a mfc one. The mfc object is an ocx control. The Qt object is an exe using ActiveQt. I've written a small test application which does only a CoCreateInstance() call and check if it works or not. The call always succeeds for both objects when the user is logged on on the computer. Only the mfc control works when the user is not logged on, the Qt one fails. I've attached a compileable samplecode for you to reproduce this. Anyone has an idea why this happens? Maybe it's something with ActiveX, maybe with Qt's registering method? I don't know :( Thanks, Christoph
Attachment:
Attachment:
activeqt_taskplanner_test.zip
Description: Zip compressed data
Message 2 in thread
"Christoph Keller" <c.keller@xxxxxxxxxx> wrote in message
news:fjo7d0$ss8$1@xxxxxxxxxxxxxxxxxxxxx
> Hello,
>
> I've came across a strange behavior using an COM object created by Qt
> and a mfc one.
>
> The mfc object is an ocx control.
> The Qt object is an exe using ActiveQt.
>
> I've written a small test application which does only a
> CoCreateInstance() call and check if it works or not. The call always
> succeeds for both objects when the user is logged on on the computer.
> Only the mfc control works when the user is not logged on, the Qt one
> fails.
>
> I've attached a compileable samplecode for you to reproduce this.
>
> Anyone has an idea why this happens? Maybe it's something with ActiveX,
> maybe with Qt's registering method? I don't know :(
Hi Christoph,
Your executable probably depends on the Qt DLLs - maybe those DLLs are not
in a direction in which the system searches for DLLs when the user is not
logged in. Copy the Qt DLLs (and other dependencies) into the same directory
as the executable.
ActiveQt registers the server in HKEY_LOCAL_MACHINE by default, so the
system should find them. What is the return value of CoCreateInstance?
Volker
--
[ signature omitted ]
Message 3 in thread
Hello,
we've found the same while debugging :)
The return value of CoCreateInstance() was REGDB_E_CLASSNOTREG. I've
came across this error because a customer complained that our control
does not work for him. The strange thing is that they've a static
compiled exe but I'm checking this.
The error before seems to occur because the PATH variable gets filled
with the Qt path at startup (system variables) but the services.exe does
not seem to have the same paths or something like that.
Greetings,
Christoph
Volker Hilsheimer schrieb:
> "Christoph Keller" <c.keller@xxxxxxxxxx> wrote in message
> news:fjo7d0$ss8$1@xxxxxxxxxxxxxxxxxxxxx
>> Hello,
>>
>> I've came across a strange behavior using an COM object created by Qt
>> and a mfc one.
>>
>> The mfc object is an ocx control.
>> The Qt object is an exe using ActiveQt.
>>
>> I've written a small test application which does only a
>> CoCreateInstance() call and check if it works or not. The call always
>> succeeds for both objects when the user is logged on on the computer.
>> Only the mfc control works when the user is not logged on, the Qt one
>> fails.
>>
>> I've attached a compileable samplecode for you to reproduce this.
>>
>> Anyone has an idea why this happens? Maybe it's something with ActiveX,
>> maybe with Qt's registering method? I don't know :(
>
> Hi Christoph,
>
> Your executable probably depends on the Qt DLLs - maybe those DLLs are not
> in a direction in which the system searches for DLLs when the user is not
> logged in. Copy the Qt DLLs (and other dependencies) into the same directory
> as the executable.
>
> ActiveQt registers the server in HKEY_LOCAL_MACHINE by default, so the
> system should find them. What is the return value of CoCreateInstance?
>
> Volker
>
>
--
[ signature omitted ]