Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

CoInitializeSecurity from a C# app fails with error 0x80010119, on chinese and japanese Win2003

470 views
Skip to first unread message

Gaurav Lochan

unread,
Feb 1, 2006, 9:51:31 PM2/1/06
to
Hi,

I've got a C# application that uses the Virtual Server COM API, and so
based on their sample code, the first thing my application does is call
CoInitializeSecurity with the specified parameters. I'm using
VS2003.NET and .NET 1.1 to develop the application.

This has worked fine on english systems (Win2003, Windows XP) but when
i tried this on a chinese or a japanese system, the app gets this error
code (0x80010119, RPC_E_TOO_LATE) from CoInitializeSecurity. I've
searched for this and found that people have hit this problem since the
CLR is calling CoInitializeSecurity on its own which prevents our app
from calling it again with the correct parameters.

I've seen that when i try to run my app over and over again, i hit this
problem the first 3-4 times, but then it works. And after that, i dont
hit the exception again !

I'm trying to find the answers to the following questions:
1. Why am I hitting this on the international OS's only ?
2. Why does this happen the first 3-4 times, and then go away ?
3. Is there a solution for this ? I cant just catch and ignore the
exception since i need to set the right parameters to work with Virtual
Server's COM API.

Thanks,

Gaurav

Richard Cardona

unread,
Feb 1, 2006, 11:18:57 PM2/1/06
to
In i18n development I find that keyboard input method support usually
triggers a different initialization profile. When you say you have a C#
app is output type console or Windows/Windows Form? The latter will
initialize more subsystems.

You might try setting some of the culture attributes of your assemblies
to see if .NET initializes your app like on a US system or set the
runtime cultureinfo of your startup thread to en_US.

Without actually trying any of this, I'm speculating here.

0 new messages