Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. C# accessing a windows api

C# accessing a windows api

Scheduled Pinned Locked Moved C#
questioncsharpjsontutorial
8 Posts 5 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    classy_dog
    wrote on last edited by
    #1

    I am writing a windows desktop application in C# 2010 that will be calling a windows api. The user will enter some information, hit the submit button, and the windows api will be called. My question is would you show me code on how to call the windows api, tell the windows api what you are looking for, and return any optional values obtained from the windows api?

    R L D 3 Replies Last reply
    0
    • C classy_dog

      I am writing a windows desktop application in C# 2010 that will be calling a windows api. The user will enter some information, hit the submit button, and the windows api will be called. My question is would you show me code on how to call the windows api, tell the windows api what you are looking for, and return any optional values obtained from the windows api?

      R Offline
      R Offline
      Ron Beyer
      wrote on last edited by
      #2

      This will give you just about any API info you need, with code[^]

      1 Reply Last reply
      0
      • C classy_dog

        I am writing a windows desktop application in C# 2010 that will be calling a windows api. The user will enter some information, hit the submit button, and the windows api will be called. My question is would you show me code on how to call the windows api, tell the windows api what you are looking for, and return any optional values obtained from the windows api?

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #3

        classy_dog wrote:

        show me code on how to call the windows api

        An impossible task, since the code for each function is unique to that function. Go to MSDN, search for the function you are interested in, and read the documentation.

        Use the best guess

        1 Reply Last reply
        0
        • C classy_dog

          I am writing a windows desktop application in C# 2010 that will be calling a windows api. The user will enter some information, hit the submit button, and the windows api will be called. My question is would you show me code on how to call the windows api, tell the windows api what you are looking for, and return any optional values obtained from the windows api?

          D Offline
          D Offline
          DaveyM69
          wrote on last edited by
          #4

          What functions in the Windows API are you wanting to call?

          Dave
          Binging is like googling, it just feels dirtier. Please take your VB.NET out of our nice case sensitive forum. Astonish us. Be exceptional. (Pete O'Hanlon)
          BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)

          C 1 Reply Last reply
          0
          • D DaveyM69

            What functions in the Windows API are you wanting to call?

            Dave
            Binging is like googling, it just feels dirtier. Please take your VB.NET out of our nice case sensitive forum. Astonish us. Be exceptional. (Pete O'Hanlon)
            BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)

            C Offline
            C Offline
            classy_dog
            wrote on last edited by
            #5

            I will get calling an windows api that another programmer at work is 'writing'? Should I ask her how to call the windows api?

            P D L 3 Replies Last reply
            0
            • C classy_dog

              I will get calling an windows api that another programmer at work is 'writing'? Should I ask her how to call the windows api?

              P Offline
              P Offline
              Pete OHanlon
              wrote on last edited by
              #6

              Unless you are working for Microsoft, the other programmer is not writing a Windows API. And yes, you should ask her how her "API" should be called.

              I was brought up to respect my elders. I don't respect many people nowadays.
              CodeStash - Online Snippet Management | My blog | MoXAML PowerToys | Mole 2010 - debugging made easier

              1 Reply Last reply
              0
              • C classy_dog

                I will get calling an windows api that another programmer at work is 'writing'? Should I ask her how to call the windows api?

                D Offline
                D Offline
                DaveyM69
                wrote on last edited by
                #7

                The Windows API is Microsoft's own API for windows that they provide to allow you to call functions within the OS: http://msdn.microsoft.com/en-us/library/windows/desktop/ff818516(v=vs.85).aspx[^] If someone else is writing a library and they are providing an API then they should be providing documentation for it's use.

                Dave
                Binging is like googling, it just feels dirtier. Please take your VB.NET out of our nice case sensitive forum. Astonish us. Be exceptional. (Pete O'Hanlon)
                BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)

                1 Reply Last reply
                0
                • C classy_dog

                  I will get calling an windows api that another programmer at work is 'writing'? Should I ask her how to call the windows api?

                  L Offline
                  L Offline
                  Lost User
                  wrote on last edited by
                  #8

                  classy_dog wrote:

                  Should I ask her how to call the windows api?

                  Let's dub it the "Classy API" :cool:

                  using System.Windows.Forms;
                  using Microsoft.Win32;
                  using Classy;
                  using Classy.Dog;
                  using Classy.Core;

                  Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^]

                  1 Reply Last reply
                  0
                  Reply
                  • Reply as topic
                  Log in to reply
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes


                  • Login

                  • Don't have an account? Register

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • World
                  • Users
                  • Groups