> I'm working on an interoperability project
> I have a huge c++ MFC application that supports a plug-in interface
[quoted text clipped - 11 lines]
> Is there a simple function or procedure in the c++ libraries that can tell
> me if a variant is invalid? so that i can avoid passing it to C#?
maybe this can be of help:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/automat/html/f0
940eea-077f-4b68-9dac-d49e3fc62e43.asp
here is another one:
http://blogs.msdn.com/adam_nathan/archive/2003/06/11/56710.aspx
where the blogger describes this technique:
To determine if a VARIANT is valid, the CLR calls the OLE Automation
VariantCopy API, passing the VARIANT in question as the source to be copied.
If the function returns S_OK, then the CLR assumes it is valid.

Signature
Kind regards,
Bruno van Dooren
bruno_nos_pam_van_dooren@hotmail.com
Remove only "_nos_pam"
Vigj - 14 Apr 2006 11:06 GMT
Thanks Bruno..
I'll try to go for the VariantCopy way...
anyway I cannot see the blog...something like the page does not exist anymore
> > I'm working on an interoperability project
> > I have a huge c++ MFC application that supports a plug-in interface
[quoted text clipped - 21 lines]
> VariantCopy API, passing the VARIANT in question as the source to be copied.
> If the function returns S_OK, then the CLR assumes it is valid.
Vigj - 20 Apr 2006 10:17 GMT
It worked! thanks Bruno
> > I'm working on an interoperability project
> > I have a huge c++ MFC application that supports a plug-in interface
[quoted text clipped - 21 lines]
> VariantCopy API, passing the VARIANT in question as the source to be copied.
> If the function returns S_OK, then the CLR assumes it is valid.