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. kernel32.dll

kernel32.dll

Scheduled Pinned Locked Moved C#
questioncsharp
9 Posts 4 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.
  • M Offline
    M Offline
    Mazdak
    wrote on last edited by
    #1

    I wanna use this dll in my project.How can I import dll in C#? :) Thanks Mazy "The path you tread is narrow and the drop is shear and very high, The ravens all are watching from a vantage point near by, Apprehension creeping like a choo-train uo your spine, Will the tightrope reach the end;will the final cuplet rhyme?"Cymbaline-Pink Floyd

    J R 2 Replies Last reply
    0
    • M Mazdak

      I wanna use this dll in my project.How can I import dll in C#? :) Thanks Mazy "The path you tread is narrow and the drop is shear and very high, The ravens all are watching from a vantage point near by, Apprehension creeping like a choo-train uo your spine, Will the tightrope reach the end;will the final cuplet rhyme?"Cymbaline-Pink Floyd

      J Offline
      J Offline
      James T Johnson
      wrote on last edited by
      #2

      [DllImport("kernel32.dll")] public/private static extern <function prototype here> James Simplicity Rules!

      J 1 Reply Last reply
      0
      • J James T Johnson

        [DllImport("kernel32.dll")] public/private static extern <function prototype here> James Simplicity Rules!

        J Offline
        J Offline
        James T Johnson
        wrote on last edited by
        #3

        Forgot to mention that you'll also have to reference the System.Runtime.InteropServices namespace to use the DllImport attribute James Simplicity Rules!

        1 Reply Last reply
        0
        • M Mazdak

          I wanna use this dll in my project.How can I import dll in C#? :) Thanks Mazy "The path you tread is narrow and the drop is shear and very high, The ravens all are watching from a vantage point near by, Apprehension creeping like a choo-train uo your spine, Will the tightrope reach the end;will the final cuplet rhyme?"Cymbaline-Pink Floyd

          R Offline
          R Offline
          Rupel
          wrote on last edited by
          #4

          hey mazi, when i look through this forum, i think it would be a good idea for you to buy the petzold-book. it is nice to read and full of information. just an idea ;) :wq

          M 1 Reply Last reply
          0
          • R Rupel

            hey mazi, when i look through this forum, i think it would be a good idea for you to buy the petzold-book. it is nice to read and full of information. just an idea ;) :wq

            M Offline
            M Offline
            Mazdak
            wrote on last edited by
            #5

            Hi Rupel I really appreciate your help, but i 've got a little problem here :( I live in IRAN, and there is no possibility for us to shop foreign books online (or even offline ;) ). but thanks anyways. :) Mazy "The path you tread is narrow and the drop is shear and very high, The ravens all are watching from a vantage point near by, Apprehension creeping like a choo-train uo your spine, Will the tightrope reach the end;will the final cuplet rhyme?"Cymbaline-Pink Floyd

            R 1 Reply Last reply
            0
            • M Mazdak

              Hi Rupel I really appreciate your help, but i 've got a little problem here :( I live in IRAN, and there is no possibility for us to shop foreign books online (or even offline ;) ). but thanks anyways. :) Mazy "The path you tread is narrow and the drop is shear and very high, The ravens all are watching from a vantage point near by, Apprehension creeping like a choo-train uo your spine, Will the tightrope reach the end;will the final cuplet rhyme?"Cymbaline-Pink Floyd

              R Offline
              R Offline
              Rupel
              wrote on last edited by
              #6

              oops. sorry. :( James T. seems to have CP run on his cellphone/pda anyway - so he is a good backup ;) but i really admire you're way to look at it: with a smile :) :wq

              J 1 Reply Last reply
              0
              • R Rupel

                oops. sorry. :( James T. seems to have CP run on his cellphone/pda anyway - so he is a good backup ;) but i really admire you're way to look at it: with a smile :) :wq

                J Offline
                J Offline
                James T Johnson
                wrote on last edited by
                #7

                Rüpel wrote: James T. seems to have CP run on his cellphone/pda anyway LOL! :) I'm just without a job at the moment so I spend a lot of time coding (with CP in the background) or reading CP. James Simplicity Rules!

                C 1 Reply Last reply
                0
                • J James T Johnson

                  Rüpel wrote: James T. seems to have CP run on his cellphone/pda anyway LOL! :) I'm just without a job at the moment so I spend a lot of time coding (with CP in the background) or reading CP. James Simplicity Rules!

                  C Offline
                  C Offline
                  Christian Graus
                  wrote on last edited by
                  #8

                  James T. Johnson wrote: I'm just without a job at the moment so I spend a lot of time coding (with CP in the background) or reading CP. Funny, because I *have* a job, I spend a lot of time coding with CP in the background..... ( Well, actually I do the same at home, so that's not quite true ) I'm trying to figure out how to improve my screensaver and I wonder if I can link to the dll that handles screensaver behaviour, and hijack the message loop to handle the messages I am supposed to. Does that sound viable to you ? The instructions in MSDN tell me to do this: Creating a module-definition file The ScreenSaverProc and ScreenSaverConfigureDialog functions must be exported in the application's module-definition file; RegisterDialogClasses should not be exported, however. The following example shows the module-definition file for the sample application. Can I *do* this in C# ? My main reason for wanting to is simply that as it stands I do not have multi monitor support and I can't see a way to find my other monitor/draw on it. Christian The tragedy of cyberspace - that so much can travel so far, and yet mean so little. "But there isn't a whole lot out there that pisses me off more than someone leaving my code looking like they leaned on the keyboard and prayed that it would compile. - Jamie Hale, 17/4/2002

                  J 1 Reply Last reply
                  0
                  • C Christian Graus

                    James T. Johnson wrote: I'm just without a job at the moment so I spend a lot of time coding (with CP in the background) or reading CP. Funny, because I *have* a job, I spend a lot of time coding with CP in the background..... ( Well, actually I do the same at home, so that's not quite true ) I'm trying to figure out how to improve my screensaver and I wonder if I can link to the dll that handles screensaver behaviour, and hijack the message loop to handle the messages I am supposed to. Does that sound viable to you ? The instructions in MSDN tell me to do this: Creating a module-definition file The ScreenSaverProc and ScreenSaverConfigureDialog functions must be exported in the application's module-definition file; RegisterDialogClasses should not be exported, however. The following example shows the module-definition file for the sample application. Can I *do* this in C# ? My main reason for wanting to is simply that as it stands I do not have multi monitor support and I can't see a way to find my other monitor/draw on it. Christian The tragedy of cyberspace - that so much can travel so far, and yet mean so little. "But there isn't a whole lot out there that pisses me off more than someone leaving my code looking like they leaned on the keyboard and prayed that it would compile. - Jamie Hale, 17/4/2002

                    J Offline
                    J Offline
                    James T Johnson
                    wrote on last edited by
                    #9

                    Christian Graus wrote: Can I *do* this in C# ? I don't think so, I'm pretty sure you'll have to use Managed C++ for this. I'm not sure if you can export a __gc method, but you can export a regular method which calls the __gc one. This is the real power of MC++, you can make calls to both sides easily :) James Simplicity Rules!

                    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