-
Hi My Friends
I have a big big Problem .
In ASP page i have ..CreatObject(Dllname )..
In VB I have function
private Function ppSet(InputMap As Map, OutputMap As Map) As Boolean
When i try that its fail i got TYPE MISMATCH
But if i change it to :private Function ppSet(ByValInputMap As Map,ByVal OutputMap As Map) As Boolean ...its work ...
Why whaen i use ByRef its fail and when im use ByVal its work..
What the difference ? (In Object)
Thnsk
Efrat
-
Okay...
When you pass an argument byRef or by reference, you are passing a pointer to the location in which the variable is stored, which means that if the value changes within the procedure, the change also affects the value outside the procedure.
When you pass an argument byVal or by value, you are passing a copy of the value itself, which means that if the value changes within the procedure, the change does not affect the original value.
Now, in response to your question, since the arguments that you are passing are objects not values, when you pass byRef, it is only passing a pointer to the object, not the object itself or a copy of the object. That is why you are getting the type mismatch when you use byRef instead of ByVal.
I hope this helps you. Good luck!
-
Thanks
Thanks for your help
Efrat
[email protected]
-
Hi!
Your welcome and Good Luck!