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
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.