Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Proper way to pass an object
Message
From
10/01/2007 00:57:13
 
 
To
All
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Title:
Proper way to pass an object
Environment versions
Environment:
VB 8.0
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01184064
Message ID:
01184064
Views:
57
I have something weird when trying to pass an object to a method.

If I have this:
        Dim loParameterClass(1) As Object

        loParameterClass(0) = oApp
        loParameterClass(1) = Me
and use this object later on down the code, it will work. But, if I pass this object to a method like this:
            ' Execute the method
            If Not ExecuteMethodFromClass(oApp.cStartupDirectory + "Robot.exe", "Robot", _
             loRow("Class"), loRow("Method"), loParameterClass) Then
                Return False
            End If
and, the method is declared like this:
Public Function ExecuteMethodFromClass(ByVal tcAssembly As String, _
     ByVal tcNamespace As String, ByVal tcClass As String, _
     ByVal tcMethod As String, ByVal toParameter As Object) As Boolean
In that method, I cannot make use of the toParameter object. It seems I have a problem in the declaration. So, basically, what is the proper way of passing such an object to the method and have it recognized as is inside the method?
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Next
Reply
Map
View

Click here to load this message in the networking platform