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 / C++ / MFC
  4. invoke an MFC callback function from Non MFC app

invoke an MFC callback function from Non MFC app

Scheduled Pinned Locked Moved C / C++ / MFC
questionc++
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
    shreelak
    wrote on last edited by
    #1

    Hi i need to call invoke an mfc callback function from a non mfc dll. How do I that? any samples that I can look at? Shree

    L 1 Reply Last reply
    0
    • S shreelak

      Hi i need to call invoke an mfc callback function from a non mfc dll. How do I that? any samples that I can look at? Shree

      L Offline
      L Offline
      led mike
      wrote on last edited by
      #2

      shreelak wrote:

      How do I that?

      More specific information is required. However you cannot use any C++ class (MFC included) across modules unless the class is exported from a DLL. I have no idea if that is what you are looking for.

      "Just about every question you've asked over the last 3-4 days has been "urgent". Perhaps a little planning would be helpful?"
      Colin Angus Mackay in the C# forum

      led mike

      S 1 Reply Last reply
      0
      • L led mike

        shreelak wrote:

        How do I that?

        More specific information is required. However you cannot use any C++ class (MFC included) across modules unless the class is exported from a DLL. I have no idea if that is what you are looking for.

        "Just about every question you've asked over the last 3-4 days has been "urgent". Perhaps a little planning would be helpful?"
        Colin Angus Mackay in the C# forum

        led mike

        S Offline
        S Offline
        shreelak
        wrote on last edited by
        #3

        yes what i meant was that MFC callback function is in a DLL and I can call other functions (not callback) from my calling program (non mfc dll) without any problem. but when my non mfc dll tries to invoke the callback it doesn't get called the same thing when called from an MFC program works fine. So my question was is there some thing different that i need to do when i call it from a non mfc app? like may be sometime of memory mapping? is there any sample code that i can look at? -S

        L 1 Reply Last reply
        0
        • S shreelak

          yes what i meant was that MFC callback function is in a DLL and I can call other functions (not callback) from my calling program (non mfc dll) without any problem. but when my non mfc dll tries to invoke the callback it doesn't get called the same thing when called from an MFC program works fine. So my question was is there some thing different that i need to do when i call it from a non mfc app? like may be sometime of memory mapping? is there any sample code that i can look at? -S

          L Offline
          L Offline
          led mike
          wrote on last edited by
          #4

          shreelak wrote:

          but when my non mfc dll tries to invoke the callback it doesn't get called

          What does that mean? When you debug the application it just steps over the function without the function executing? Is there an exception? An error reported? what?

          S 1 Reply Last reply
          0
          • L led mike

            shreelak wrote:

            but when my non mfc dll tries to invoke the callback it doesn't get called

            What does that mean? When you debug the application it just steps over the function without the function executing? Is there an exception? An error reported? what?

            S Offline
            S Offline
            shreelak
            wrote on last edited by
            #5

            yes it seems like it steps over When i try to go in to the assembly code it show me a ref to the callback function but doesn't jump to it. instead it comesback to my calling functions next statement. I don't get any exception. Also I cut and pasted the same code into another applicaiton (MFC) and it works without any problem. TIA -S

            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