DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2005
    Oklahoma, USA

    Checking memory in use by program


    Can anyone tell me of a way to access the current memory being used by a selected program?

    I would like to be able to see how big a program is when running.

    Thanks in advance.

  2. #2
    Join Date
    Jul 2005

    Thumbs up Dangerousely Powerfull !!!

    Hi there,

    First of all whatever you're about to interfear in is the most fragile part of your computer.Even if you mishandle the functions I'm about to tell you then you may loss you BIOS.

    VB runtime libraries (msvbvm50(60).dll) allows direct access to a memory address. Using them, you can read data directly from memory. Unfortunately, you can not access some memory addresses (BIOS addresses for example) under NT/2000.

    Private Declare Sub GetMem1 Lib "msvbvm50.dll" (ByVal MemAddress As Long, var As Byte)
    'You can read Integer (2 bytes), Long and LongInteger variables
    'using GetMem2, GetMem4 and GetMem8 functions
    Private Declare Sub GetMem2 Lib "msvbvm50.dll" (ByVal MemAddress As Long, var As Integer)
    Private Declare Sub GetMem4 Lib "msvbvm50.dll" (ByVal MemAddress As Long, var As Long)
    'API has LongInteger var type 8 bytes long (FileTime is a _
    ' sample), VB has not

    if you're even interested in this work, then let me know I'll supply you more code to acually use these API's...

    Asim Siddiqui,

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
Latest Articles
Questions? Contact us.
Web Development
Latest Tips
Open Source

   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center

We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.