devxlogo

June 17, 2000

StringFromBSTR – Convert a BSTR to a VB string

Private Declare Sub CopyMemory Lib “kernel32” Alias “RtlMoveMemory” (dest As _ Any, source As Any, ByVal bytes As Long)’ convert a BSTR into a VB StringFunction StringFromBSTR(ByVal pointer As Long)

The age of a person

You can quickly evaluate the age of a person using the following function: Function Age(BirthDate As Date, Optional CurrentDate As Variant) As Integer If IsMissing(CurrentDate) Then CurrentDate = Now Age

StringFromAddr – Read a string at a given address

Private Declare Sub CopyMemory Lib “kernel32” Alias “RtlMoveMemory” (dest As _ Any, source As Any, ByVal bytes As Long)Private Declare Function lstrlenA Lib “kernel32” (ByVal lpString As Long) As _

Peek – Read a value of any type from memory

Private Declare Sub CopyMemory Lib “kernel32” Alias “RtlMoveMemory” (dest As _ Any, source As Any, ByVal bytes As Long)’ read a value of any type from memoryFunction Peek(ByVal address As