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. Using ISyncMgrRegister

Using ISyncMgrRegister

Scheduled Pinned Locked Moved COM
c++comsaleshelpannouncement
4 Posts 3 Posters 1 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.
  • J Offline
    J Offline
    jparsons
    wrote on last edited by
    #1

    I'm trying to write my own customer SyncMgr component. I'm having some trouble loading up the ISyncMgrRegister object. I'm a little new to COM so I'm probably missing osmething obvious here. This is MC++ code. Can someone point me in the correct direction. #include "stdafx.h" #include "mobsync.h" #using using namespace System; int _tmain() { HRESULT hr = CoInitialize(NULL); if ( FAILED(hr) ) { Console::WriteLine(S"Cannot Initilaize com"); goto error; } ISyncMgrRegister *reg = NULL; hr = CoCreateInstance( CLSID_SyncMgr, NULL, CLSCTX_LOCAL_SERVER, IID_ISyncMgrRegister, reinterpret_cast(reg)); if ( FAILED(hr) ) { Console::WriteLine(S"Could not create an instance of the Sync Mgr"); goto error; } reg->Release(); Console::WriteLine(S"Press Enter to Exit"); Console::ReadLine(); return 0; error: Console::WriteLine(S"Press enter to exit"); Console::ReadLine(); return 1; } Jared jparsons@jparsons.org www.prism.gatech.edu/~gte477n

    M M 2 Replies Last reply
    0
    • J jparsons

      I'm trying to write my own customer SyncMgr component. I'm having some trouble loading up the ISyncMgrRegister object. I'm a little new to COM so I'm probably missing osmething obvious here. This is MC++ code. Can someone point me in the correct direction. #include "stdafx.h" #include "mobsync.h" #using using namespace System; int _tmain() { HRESULT hr = CoInitialize(NULL); if ( FAILED(hr) ) { Console::WriteLine(S"Cannot Initilaize com"); goto error; } ISyncMgrRegister *reg = NULL; hr = CoCreateInstance( CLSID_SyncMgr, NULL, CLSCTX_LOCAL_SERVER, IID_ISyncMgrRegister, reinterpret_cast(reg)); if ( FAILED(hr) ) { Console::WriteLine(S"Could not create an instance of the Sync Mgr"); goto error; } reg->Release(); Console::WriteLine(S"Press Enter to Exit"); Console::ReadLine(); return 0; error: Console::WriteLine(S"Press enter to exit"); Console::ReadLine(); return 1; } Jared jparsons@jparsons.org www.prism.gatech.edu/~gte477n

      M Offline
      M Offline
      Mike Dimmick
      wrote on last edited by
      #2

      reinterpret_cast<void**>(**&**reg) The rest looks fine. Stability. What an interesting concept. -- Chris Maunder

      J 1 Reply Last reply
      0
      • M Mike Dimmick

        reinterpret_cast<void**>(**&**reg) The rest looks fine. Stability. What an interesting concept. -- Chris Maunder

        J Offline
        J Offline
        jparsons
        wrote on last edited by
        #3

        Wow that was a stupid mistake. Thanks Jared jparsons@jparsons.org www.prism.gatech.edu/~gte477n

        1 Reply Last reply
        0
        • J jparsons

          I'm trying to write my own customer SyncMgr component. I'm having some trouble loading up the ISyncMgrRegister object. I'm a little new to COM so I'm probably missing osmething obvious here. This is MC++ code. Can someone point me in the correct direction. #include "stdafx.h" #include "mobsync.h" #using using namespace System; int _tmain() { HRESULT hr = CoInitialize(NULL); if ( FAILED(hr) ) { Console::WriteLine(S"Cannot Initilaize com"); goto error; } ISyncMgrRegister *reg = NULL; hr = CoCreateInstance( CLSID_SyncMgr, NULL, CLSCTX_LOCAL_SERVER, IID_ISyncMgrRegister, reinterpret_cast(reg)); if ( FAILED(hr) ) { Console::WriteLine(S"Could not create an instance of the Sync Mgr"); goto error; } reg->Release(); Console::WriteLine(S"Press Enter to Exit"); Console::ReadLine(); return 0; error: Console::WriteLine(S"Press enter to exit"); Console::ReadLine(); return 1; } Jared jparsons@jparsons.org www.prism.gatech.edu/~gte477n

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

          Hi Jared, I saw your post and was looking for some help, I am trying to write a Sync Manager component as well and I am having great difficulty with this as I am fairly new to C++ mostly VB, but I really need to hook into this interface, I to start with just wanted to get a hook in working, i.e register for synchronization and that sort of thing, do you have good samples you could share or point me in the right direction ? Cheers Michael

          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