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. Delegate Help

Delegate Help

Scheduled Pinned Locked Moved C#
csharpc++helptutorial
3 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.
  • J Offline
    J Offline
    JeremyLM
    wrote on last edited by
    #1

    I've search google exhaustively looking for some help with this and can't seem to find anything that has been productive. I have a Dynamic Link Library written in C++ which makes use of a callback: LRESULT CALLBACK eventListener(HWND hWnd, UINT msg, WPARAM wP, LPARAM lP) { ... } I'm trying to write a C# wrapper for this library and cannot seem to find the correct way to form the delegate to make use of the callback. If anyone could point me in the right direction or knows of an example that might be helpful, it would be very much appreciated.

    A 1 Reply Last reply
    0
    • J JeremyLM

      I've search google exhaustively looking for some help with this and can't seem to find anything that has been productive. I have a Dynamic Link Library written in C++ which makes use of a callback: LRESULT CALLBACK eventListener(HWND hWnd, UINT msg, WPARAM wP, LPARAM lP) { ... } I'm trying to write a C# wrapper for this library and cannot seem to find the correct way to form the delegate to make use of the callback. If anyone could point me in the right direction or knows of an example that might be helpful, it would be very much appreciated.

      A Offline
      A Offline
      aSarafian
      wrote on last edited by
      #2

      Your function resembled a lot some of the win32 user32.dll Look at www.pinvoke.net to get some ideas based on the functions of windows

      J 1 Reply Last reply
      0
      • A aSarafian

        Your function resembled a lot some of the win32 user32.dll Look at www.pinvoke.net to get some ideas based on the functions of windows

        J Offline
        J Offline
        JeremyLM
        wrote on last edited by
        #3

        I've looked there, but unfortunately, have only seen the delegate definition without any examples on implementing it. The only reference I've found that comes close is a newsgroup post with someone having the same trouble. Of course, his question went unanswered as well. Luck of the Irish at it's best. lol

        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