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. Calling DLL method from multi-thread

Calling DLL method from multi-thread

Scheduled Pinned Locked Moved C / C++ / MFC
c++help
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.
  • S Offline
    S Offline
    shakumar_21
    wrote on last edited by
    #1

    HI, I'm updating my C++ application in to multi thread application in VisualStudio 2013. In main(), thread's was created by CreateThread()and inside the thread's classA ObjA(); was created & called the function. In the classA it call another dll method. Dll was include in to the project through properties->Linker. Problem was when objA called dll method , application throws access violation reading location. But without multi-thread it works normal. Accessing dll method from multi-thread is same way as normal or any other things needed for accessing. Thanks in Advance.

    L V 2 Replies Last reply
    0
    • S shakumar_21

      HI, I'm updating my C++ application in to multi thread application in VisualStudio 2013. In main(), thread's was created by CreateThread()and inside the thread's classA ObjA(); was created & called the function. In the classA it call another dll method. Dll was include in to the project through properties->Linker. Problem was when objA called dll method , application throws access violation reading location. But without multi-thread it works normal. Accessing dll method from multi-thread is same way as normal or any other things needed for accessing. Thanks in Advance.

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      You need to use the debugger to check exactly what caused the access violation. Are you sure the DLL is totally thread-safe?

      1 Reply Last reply
      0
      • S shakumar_21

        HI, I'm updating my C++ application in to multi thread application in VisualStudio 2013. In main(), thread's was created by CreateThread()and inside the thread's classA ObjA(); was created & called the function. In the classA it call another dll method. Dll was include in to the project through properties->Linker. Problem was when objA called dll method , application throws access violation reading location. But without multi-thread it works normal. Accessing dll method from multi-thread is same way as normal or any other things needed for accessing. Thanks in Advance.

        V Offline
        V Offline
        Victor Nijegorodov
        wrote on last edited by
        #3

        What is a type of your project? What is a type of a DLL?

        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