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. COM
  4. COM dll connect to console client

COM dll connect to console client

Scheduled Pinned Locked Moved COM
comannouncement
2 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
    sheshidar
    wrote on last edited by
    #1

    hi this is suresh........... i have written a comdll using Win32 dynamic link library.so the dll has run without Bugs, next my client in console....... #include #include #include "iids.h" #include "interface.h" void main() { CoInitialize(NULL); I1* p1=NULL; HRESULT hr=CoCreateInstance(CLSID_D,NULL,CLSCTX_ALL,IID_I1,(void**)&p1); if(FAILED(hr)) { cout<<"sorry component cannot be created "<<endl; } p1->f1(); I2 *p2; p1->QueryInterface(IID_I2,(void**)&p2); p2->f2(); p1->Release(); p2->Release(); CoUninitialize(); } so finally i cannot co-create the component

    CPalliniC 1 Reply Last reply
    0
    • S sheshidar

      hi this is suresh........... i have written a comdll using Win32 dynamic link library.so the dll has run without Bugs, next my client in console....... #include #include #include "iids.h" #include "interface.h" void main() { CoInitialize(NULL); I1* p1=NULL; HRESULT hr=CoCreateInstance(CLSID_D,NULL,CLSCTX_ALL,IID_I1,(void**)&p1); if(FAILED(hr)) { cout<<"sorry component cannot be created "<<endl; } p1->f1(); I2 *p2; p1->QueryInterface(IID_I2,(void**)&p2); p2->f2(); p1->Release(); p2->Release(); CoUninitialize(); } so finally i cannot co-create the component

      CPalliniC Online
      CPalliniC Online
      CPallini
      wrote on last edited by
      #2

      And what was the error? :)

      If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
      This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke

      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