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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. Visual Basic
  4. What does this Code means?

What does this Code means?

Scheduled Pinned Locked Moved Visual Basic
question
5 Posts 2 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.
  • S Offline
    S Offline
    Said Ali Jalali
    wrote on last edited by
    #1

    :rose: Hi. Can someone explain what does this code mean??When i search for something in that code i see such thing with diffrent methods. It's really nice of you to explain what does it do?Why we use it?And where we must use this? Thank you.

    [DllImport("advapi32.dll", SetLastError = true, PreserveSig = true)]

    :rose: CanI

    D 1 Reply Last reply
    0
    • S Said Ali Jalali

      :rose: Hi. Can someone explain what does this code mean??When i search for something in that code i see such thing with diffrent methods. It's really nice of you to explain what does it do?Why we use it?And where we must use this? Thank you.

      [DllImport("advapi32.dll", SetLastError = true, PreserveSig = true)]

      :rose: CanI

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      This is the start of a declaration that imports a function from the advapi32.dll. The line is incomplete, so there's no way to tell what the function was. You use this if you want to call functions that are exported by library .DLL's, and not exposed through a COM interface. For example, you can import FindWindow and GetWindow from user32.dll to get a handle to another applications windows to do almost whatever you want with them.

      A guide to posting questions on CodeProject[^]
      Dave Kreskowiak

      S 2 Replies Last reply
      0
      • D Dave Kreskowiak

        This is the start of a declaration that imports a function from the advapi32.dll. The line is incomplete, so there's no way to tell what the function was. You use this if you want to call functions that are exported by library .DLL's, and not exposed through a COM interface. For example, you can import FindWindow and GetWindow from user32.dll to get a handle to another applications windows to do almost whatever you want with them.

        A guide to posting questions on CodeProject[^]
        Dave Kreskowiak

        S Offline
        S Offline
        Said Ali Jalali
        wrote on last edited by
        #3

        :rose: Thank you, I don't mean to explain just this line Code

        [DllImport("advapi32.dll", SetLastError = true, PreserveSig = true)]

        I mean totally what is Mean?And how to use and when to use??? Explain me like a teacher... Thank you. :rose: CanI

        D 1 Reply Last reply
        0
        • D Dave Kreskowiak

          This is the start of a declaration that imports a function from the advapi32.dll. The line is incomplete, so there's no way to tell what the function was. You use this if you want to call functions that are exported by library .DLL's, and not exposed through a COM interface. For example, you can import FindWindow and GetWindow from user32.dll to get a handle to another applications windows to do almost whatever you want with them.

          A guide to posting questions on CodeProject[^]
          Dave Kreskowiak

          S Offline
          S Offline
          Said Ali Jalali
          wrote on last edited by
          #4

          :rose: Thank you, I don't mean to explain just this line Code

          [DllImport("advapi32.dll", SetLastError = true, PreserveSig = true)]

          I mean totally what is this?And how to use and when to use it??? Explain me like a teacher... Thank you. :rose:

          1 Reply Last reply
          0
          • S Said Ali Jalali

            :rose: Thank you, I don't mean to explain just this line Code

            [DllImport("advapi32.dll", SetLastError = true, PreserveSig = true)]

            I mean totally what is Mean?And how to use and when to use??? Explain me like a teacher... Thank you. :rose: CanI

            D Offline
            D Offline
            Dave Kreskowiak
            wrote on last edited by
            #5

            I already did. I'm not writing up an entire lesson plan for you in a forum post. I gave you a starting point. This is where you start doing research and teaching yourself. Without that skill, you're not going to last long writing code.

            A guide to posting questions on CodeProject[^]
            Dave Kreskowiak

            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