Results 1 to 6 of 6

Thread: 2 Questions: Memory, E-Mail

  1. #1
    Guest

    Talking

    I have a couple of questions:
    • I'm using GlobalMemoryStatus to display a resource meter. It returns the status of three types of memory: Virtual Memory, Physical Memory, and Paging File.
      I know that the Physical Memory is actually the RAM, but how do I convert the other two to something more user-friendly?
    • What should I send to a mail server in order to check if there are any new messages? I don't need the actual messages, just the number of new messages.

    Thanks!

  2. #2
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    I only know a definite answer to your second question:
    This is for a POP3 mail server. First, try on Telnet using port "pop3" (110). It will return something like:
    Code:
    +OK hello from popgate
    At this point, send "user parksie" or something. It will then return:
    Code:
    +OK password required
    Then send "pass xxxx". If you're lucky, you'll get something like:
    Code:
    +OK maildrop ready, 0 messages (0 octets)
    (octets = bytes, since a byte is 8 bits)
    So basically, just check after sending that it returned "+OK" anything. You can just extract the first numerical value.
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  3. #3
    Guest
    Thanks parksie.
    So how do I convert this stuff to code if I'm using winsock?

  4. #4
    Guest
    And shouldn't it be encrypted somehow?
    I mean, I'm sending usernames and passwords just like that?
    I don't want to risk any information etc...

  5. #5
    Guru Yonatan's Avatar
    Join Date
    Apr 1999
    Location
    Israel
    Posts
    892
    Memory question:

    The page file is the swap file on the hard drive, which is basically the place where Windows stores data instead of using the RAM, for various reasons.

    dwTotalPageFile is the maximum size (in bytes) of the page file. (The page file will never be bigger, in bytes, than the number in dwTotalPageFile)
    dwAvailPageFile is the size (in bytes) of the unused portion of the page file. This means:
    dwTotalPageFile - dwAvailPageFile = the current size of the page file.

    The virtual memory is the space in the user mode portion of the virtual address space of the calling process.
    I don't want to even begin to think what that means.

    dwTotalVirtual is the total number of bytes that can be described in the user mode portion of the virtual address space of the calling process.
    dwAvailVirtual is the number of bytes of unreserved and uncommitted memory in the user mode portion of the virtual address space of the calling process.

    Whatever.

    You know what dwTotalPhys and dwAvailPhys is. (RAM)
    And dwMemoryLoad is how much "loaded" the CPU currently is. This is in percentage. A value of zero means no memory use, and a value of 100 means full memory use.

  6. #6
    Guest

    Thumbs up

    Thanks guys.
    For some reason dwAvailPhys always equals 0.

    [Edited by Sc0rp on 09-27-2000 at 04:22 PM]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width