Eike Rathke wrote:
Hi Rainman,

On Thursday, 2008-06-19 16:13:01 +0800, Rainman Lee wrote:

[...]
        Reference<XInterface> xInterface =
xMultiFactory.get()->createInstanceWithContext(L"com.sun.star.awt.Toolkit",
m_xContext);
[...]
when the component is runing, it shows the first two message boxes as
expected, and crashes without showing the last one.

I'm almost certain that L"some string" is the culprit, because the
method expects a rtl::OUString there. Use
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.Toolkit"))
instead.

On Windows, the L"..." version should also work, by accident. (sal_Unicode is a typedef for wchar_t there, and there is a non-explicit rtl::OUString(sal_Unicode const *) ctor).

-Stephan

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to