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. C / C++ / MFC
  4. Launch a thread in a dll

Launch a thread in a dll

Scheduled Pinned Locked Moved C / C++ / MFC
helptutorialquestion
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.
  • P Offline
    P Offline
    peter ho
    wrote on last edited by
    #1

    Hi! Can someone show me how to launch a thread in a dll? I kept get a message when I compile: "Error AfxBeginThread' : none of the 2 overloads can convert parameter 1 from type 'unsigned int'" thanks, peter.

    L N 2 Replies Last reply
    0
    • P peter ho

      Hi! Can someone show me how to launch a thread in a dll? I kept get a message when I compile: "Error AfxBeginThread' : none of the 2 overloads can convert parameter 1 from type 'unsigned int'" thanks, peter.

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

      Because parameter 1 is your function pointer, parameter 2 is the parameter pointer and parameter 3 is the ID (an int). Elaine :rose: The tigress is here :-D

      1 Reply Last reply
      0
      • P peter ho

        Hi! Can someone show me how to launch a thread in a dll? I kept get a message when I compile: "Error AfxBeginThread' : none of the 2 overloads can convert parameter 1 from type 'unsigned int'" thanks, peter.

        N Offline
        N Offline
        Neville Franks
        wrote on last edited by
        #3

        This is simply a code error that the compiler is complaining about, and has nothing to do with the code being in a DLL. Param 1 is either AFX_THREADPROC or CRuntimeClass* depending on which overload you are using. VC++ is saying you are passing an 'unsigned int' here. Neville Franks, Author of ED for Windows. www.getsoft.com Make money with our new Affilate program

        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