VBScript doesn't see C# object as object 
Author Message
 VBScript doesn't see C# object as object

In VBScript I request a class (in this case, System.Xml.XmlDocument) from C#
via COM. C# passes it as type "object" from a C# method intended to be
generic, and it's assigned to a VBScript variant (since VBScript doesn't
support types).

VBScript now says it's not an object, IsObject() evaluates to false and
calling its properties/methods don't work. But when passed back to C# it is
seen as the class type that was given to it (in this case,
System.Xml.XmlDocument).

Is there any way to get VBScript to see this variant as the full-blown C#
object that it is?

Jon



Sat, 02 Jul 2005 09:19:05 GMT  
 VBScript doesn't see C# object as object

Quote:
> In VBScript I request a class (in this case, System.Xml.XmlDocument) from
C#
> via COM. C# passes it as type "object" from a C# method intended to be
> generic, and it's assigned to a VBScript variant (since VBScript doesn't
> support types).

> VBScript now says it's not an object, IsObject() evaluates to false and
> calling its properties/methods don't work. But when passed back to C# it
is
> seen as the class type that was given to it (in this case,
> System.Xml.XmlDocument).

> Is there any way to get VBScript to see this variant as the full-blown C#
> object that it is?

This isn't a VBScript, C# or .NET newsgroup, they don't come much more off
topic than this..  Please re-post this to a more relevant group, thank you..

    Mike

 -- EDais --

 - Microsoft Visual Basic MVP -
WWW: Http://EDais.earlsoft.co.uk/




Sat, 02 Jul 2005 09:51:28 GMT  
 VBScript doesn't see C# object as object

Quote:
> This isn't a VBScript, C# or .NET newsgroup, they don't come much more off
> topic than this..  Please re-post this to a more relevant group, thank

you..

I cross-posted to the vb.general.discussion group intentionally because VB6
does support variants and I believe, and still believe, COM automation and
VB6/VBScript handling of variants are the same. I want the VB6 crowd to help
me here. Don't like it, don't reply.

Jon



Sat, 02 Jul 2005 11:46:10 GMT  
 VBScript doesn't see C# object as object

Quote:

> > This isn't a VBScript, C# or .NET newsgroup, they don't come much more off
> > topic than this..  Please re-post this to a more relevant group, thank
> you..

> I cross-posted to the vb.general.discussion group intentionally because VB6
> does support variants and I believe, and still believe, COM automation and
> VB6/VBScript handling of variants are the same. I want the VB6 crowd to help
> me here. Don't like it, don't reply.

Ridiculous...

Just exactly how is anybody from VB6 going to
post a VB classic response to your question?

Its like saying "my spam is important to you even if
you don't want it. And if you don't then don't act on it."

Les F.
Even though I read this thread in OutlookExpress,
I did not crosspost this reply to
microsoft.public.windows.inetexplorer.ie5.outlookexpress



Sat, 02 Jul 2005 13:57:11 GMT  
 VBScript doesn't see C# object as object
Re-posted to avoid the VB6 group flamings
_______________________________

In VBScript I request a class (in this case, System.Xml.XmlDocument) from C#
via COM. C# passes it as type "object" from a C# method intended to be
generic, and it's assigned to a VBScript variant (since VBScript doesn't
support types).

VBScript now says it's not an object, IsObject() evaluates to false and
calling its properties/methods don't work. But when passed back to C# it is
seen as the class type that was given to it (in this case,
System.Xml.XmlDocument).

Is there any way to get VBScript to see this variant as the full-blown C#
object that it is?

Jon



Sat, 02 Jul 2005 13:53:11 GMT  
 VBScript doesn't see C# object as object

Quote:
> Just exactly how is anybody from VB6 going to
> post a VB classic response to your question?

Because the concept of dealing with variants and COM objects is identical.

Jon



Sat, 02 Jul 2005 13:54:19 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. VBScript doesn't work with page objects ?

2. VBScript doesn't work with page objects ?

3. Kludge: C# classes, Object types, and VBScript Variants

4. Interactive Scripting Console (Was Re: Kludge: C# classes, Object types, and VBScript Variants)

5. Interactive Scripting Console (Was Re: Kludge: C# classes, Object types, and VBScript Variants)

6. Object doesn't support this property or method : 'DTSGlobalVariables(...).Value.Open

7. How to get object from object's ID in vbscript

8. Advanced : Excel doesn't close when i release it's object

9. VBScript-fault: object is needed:'txtName'

10. Microsoft VBScript runtime (0x800A01A8) - Object required: ''

11. Object doesn't support this property or method

12. Object doesn't support this property/method??????

 

 
Powered by phpBB® Forum Software