shim LoadClr returning 0x8013150a

D

David Thielen

Hi;

We have a customer who when they try to run our AddIn, in the shim code
(copied from the MS shim code), the call LoadCLR (in CLRLoader.cpp) returns
an error of 8013150a.

We uninstalled and reinstalled .NET 2.0 and also installed .NET 1.1 and .NET
3.0. We uninstalled and reinstalled our AddIn. Our AddIn runs fine on
thousands of other systems.

What's going on here?

--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com

Cubicle Wars - http://www.windwardreports.com/film.htm
 
J

Jialiang Ge [MSFT]

Hello Dave,

According to the description, it sounds like a security configuration
issue. The error code 0x8013150a is COR_E_SECURITY, a CLR error code for
the System.Security.SecurityException

Does the "MS shim code" mean
http://msdn2.microsoft.com/en-us/library/aa140200.aspx? I assume that you
have strictly followed the "Checklist and Notes" in the article.
The COR_E_SECURITY HRESULT should be returned by the call
hr = CorBindToRuntimeEx(0,0, STARTUP_LOADER_OPTIMIZATION_MULTI_DOMAIN
|STARTUP_CONCURRENT_GC,CLSID_CorRuntimeHost, IID_ICorRuntimeHost,(PVOID*)
&m_pHost);
in the LoadCLR method (because ICorRuntimeHost::Start does not have
COR_E_SECURITY HRESULT as its return value
http://msdn2.microsoft.com/en-us/library/ms164330(VS.80).aspx)
I am consulting the CLR team for the possible security reasons that
COR_E_SECURITY is returned by CorBindToRuntimeEx, I will get back to you as
soon as possible.

Last, I hope to confirm with you if the issue has been reproduced on your
side? According to the issue description, I am not clear whether the
problem only occurs on that one computer? Where did you uninstalled and
reinstalled .NET 2.0 and also installed .NET 1.1 and .NET 3.0? Can I
understand that these re-install test does not help the issue?

Thanks
Jialiang Ge ([email protected], remove 'online.')
Microsoft Online Community Support

==================================================
For MSDN subscribers whose posts are left unanswered, please check this
document: http://blogs.msdn.com/msdnts/pages/postingAlias.aspx

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications. If you are using Outlook Express/Windows Mail, please make sure
you clear the check box "Tools/Options/Read: Get 300 headers at a time" to
see your reply promptly.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 
D

David Thielen

Aren't you supposed to be off celebrating New Years right now??? I hope you
do get the days off.

To answer your questions:
1) Yes this is the shim code your URL references.
2) Yes we followed the shim checklist.
3) We have thousands of users runnign our AddIn on Windows XP and this error
occurs on only 1 computer. Every other computer runs fine.
4) Yes we uninstalled and reinstalled .NET, J# redist, and our AddIn. This
did not fix it.

--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com

Cubicle Wars - http://www.windwardreports.com/film.htm
 
J

Jialiang Ge [MSFT]

Hello Dave,
Aren't you supposed to be off celebrating New Years right now??? I hope
you do get the days off.
Yes, we are celebrating Chinese traditional Spring Festival. But in order
to ensure that all the customers' issues get supported, some of us need to
stay in office, and it is our pleasure to help you :)

I have reported the issue to the CLR team, and they need more information
and confirmation.
1. Can you please verify that the machine seeing the error does not have
any other Office Add-in written in managed code and different from the ones
on the other machines? If it does, does this problem repro if you remove or
deactivate the add-in?
2. Which version of Office when the issue happens?
3. In order to confirm that it is the HRESULT from CorBindToRuntimeEx and
not ICorRuntimeHost::Start that is returning COR_E_SECURITY, would you run
the following small C++ program on that machine and let me know the run
result?

HRESULT LoadCLR()
{
HRESULT hr = S_OK;

// ensure the CLR is only loaded once.
if (m_pHost != NULL)
return hr;

// Load runtime into the process ...
hr = CorBindToRuntimeEx(
// version, use default
0,
// flavor, use default
0,
// domain-neutral"ness" and gc settings
STARTUP_LOADER_OPTIMIZATION_MULTI_DOMAIN |
STARTUP_CONCURRENT_GC,
CLSID_CorRuntimeHost,
IID_ICorRuntimeHost,
(PVOID*) &m_pHost);

// couldn't load....
if (!SUCCEEDED(hr))
{
printf("CorBindToRuntimeEx causes the error");
return hr;
}

// start CLR
return m_pHost->Start();
}

