|
-
August 31st, 2011, 05:43 AM
#7
Re: Modify Object by reference
@David: Where a simple assignment fails, an increment would not work either.
Nevertheless I tried. Modification of the variable, although passed by ref, is not possible.
@Hannes: No, you simply swapped the premisses. You are passing the new values as arguments and your modify routine simply puts them to the so properties.
It's the other way round. The so properties must be passed to the modifying routine byref.
Fact is, the ModifyByRef() routine is part of a dll and I cannot change it. It expects two longs and will return some values in them to the VB caller. The dll is not aware of the so object.
I only made this sample as simple as possible to show what I mean.
In the object I use simple publics, because I don't need any procedural support, but also when having written get and let procedures like you did, there is no way I can pass a property to be modified byref to another sub, or so it seems.
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
|