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. MFC Extension DLL

MFC Extension DLL

Scheduled Pinned Locked Moved C / C++ / MFC
csharpc++visual-studiodata-structuresdebugging
3 Posts 3 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.
  • O Offline
    O Offline
    orcun colak
    wrote on last edited by
    #1

    I have a MFC Extension Dll which contains a class that takes in a CTreeCtrl pointer. The class searches a string in the tree. From my main program when a call this class in debug mode it works ok but in release mode it crashes. I am using win 2k and visual studio 6.0. The message box that pops up at crash says reference memory which was null (or something like it I could not remember the exact message) When I move this class to the main executable's project it again works fine. Do I need to declare some macros in an extension dll before accessing and mfc object or can I pass around pointers freely between dlls as long as I am in the same thread ? Any help is appreciated. Orcun Colak

    V C 2 Replies Last reply
    0
    • O orcun colak

      I have a MFC Extension Dll which contains a class that takes in a CTreeCtrl pointer. The class searches a string in the tree. From my main program when a call this class in debug mode it works ok but in release mode it crashes. I am using win 2k and visual studio 6.0. The message box that pops up at crash says reference memory which was null (or something like it I could not remember the exact message) When I move this class to the main executable's project it again works fine. Do I need to declare some macros in an extension dll before accessing and mfc object or can I pass around pointers freely between dlls as long as I am in the same thread ? Any help is appreciated. Orcun Colak

      V Offline
      V Offline
      valikac
      wrote on last edited by
      #2

      Here is one reference. http://www.mindcracker.com/mindcracker/c\_cafe/dll/extn\_dll\_dlg.asp Kuphryn

      1 Reply Last reply
      0
      • O orcun colak

        I have a MFC Extension Dll which contains a class that takes in a CTreeCtrl pointer. The class searches a string in the tree. From my main program when a call this class in debug mode it works ok but in release mode it crashes. I am using win 2k and visual studio 6.0. The message box that pops up at crash says reference memory which was null (or something like it I could not remember the exact message) When I move this class to the main executable's project it again works fine. Do I need to declare some macros in an extension dll before accessing and mfc object or can I pass around pointers freely between dlls as long as I am in the same thread ? Any help is appreciated. Orcun Colak

        C Offline
        C Offline
        converdb
        wrote on last edited by
        #3

        Are you calling AFX_MANAGE_STATE macros at the very beginning of any exported function from the dll?? If you do not you may have problems sharing mfc resources and so on... Have a look on the wizard's comments added on the cpp file automaticaly created to content the CAPP derived object. hope to be useful Greetings... Just three words: void main(void)

        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