Results 1 to 15 of 15

Thread: [VB6] Problem Using CopyMemory API to Get Collection Keys

Threaded View

  1. #10
    PowerPoster dilettante's Avatar
    Join Date
    Feb 2006
    Posts
    24,487

    Re: [VB6] Problem Using CopyMemory API to Get Collection Keys

    Looks interesting and potentially useful. Once you go through the process it all looks simple enough that we'll probably each tend to hack out our own renditions. Mine is basically the same as other code above with some personal choices included.

    I think my Key() As String function will prove far more useful and error-free than my Keys() As String() function. I say that mainly because Collections are rarely unchanging over the life of a program so caching Keys() and using it could result in hard to track down program bugs.

    For that matter it is still faster to use error trapping instead of implementing a "Does Key Exist In Collection?" function by grabbing an array of keys and searching it. Well, except for very small Collections.


    As for where the critical information came from...

    Well it is possible that somebody worked it out by dumping memory and some trial and error. But what I suspect is that some time in the distant past some Microsoft Partner was fed the information by Microsoft, and this somehow managed to leak. The leak could have been somebody who happened to see some Partner-developed code, or maybe some Partner employee leaked it.

    I doubt it was ever meant to reach the masses. The Declare signatures for entrypoints in various VB runtimes probably leaked in a similar manner.
    Attached Files Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width