
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 _

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 _

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)

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

‘ write a value of any type in memory” The value is written in the format of the value passed’ as the second argument, but you can overwrite it by

‘ Evaluate the Easter date for a given yearFunction EasterDate(ByVal Year As Integer) As Date Dim G As Integer Dim C As Integer Dim H As Integer Dim i As

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

Private Declare Sub CopyMemory Lib “kernel32” Alias “RtlMoveMemory” (dest As _ Any, source As Any, ByVal bytes As Long)’ write a byte into memorySub PokeB(ByVal address As Long, ByVal value

Private Declare Sub CopyMemory Lib “kernel32” Alias “RtlMoveMemory” (dest As _ Any, source As Any, ByVal bytes As Long)’ read a byte from memoryFunction PeekB(ByVal address As Long) As Byte

A global function may be declared inline. If you use the same function in different development environments, e.g., C and C++, you can hide the “inline” keyword from a C