If "CorBindToRuntimeEx causes the error" is printed in the console, then it
is CorBindToRuntimeEx that causes the problem, otherwise, the problem
results from m_pHost->Start();

Thanks

Jialiang Ge ([email protected], remove 'online.')
Microsoft Online Community Support

=================================================
When responding to posts, please "Reply to Group" via your newsreader
so that others may learn and benefit from your issue.
=================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 
J

Jialiang Ge [MSFT]

Hello Dave,

Thank you for the quick response. Please help to check if my understanding
of the information is correct:
1) the only other 3rd party AddIn is the salesforce.com AddIn
So the machine that gets the 0x8013150a error has an office add-in
"salesforce.com" installed. However, on all the other machines that do not
have the error, there is no "salesforce.com" addin installed.

In order to narrow our focus to see if it is a problem caused by the third
party add-in, is it possible for you to uninstall the "salesforce.com" from
that computer? After the add-in is uninstalled, will it still have the
error thrown?
2) Word 2003
So the computer that encounters the error 0x8013150a has Word 2003
installed. On the other computers that can run the add-in well, do they
have Word 2003 installed? If there exists a computer with Word 2003 can run
the add-in well, then we can say the error 0x8013150a is not related to the
Office version.
3 ) m_pHost->Start(); returns 0 when run from the command line.
0 stands for S_OK, namely, that piece of code returns successfully. The
code LoadCLR is extracted from the sample
http://msdn2.microsoft.com/en-us/library/aa140200.aspx, from which the
error 0x8013150a (COR_E_SECURITY) is returned. It is a little bit strange
that LoadCLR returns an error if it is run in an add-in, but returns S_OK
in a simple console application. I have reported it to the CLR team, and
will get back to you as soon as possible.

Thanks again for the information. If there is any misunderstanding in my
comprehension?

Regards,
Jialiang Ge ([email protected], remove 'online.')
Microsoft Online Community Support

=================================================
When responding to posts, please "Reply to Group" via your newsreader
so that others may learn and benefit from your issue.
=================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 
J

Jialiang Ge [MSFT]

Hello Dave,

Thank you for the confirmation. We are researching the issue and will get
back to you as soon as possible.

On you side, in order to see which function (CorBindToRuntimeEx or
m_pHost->Start();) in the *COM shim* returns the error, is it possible for
you to change the LoadCLR code for the COM shim
(http://msdn2.microsoft.com/en-us/library/aa140200.aspx) to pop out the hr
after CorBindToRuntimeEx is called:
MessageBox(NULL, hr, "Result", MB_SETFOREGROUND); then recompile the addin
project and run it again on that computer?

In addition, we suggest using COM Shim Wizard version 2.3
http://msdn2.microsoft.com/en-us/library/bb508939.aspx which is a newer
version than http://msdn2.microsoft.com/en-us/library/aa140200.aspx

Regards,
Jialiang Ge ([email protected], remove 'online.')
Microsoft Online Community Support

=================================================
When responding to posts, please "Reply to Group" via your newsreader
so that others may learn and benefit from your issue.
=================================================
This posting is provided "AS IS" with no warranties, and confers no rights
 
J

Jialiang Ge [MSFT]

Hello Dave,

Sorry for my delayed response. I am sorry to let you know that we have not
found clues for the issue yet, partially because we do not have a
reproducible environment to test on directly. Looking at the nature of this
issue, it would require intensive troubleshooting which would be done
quickly and effectively with direct assistance from a Microsoft Support
Professional through Microsoft Product Support Services. You can contact
Microsoft Product Support directly to discuss additional support options
you may have available, by contacting us at 1-(800)936-5800 or by choosing
one of the options listed at
http://support.microsoft.com/common/international.aspx?rdpath=fh;en-us;cntac
tms.

Regards,
Jialiang Ge
Microsoft Online Community Support

=================================================
When responding to posts, please "Reply to Group" via your newsreader
so that others may learn and benefit from your issue.
=================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top