Giter Club home page Giter Club logo

vbwerx's Introduction

VBWERX

VB6 Library

  • VB6.tlb - Visual Basic Advanced Extensions Typelib (required for all projects, missing Keywords/Functions/Interfaces)
  • AryMap.cls - Point an Array to any Memory Address
  • MCollection.bas - Collection Helper routines
  • Stringbuilder.cls - StringBuilder class
  • MMultiForm.bas - Open Multiple Copies of the same form in MS Access
  • MStartup.bas - VB6 Sub Main() for use with all new VB6 Projects.

vbwerx's People

Contributors

dexwerx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

xxdoc chrisnice89

vbwerx's Issues

MEnumerator.bas: generalization of access to .Enumerable - any interest?

I have to say that MEnumerator.bas is truly a thing of beauty. Thank you for writing and releasing it!

As part of an SO answer, I adapted it slightly to use a named interface, and to support unlimited (?) item counts. Would you have any interest in hosting that version alongside the present one? If so, I'm happy to submit a PR of the linked code.

Please explain PtrAdd

Private Function PtrAdd(ByVal Pointer As Long, ByVal Offset As Long) As Long
Const SIGN_BIT As Long = &H80000000
PtrAdd = (Pointer Xor SIGN_BIT) + Offset Xor SIGN_BIT
End Function

Can you please explain the use of this function? I don't see any functionality here. I tried it with huge pointer values where high bit is set. When I set a 32bit long in memory and set the bytes manually and I add 2 I get the same results like your code returns without additional XOr-ing

Dim pMem As Long

pMem = CoTaskMemAlloc(4)
MemByte(pMem) = 10
MemByte(pMem + 1) = 255
MemByte(pMem + 2) = 255
MemByte(pMem + 3) = 255

Debug.Print MemLong(pMem) 'it returns -246

'Add 2 to the low byte of long
MemByte(pMem) = 12

Debug.Print MemLong(pMem) 'it returns -244, which is in fact -246+2

Dim PtrAdd As Long

PtrAdd = (-246& Xor &H80000000) + 2& Xor &H80000000

Debug.Print PtrAdd  'returns as well -244

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.