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. dll problem

dll problem

Scheduled Pinned Locked Moved C / C++ / MFC
c++databasecomhelpannouncement
6 Posts 4 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.
  • M Offline
    M Offline
    manu_2205
    wrote on last edited by
    #1

    Hi I want to add a com dll in my c++ project. I also post this query before and one experts suggets me to use explicit linking and i follow the suggested steps.But now object of dll has been created but it disply exception. i psate the code here #import "Redemption.dll" no_namespace HRESULT In=CoInitialize(NULL); if ( SUCCEEDED ( In ) ) { IRDOSession* Session=NULL; iRDOStoresPtr ptr; HRESULT hr =CoCreateInstance( __uuidof(RDOSession), NULL, CLSCTX_INPROC_SERVER, //CLSCTX_LOCAL_SERVER, __uuidof(IRDOSession), (void**) &Session ); if ( SUCCEEDED ( hr ) ) { // Call methods using pISL here. //Session->Logon(" ",NULL,NULL,NULL,NULL,NULL); ptr=Session->Stores->AddPSTStore("c:\w.pst",NULL,"New"); } Session->Release(); CoUninitialize(); } the object is accessing all members but when called it display exception. Plz tell what the prblem is.I got confused.

    manu

    K G H 3 Replies Last reply
    0
    • M manu_2205

      Hi I want to add a com dll in my c++ project. I also post this query before and one experts suggets me to use explicit linking and i follow the suggested steps.But now object of dll has been created but it disply exception. i psate the code here #import "Redemption.dll" no_namespace HRESULT In=CoInitialize(NULL); if ( SUCCEEDED ( In ) ) { IRDOSession* Session=NULL; iRDOStoresPtr ptr; HRESULT hr =CoCreateInstance( __uuidof(RDOSession), NULL, CLSCTX_INPROC_SERVER, //CLSCTX_LOCAL_SERVER, __uuidof(IRDOSession), (void**) &Session ); if ( SUCCEEDED ( hr ) ) { // Call methods using pISL here. //Session->Logon(" ",NULL,NULL,NULL,NULL,NULL); ptr=Session->Stores->AddPSTStore("c:\w.pst",NULL,"New"); } Session->Release(); CoUninitialize(); } the object is accessing all members but when called it display exception. Plz tell what the prblem is.I got confused.

      manu

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

      manu_2205 wrote:

      ptr=Session->Stores->AddPSTStore("c:\w.pst",NULL,"New");

      Try to replace the \ character with a double backslash (\\) You should get at least a compiler warning, since escape-w isn't a valid escape character (or is it?). Stores->AddPSTStore("c:**\\**w.pst",NULL,"New");

      Alcohol. The cause of, and the solution to, all of life's problems - Homer Simpson

      M 1 Reply Last reply
      0
      • K kakan

        manu_2205 wrote:

        ptr=Session->Stores->AddPSTStore("c:\w.pst",NULL,"New");

        Try to replace the \ character with a double backslash (\\) You should get at least a compiler warning, since escape-w isn't a valid escape character (or is it?). Stores->AddPSTStore("c:**\\**w.pst",NULL,"New");

        Alcohol. The cause of, and the solution to, all of life's problems - Homer Simpson

        M Offline
        M Offline
        manu_2205
        wrote on last edited by
        #3

        I try Again it display exception. Even it has a Logon() function .It also disply run time error. I am not getting what the problem is . When i debug the application it open .tli file and disply exception.

        manu

        M 1 Reply Last reply
        0
        • M manu_2205

          I try Again it display exception. Even it has a Logon() function .It also disply run time error. I am not getting what the problem is . When i debug the application it open .tli file and disply exception.

          manu

          M Offline
          M Offline
          manu_2205
          wrote on last edited by
          #4

          I want to tell that IRDOSession :- is a interface RDOSession:-It is coclass

          manu

          1 Reply Last reply
          0
          • M manu_2205

            Hi I want to add a com dll in my c++ project. I also post this query before and one experts suggets me to use explicit linking and i follow the suggested steps.But now object of dll has been created but it disply exception. i psate the code here #import "Redemption.dll" no_namespace HRESULT In=CoInitialize(NULL); if ( SUCCEEDED ( In ) ) { IRDOSession* Session=NULL; iRDOStoresPtr ptr; HRESULT hr =CoCreateInstance( __uuidof(RDOSession), NULL, CLSCTX_INPROC_SERVER, //CLSCTX_LOCAL_SERVER, __uuidof(IRDOSession), (void**) &Session ); if ( SUCCEEDED ( hr ) ) { // Call methods using pISL here. //Session->Logon(" ",NULL,NULL,NULL,NULL,NULL); ptr=Session->Stores->AddPSTStore("c:\w.pst",NULL,"New"); } Session->Release(); CoUninitialize(); } the object is accessing all members but when called it display exception. Plz tell what the prblem is.I got confused.

            manu

            G Offline
            G Offline
            guestcat
            wrote on last edited by
            #5

            Hi manu, try passing BSTR or unicode strings as the parameter value. do not pass strings like "" etc, give some value like L"myValue".

            ^-^ @|@ - redCat

            1 Reply Last reply
            0
            • M manu_2205

              Hi I want to add a com dll in my c++ project. I also post this query before and one experts suggets me to use explicit linking and i follow the suggested steps.But now object of dll has been created but it disply exception. i psate the code here #import "Redemption.dll" no_namespace HRESULT In=CoInitialize(NULL); if ( SUCCEEDED ( In ) ) { IRDOSession* Session=NULL; iRDOStoresPtr ptr; HRESULT hr =CoCreateInstance( __uuidof(RDOSession), NULL, CLSCTX_INPROC_SERVER, //CLSCTX_LOCAL_SERVER, __uuidof(IRDOSession), (void**) &Session ); if ( SUCCEEDED ( hr ) ) { // Call methods using pISL here. //Session->Logon(" ",NULL,NULL,NULL,NULL,NULL); ptr=Session->Stores->AddPSTStore("c:\w.pst",NULL,"New"); } Session->Release(); CoUninitialize(); } the object is accessing all members but when called it display exception. Plz tell what the prblem is.I got confused.

              manu

              H Offline
              H Offline
              Hamid Taebi
              wrote on last edited by
              #6

              What function?Whats values of input this function and what return value?


              WhiteSky


              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