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. Control not coming to the new method after .odl modification? [modified]

Control not coming to the new method after .odl modification? [modified]

Scheduled Pinned Locked Moved C / C++ / MFC
csharpc++comdockerhelp
2 Posts 1 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
    SIJUTHOMASP
    wrote on last edited by
    #1

    Hi, I had to modify the .odl file for adding one more method. Any idea why its not coming to the newmethod while debugging..I have checked the MIDl and the tlb is created file with res. test.odl dispinterface _programctrl { [id(30)] boolean newmethod(BSTR var1,BSTR var2, BSTR var3, BSTR var4, BSTR var5); } The method is coming fine when I have tested on the activextest container but the problem is when I invoke the method it is not coming to the program while debugging..I have opted 30 as id random number.id[30] I have called the method like this testpgm.cpp DISP_FUNCTION(testcontrl, "newmethod", newmethod, VT_BOOL, VTS_BSTR VTS_BSTR VTS_BSTR VTS_BSTR VTS_BSTR) // BOOL testpgm::newmethod(LPCTSTR var1,LPCTSTR var2,LPCTSTR var3,LPCTSTR var4,LPCTSTR var5) { return TRUE; } testpgm.h dispidnewmethod = 30L Thanks, Rahul..

    SoftwareDeveloper(.NET)

    modified on Sunday, April 26, 2009 9:11 AM

    S 1 Reply Last reply
    0
    • S SIJUTHOMASP

      Hi, I had to modify the .odl file for adding one more method. Any idea why its not coming to the newmethod while debugging..I have checked the MIDl and the tlb is created file with res. test.odl dispinterface _programctrl { [id(30)] boolean newmethod(BSTR var1,BSTR var2, BSTR var3, BSTR var4, BSTR var5); } The method is coming fine when I have tested on the activextest container but the problem is when I invoke the method it is not coming to the program while debugging..I have opted 30 as id random number.id[30] I have called the method like this testpgm.cpp DISP_FUNCTION(testcontrl, "newmethod", newmethod, VT_BOOL, VTS_BSTR VTS_BSTR VTS_BSTR VTS_BSTR VTS_BSTR) // BOOL testpgm::newmethod(LPCTSTR var1,LPCTSTR var2,LPCTSTR var3,LPCTSTR var4,LPCTSTR var5) { return TRUE; } testpgm.h dispidnewmethod = 30L Thanks, Rahul..

      SoftwareDeveloper(.NET)

      modified on Sunday, April 26, 2009 9:11 AM

      S Offline
      S Offline
      SIJUTHOMASP
      wrote on last edited by
      #2

      I have resolved the issue finally with the following changes to the code given.. What I found was the DISP_FUNCTION usage couldn't exactly trace the id of the method..Instead when I used DISP_FUNCTION_ID, it started working..I have noticed that the DISP_FUNCTION_ID call having a parameter option to pass dispid of the method as well..Not sure why the DISP_FUNCTION couldn't work but anyhow my issue got resolved with DISP_FUNCTION_ID.. Similarly in the .h file I have changed 30L to just 30. Rest all are same.. //changed part of the code in testpgm.cpp DISP_FUNCTION_ID(testcontrl, "newmethod",dispidnewmethod, newmethod, VT_BOOL, VTS_BSTR VTS_BSTR VTS_BSTR VTS_BSTR VTS_BSTR) //changed part in testpgm.h : public: enum{ dispidnewmethod = 30, .. Thanks,

      SoftwareDeveloper(.NET)

      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