CoInitializeSecurity() in C#

M

Mezz

Microsoft has a page titled
'Connecting to the Virtual Server COM Object'


I'd expect this to work out of the chute but I am having issues with
the (surprise surprise) call to CoInitializeSecurity().


The link and source is here
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msvs...



And the error is the dreaded
'Security must be initialized before any interfaces are marshalled or
unmarshalled. It cannot be changed once initialized.'


This is happening during the call to CoInitializeSecurity.


I'm working on XP, in C#, and am curious if anyone out there had the
same issue with the source and whether a resolution was found.


Thanks,
-Mezz
 
P

Peter van der Goes

Mezz said:
Microsoft has a page titled
'Connecting to the Virtual Server COM Object'


I'd expect this to work out of the chute but I am having issues with
the (surprise surprise) call to CoInitializeSecurity().


The link and source is here
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msvs...



And the error is the dreaded
'Security must be initialized before any interfaces are marshalled or
unmarshalled. It cannot be changed once initialized.'


This is happening during the call to CoInitializeSecurity.


I'm working on XP, in C#, and am curious if anyone out there had the
same issue with the source and whether a resolution was found.


Thanks,
-Mezz
I don't have an answer to your specific problem, but I can suggest that
you'll get better answers in the C# newsgroup vs. this C++ group.
Try

microsoft.public.dotnet.languages.csharp
 

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