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. please help me!!!

please help me!!!

Scheduled Pinned Locked Moved C / C++ / MFC
helpc++tutorial
4 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.
  • R Offline
    R Offline
    rowdy_vc
    wrote on last edited by
    #1

    //Main.h __interface IFileIO : IDispatch { [id(1), helpstring("method GetFile")] HRESULT GetFile(); [id(2), helpstring("method getDirectory")] HRESULT GetDirectory(); }; class ATL_NO_VTABLE EDCService :public IFileIO { public: EDCService() { } DECLARE_PROTECT_FINAL_CONSTRUCT() HRESULT FinalConstruct() { return S_OK; } void FinalRelease() { } public: STDMETHOD(GetFile); STDMETHOD(GetDirectory); } Hi friends ... STDMETHOD(GetFile); STDMETHOD(GetDirectory); these two methods definitions are written main.cpp i doing so many try's to solve this prob..first i create instance of EDCService.like EDCService edcobj; then i create instance of EDCService like edcobj.CreateInstance(); but showing.. When i compile this code i get the follwing errors i dont know how was solve it error C2039: 'CreateInstance' : is not a member of 'EDCService' error C2259: 'EDCService' : cannot instantiate abstract class Please tell me how to solve this problem ..

    *****THANKS N ADVANCE**** Mathen.K (I WILL TRY MY LEVEL BEST )

    K R 2 Replies Last reply
    0
    • R rowdy_vc

      //Main.h __interface IFileIO : IDispatch { [id(1), helpstring("method GetFile")] HRESULT GetFile(); [id(2), helpstring("method getDirectory")] HRESULT GetDirectory(); }; class ATL_NO_VTABLE EDCService :public IFileIO { public: EDCService() { } DECLARE_PROTECT_FINAL_CONSTRUCT() HRESULT FinalConstruct() { return S_OK; } void FinalRelease() { } public: STDMETHOD(GetFile); STDMETHOD(GetDirectory); } Hi friends ... STDMETHOD(GetFile); STDMETHOD(GetDirectory); these two methods definitions are written main.cpp i doing so many try's to solve this prob..first i create instance of EDCService.like EDCService edcobj; then i create instance of EDCService like edcobj.CreateInstance(); but showing.. When i compile this code i get the follwing errors i dont know how was solve it error C2039: 'CreateInstance' : is not a member of 'EDCService' error C2259: 'EDCService' : cannot instantiate abstract class Please tell me how to solve this problem ..

      *****THANKS N ADVANCE**** Mathen.K (I WILL TRY MY LEVEL BEST )

      K Offline
      K Offline
      KASR1
      wrote on last edited by
      #2

      use smart pointers as below; EDCServicePtr edcobj; edcobj.CreateInstance(.......);

      R 1 Reply Last reply
      0
      • K KASR1

        use smart pointers as below; EDCServicePtr edcobj; edcobj.CreateInstance(.......);

        R Offline
        R Offline
        rowdy_vc
        wrote on last edited by
        #3

        Thanks 2 your replay .. i cant understand ..please tell me briefly and also how to use smart pointers..in my class

        *****THANKS N ADVANCE**** Mathen.K (I WILL TRY MY LEVEL BEST )

        modified on Monday, March 3, 2008 1:45 AM

        1 Reply Last reply
        0
        • R rowdy_vc

          //Main.h __interface IFileIO : IDispatch { [id(1), helpstring("method GetFile")] HRESULT GetFile(); [id(2), helpstring("method getDirectory")] HRESULT GetDirectory(); }; class ATL_NO_VTABLE EDCService :public IFileIO { public: EDCService() { } DECLARE_PROTECT_FINAL_CONSTRUCT() HRESULT FinalConstruct() { return S_OK; } void FinalRelease() { } public: STDMETHOD(GetFile); STDMETHOD(GetDirectory); } Hi friends ... STDMETHOD(GetFile); STDMETHOD(GetDirectory); these two methods definitions are written main.cpp i doing so many try's to solve this prob..first i create instance of EDCService.like EDCService edcobj; then i create instance of EDCService like edcobj.CreateInstance(); but showing.. When i compile this code i get the follwing errors i dont know how was solve it error C2039: 'CreateInstance' : is not a member of 'EDCService' error C2259: 'EDCService' : cannot instantiate abstract class Please tell me how to solve this problem ..

          *****THANKS N ADVANCE**** Mathen.K (I WILL TRY MY LEVEL BEST )

          R Offline
          R Offline
          Rajesh R Subramanian
          wrote on last edited by
          #4

          Can you please keep the subject line of your post descriptive? Anything other than PLZZZ HELP, URGENT HELP REQUIRED, PROGRAM NOT WORKING, etc? :|

          Nobody can give you wiser advice than yourself. - Cicero .·´¯`·->Rajesh<-·´¯`·. Codeproject.com: Visual C++ MVP

          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