Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7554815
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T11:26:27+00:00 2026-05-30T11:26:27+00:00

im making a task manager application (server-client) .. so i get processors list from

  • 0

im making a task manager application (server-client) .. so i get processors list from the server as a string.
my problem that 60-65% of processors count is failed to get in the server side as you see in the task manager snapshot .. note that server application debugged as administrator
Server code:

public void GetProcessors()
    {
        int i =0,j = 0;
        string answer = "";
        foreach (Process p in Process.GetProcesses())
        {
            try
            {
                answer += p.MainModule.ModuleName
                + "|" + p.Id.ToString()
                + "|" + string.Format("{0:N0} K", p.WorkingSet64 / 1024)
                + "|" + p.MainModule.FileVersionInfo.FileDescription;
                i++;
                answer += "?";
            }
            catch 
            {
                j++;
            }
        }
        answer = answer.Remove(answer.Length - 1, 1);
        send(string.Format("get<{0}<{1}<{2}", answer, i, j));
    }

Client side:
this called the getProcessors method from task manager class

switch(command[1])
                    {
                        case "get":
                            Console.WriteLine(command[2]);
                            if (InvokeRequired)
                            {
                                Action a = () => taskManager1.GetProcessors(command[2], command[3], command[4]);
                                Invoke(a);
                            }
                            break;
                        default:
                        break;
                    }

(client side) TASK MANAGER CLASS :

public void GetProcessors(string cmd,string success,string fail)
    {
        string[] Processors = cmd.Split('?');
        foreach (string process in Processors)
        {
            string[] info = process.Split('|');
            if (info.Length < 4)
            {
                MessageBox.Show(info.Length.ToString());
                continue;
            }
            ListViewItem item = new ListViewItem(info[0]);
            item.SubItems.Add(info[1]);
            item.SubItems.Add(info[2]);
            item.SubItems.Add(info[3]);
            listView1.Items.Add(item);
        }
        labelProcess.Text = string.Format("Processors: {0}", success);
        failedLabel.Text = string.Format("Failed: {0}", fail);
    }

enter image description here

i got those exception
85 FAILS : 83 are {“A 32 bit processes cannot access modules of a 64 bit process.”}
the other 2 FAILS : {“Unable to enumerate the process modules.”}

after i edited the code and tried to run it without using Process.MainModule .. it gives me:
process : 147 .. FAIL : 0 .. so why i can’t access to process.MainModule ?

How do i fix that ??

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T11:26:29+00:00Added an answer on May 30, 2026 at 11:26 am

    After i changed my application debugger to x64 it works .. but i think now i have to make two copies 32bit and 64bit
    …enter image description here

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm making a task-based program that needs to have plugins. Tasks need to have
I have a schedule task that is making a webrequest. This was all working
I have an application I am making that creates a large number of windows
I'm making a WPF application using MVVM pattern. I found sometimes Task is significantly
I'm new to programing and was given a task of making a function that
I'm making a basic task list using localStorage & Contenteditable and when I hit
I have a a wait form FormWait (long running task notification), that has ShowMessage(string
I've been assigned the task of making our Java web application work with Oracle
I am trying to accomplish the task of Making a Web request ->getting result
Making an adobe flex ui in which data that is calculated must use proprietary

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.