The "raw" core VBA/VB6 functions work in the same way as you would call the native Win32 API functions from VB6. You must use the correct variable types and must pre-dimension strings and byte arrays that are to receive output or you will suffer the wrath of the great god Gee-pee-eff.
All the functions that output to a string or byte array, or take input as byte arrays, are now available in much more convenient wrapper functions.
Using the wrapper functions means you do not have to worry about the pre-dimensioning and other hassles with passing references to bytes arrays described in the following sections. Instead, go directly to Notes on VBA wrapper functions.