|
-
Nov 13th, 2000, 08:19 AM
#1
Thread Starter
Addicted Member
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 rivate 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
-
Nov 13th, 2000, 02:34 PM
#2
Hyperactive Member
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!
-vbuser1976 
VB6 Enterprise SP6
SQL 7.0 SP2
VBScript, HTML, Javascript, C++, a little UNIX
-
Nov 14th, 2000, 02:56 AM
#3
Thread Starter
Addicted Member
Thanks
Thanks for your help
Efrat
[email protected]
-
Nov 14th, 2000, 08:47 AM
#4
Hyperactive Member
Hi!
Your welcome and Good Luck!
-vbuser1976 
VB6 Enterprise SP6
SQL 7.0 SP2
VBScript, HTML, Javascript, C++, a little UNIX
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|