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

  • SEARCH
  • Home
  • 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 8387277
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T18:10:07+00:00 2026-06-09T18:10:07+00:00

Somebody could tell me how to declare winapi in c#? I’m having this error:

  • 0

Somebody could tell me how to declare winapi in c#?
I’m having this error:

Error   1   The name 'WinApi' does not exist in the current context bla bla bla...

in line:

 WinApi.OpenProcess(WinApi.PROCESS_ALL_ACCESS, 0, (uint)aProc[0]);
  • 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-06-09T18:10:08+00:00Added an answer on June 9, 2026 at 6:10 pm

    If you’re not using a library that provides those methods and constants, you’ll need to implement them yourself using Platform Invocation Services (P/Invoke).

    For example:

    public static class WinApi {
        public const int PROCESS_ALL_ACCESS = /* whatever the value is */;
    
        [DllImport("kernel32.dll")]
        public static extern IntPtr OpenProcess(int dwDesiredAccess,
            bool bInheritHandle, int dwProcessId);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Could somebody tell me why I'm getting blank rows after running this code? ...
This is probably very simple, but could somebody tell me how to get the
I would really appreciate if somebody could tell me why compilation of this program:
Could somebody tell me which drupal module is this site using: http://gallery.menalto.com/forum Also could
I stumbled upon this one-liner: [float(n)-50 for n in range(100)] Could somebody tell me
Could somebody tell me why this isn't adding the values to the database. The
Could somebody tell me the difference between: int *p; p=(int*)malloc(10*sizeof(int)); free(p); or int *p;
I'm implementing now CPU schedule algorithms FCFS, SJF and Round Robin. Could somebody tell
Could somebody please explain or link to a resource that will tell me why
UPDATE AT THE BOTTOM Maybe somebody could help with this... been struggling with it

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.