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. CoInitializeEx()

CoInitializeEx()

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

    Hi All i need to call this CoInitializeEx() in my application. compiler giving error msg this error C2065: 'CoInitializeEx' : undeclared identifier i have include the respective heaer file "objbase.j" what i have to do compile ? thanks

    C 1 Reply Last reply
    0
    • S shadrach_india

      Hi All i need to call this CoInitializeEx() in my application. compiler giving error msg this error C2065: 'CoInitializeEx' : undeclared identifier i have include the respective heaer file "objbase.j" what i have to do compile ? thanks

      C Offline
      C Offline
      Cedric Moonen
      wrote on last edited by
      #2

      shadrach_india wrote:

      i have include the respective heaer file "objbase.j"

      I think this is a typo in your post but this is objbase.h Anyway, post the line of code where you call it, it's probably a typo.


      Cédric Moonen Software developer
      Charting control [Updated - v1.1]

      S 1 Reply Last reply
      0
      • C Cedric Moonen

        shadrach_india wrote:

        i have include the respective heaer file "objbase.j"

        I think this is a typo in your post but this is objbase.h Anyway, post the line of code where you call it, it's probably a typo.


        Cédric Moonen Software developer
        Charting control [Updated - v1.1]

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

        Inside the a thread BOOL CClientThread::InitInstance() { //CoInitialize(NULL); CoInitializeEx(NULL,COINIT_MULTITHREADED); m_TimeLock.Lock(); m_timeLastAction = CTime::GetCurrentTime(); m_TimeLock.Unlock(); // Attach the socket handle to a CSocket object. // This makes sure that the socket notifications are sent to this thread. m_ClientSocket.Attach(m_hSocket); m_ClientSocket.m_pThread = this; ---- ---- ---- }

        C 1 Reply Last reply
        0
        • S shadrach_india

          Inside the a thread BOOL CClientThread::InitInstance() { //CoInitialize(NULL); CoInitializeEx(NULL,COINIT_MULTITHREADED); m_TimeLock.Lock(); m_timeLastAction = CTime::GetCurrentTime(); m_TimeLock.Unlock(); // Attach the socket handle to a CSocket object. // This makes sure that the socket notifications are sent to this thread. m_ClientSocket.Attach(m_hSocket); m_ClientSocket.m_pThread = this; ---- ---- ---- }

          C Offline
          C Offline
          Cedric Moonen
          wrote on last edited by
          #4

          And what is your exact include directive ?


          Cédric Moonen Software developer
          Charting control [Updated - v1.1]

          S 1 Reply Last reply
          0
          • C Cedric Moonen

            And what is your exact include directive ?


            Cédric Moonen Software developer
            Charting control [Updated - v1.1]

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

            In Stdafx.h #define _WIN32_WINNT 0x0400 #define _ATL_FREE_THREADED #include -- modified at 9:48 Monday 6th November, 2006

            S 1 Reply Last reply
            0
            • S shadrach_india

              In Stdafx.h #define _WIN32_WINNT 0x0400 #define _ATL_FREE_THREADED #include -- modified at 9:48 Monday 6th November, 2006

              S Offline
              S Offline
              shadrach_india
              wrote on last edited by
              #6

              hi Problem solved

              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