[Bug 158557] I am trying to use COM on Windows to load an OpenOffice Writer object in a window but it fails

2024-03-05 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=158557

--- Comment #5 from Robert Goodman  ---
In regards to the statement:
"the calls are only intended to *register the servers in registry*" is false..
Windows requires that the servers be active to handle COM calls while
LibreOffice is running. 
They can't be taken down until you close LibreOffice.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 158557] I am trying to use COM on Windows to load an OpenOffice Writer object in a window but it fails

2024-01-16 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=158557

--- Comment #4 from Robert Goodman  ---
all I need to do is:

hResult = CoCreateInstance(
OID_WriterOASISTextServer,
0,
   CLSCTX_LOCAL_SERVER ,
   IID_IUnknown,
   (VOID**)&pUnknown );

and it fails.

I built the latest LibreOffice from the current source files and got the result
I reported.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 158557] I am trying to use COM on Windows to load an OpenOffice Writer object in a window but it fails

2024-01-16 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=158557

Buovjaga  changed:

   What|Removed |Added

 CC||ilmari.lauhakangas@libreoff
   ||ice.org

--- Comment #3 from Buovjaga  ---
(In reply to Robert Goodman from comment #2)
> I tried my code using the current OpenOffice build and it works... but I
> can't find where the difference between OpenOffice code and LibreOffice code
> is in this area.

If you are unable to provide a minimal example for others to test, it is still
possible for you to investigate this further on your own. We provide git
repositories per each version of LibreOffice, each containing several thousands
of runnable LibreOffices. They allow you to pinpoint where some behaviour
appeared.

https://wiki.documentfoundation.org/QA/Bibisect
https://wiki.documentfoundation.org/QA/Bibisect/Windows

As a first step, you might consider getting the Windows "releases" repository
to narrow down the initial search. The older LibreOffice versions do require
older versions of Microsoft Visual C++ runtimes to be present (x86).

Let me know, if you need help with the process and I can guide you.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 158557] I am trying to use COM on Windows to load an OpenOffice Writer object in a window but it fails

2023-12-06 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=158557

--- Comment #2 from Robert Goodman  ---
When I run the LibreOffice code (compiled using Dev Studio 2019), it
immediately destroys and unregisters the classes.. It winds up here:

Lines 74- 81 servproc.cxx

EmbedServer_Impl::~EmbedServer_Impl()
{
for( int nInd = 0; nInd < SUPPORTED_FACTORIES_NUM; nInd++ )
{
if ( m_pOLEFactories[nInd] )
m_pOLEFactories[nInd]->deregisterClass();
}
}

Lines 128 - 133

bool EmbedProviderFactory_Impl::deregisterClass()
{
HRESULT hresult = CoRevokeClassObject( m_factoryHandle );

return (hresult == NOERROR);
}

CoRevokeClassObject removes the listener so COM doesn't work.. This code never
gets called again so COM is essentially broken.

I tried my code using the current OpenOffice build and it works... but I can't
find where the difference between OpenOffice code and LibreOffice code is in
this area.

Unfortunately my code is embedded in a larger program but it essentially comes
down to:

hResult = CoCreateInstance(
ClassId,
0,
   CLSCTX_LOCAL_SERVER ,
   IID_IUnknown,
   (VOID**)&pUnknown );

where ClassId is equal to your OID_WriterOASISTextServer. My code times out and
returns an error.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 158557] I am trying to use COM on Windows to load an OpenOffice Writer object in a window but it fails

2023-12-06 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=158557

--- Comment #1 from Mike Kaganski  ---
The code you see indeed automatically destroys the temporaries created by calls
to createInstance. However, that is expected, and the calls are only intended
to *register the servers in registry*, as e.g. made in commit
afe1abd5aab0298f15e142094475f15355217b69.

To see if there's some actual problem in this code, a reproducer is needed; it
would be best, if that would be some script like VBS, which would allow to
repro without setting up some environment and build some application for the
task.

Thank you!

-- 
You are receiving this mail because:
You are the assignee for the bug.