Jump to content

nashie

Active Members
  • Posts

    6
  • Joined

  • Last visited

Posts posted by nashie

  1. Task manager can show you how much memory a proccess is using.

    Thanks SomethingToChatWith. I did consider this but as I need to test memory usage by pslist, tlist and a host of other apps, either they simply don't show up in process manager or appear so quicly, I can't screen print the details which I need for a paper. I am using XP rather than Vista. The latter shows much more in Task Manager but again it is not always possible to capture the data.

    I have code for a Process Memory Counter, but it will not complie correctly and unfortunately I don't know enough to figure out what the problems are.

    This is the code I have:

    #include <windows.h>

    #include <stdio.h>

    #include <psapi.h>

    void PrintMemoryInfo( DWORD processID )

    {

    HANDLE hProcess;

    PROCESS_MEMORY_COUNTERS pmc;

    // Print the process identifier.

    printf( "\nProcess ID: %u\n", processID );

    // Print information about the memory usage of the process.

    hProcess = OpenProcess( PROCESS_QUERY_INFORMATION |

    PROCESS_VM_READ,

    FALSE, processID );

    if (NULL == hProcess)

    return;

    if ( GetProcessMemoryInfo( hProcess, &pmc, sizeof(pmc)) )

    {

    printf( "\tPageFaultCount: 0x%08X\n", pmc.PageFaultCount );

    printf( "\tPeakWorkingSetSize: 0x%08X\n",

    pmc.PeakWorkingSetSize );

    printf( "\tWorkingSetSize: 0x%08X\n", pmc.WorkingSetSize );

    printf( "\tQuotaPeakPagedPoolUsage: 0x%08X\n",

    pmc.QuotaPeakPagedPoolUsage );

    printf( "\tQuotaPagedPoolUsage: 0x%08X\n",

    pmc.QuotaPagedPoolUsage );

    printf( "\tQuotaPeakNonPagedPoolUsage: 0x%08X\n",

    pmc.QuotaPeakNonPagedPoolUsage );

    printf( "\tQuotaNonPagedPoolUsage: 0x%08X\n",

    pmc.QuotaNonPagedPoolUsage );

    printf( "\tPagefileUsage: 0x%08X\n", pmc.PagefileUsage );

    printf( "\tPeakPagefileUsage: 0x%08X\n",

    pmc.PeakPagefileUsage );

    }

    CloseHandle( hProcess );

    }

    int main( )

    {

    // Get the list of process identifiers.

    DWORD aProcesses[1024], cbNeeded, cProcesses;

    unsigned int i;

    if ( !EnumProcesses( aProcesses, sizeof(aProcesses), &cbNeeded ) )

    return 1;

    // Calculate how many process identifiers were returned.

    cProcesses = cbNeeded / sizeof(DWORD);

    // Print the memory usage for each process

    for ( i = 0; i < cProcesses; i++ )

    PrintMemoryInfo( aProcesses );

    return 0;

    }

    Anyone have any ideas please?

    Thanks for looking...

  2. Okay, firstly I'm not a coder! So why am I in this forum you may ask?

    Well, I need an app that will calculate how much memory a particular application is using (such as pslist.exe etc.) when running in volatile memory.

    I have looked all over the place and found some C# code which I tried in vain to compile only to receive millions (okay 10) errors.

    I'm not expecting anyone to write it for me but just to point me in the right direction please.

    Any ideas on the subject would be gratefully received.

    Apologies if I shouldn't be asking this of you...

    Thanks in advance.

  3. What did you google for then?

    I googled for "PST File format".

    The first item found was a link to Wikipedia: http://en.wikipedia.org/wiki/.pst

    In that Wikipedia article under Support it links to the libpst project which is here: http://www.five-ten-sg.com/libpst/

    At the bottom of that page it reads "outlook.pst - format of MS Outlook .pst file" which links to here: http://www.five-ten-sg.com/libpst/rn01re06.html.

    And there you have a pretty extensive description of the file format.

    Now was that really so hard to do?

    Hey, thanks for the sarcasm Cooper. I have found those, but I was wondering if there is more out there though. I have data structures coming out my ears! Whilst I know the structures exist, there isn't much there to tell you why... that is the issue I have at the moment.

    Can't wait for your reply to this one!

  4. I posted it to general questions but think it should probably have gone here!

    Does anyone know how to parse PST files please? I would like reliable information in relation to the PST file structure. Any resources or documentation source/s would be greatly appreciated. I've tried Googling and all that jazz but nothing useful. I need the structure rather than reading the content as this will at some point be incorporated into an application which needs to extract all emails and their attachments.

    Thanks in advance

    Dave

  5. Does anyone know how to parse PST files please? I would like reliable information in relation to the PST file structure. Any resources or documentation source/s would be greatly appreciated. I've tried Googling and all that jazz but nothing useful. I need the structure rather than reading the content as this will at some point be incorporated into an application which needs to extract all emails and their attachments.

    Thanks in advance

    Dave

×
×
  • Create New...