Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


Tip of the Day
Language: VB4/32,VB5,VB6
Expertise: Intermediate
Jun 17, 2000

PeekB, PeekI, PeekL - Read a byte, integer or long from memory

Private Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (dest As _
    Any, source As Any, ByVal bytes As Long)

' read a byte from memory

Function PeekB(ByVal address As Long) As Byte
    CopyMemory PeekB, ByVal address, 1
End Function

' read an integer from memory

Function PeekI(ByVal address As Long) As Integer
    CopyMemory PeekI, ByVal address, 2
End Function

' read a Long value from memory

Function PeekL(ByVal address As Long) As Long
    CopyMemory PeekL, ByVal address, 4
End Function

Francesco Balena
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap