locked
UCCP Sample RRS feed

  • Question

  •  I was able to get the IMVoIPSample in the UCCP SDK to compile, but not run.

     

    I get a COM Error when trying to initalize the UccpPlatformClass in the UCCLib.dll. Any one have an idea?

    Tuesday, July 31, 2007 6:39 AM

All replies

  • Hi Michael,

     

    I do manage to get it to run. The tricky bit is in making sure that 1) you have the right version of Visual Studio; and 2) you have the .NET 3.0 framework installed. Furthermore, make sure to exactly follow the instructions in the Readme.txt file.

     

    If you want I can send you the VS project.

     

    Cheers,

     

    Frank

    Friday, September 7, 2007 7:30 AM
  •  

    Hi,

       I am facing the same problem as mentioned above.

       All my application does is get a UccPlatform Object and try to call initialise on it.

       CoCreateInstance for UccPlatform was failing  with 80040154 i.e class not registered

       So I registered UccApi.dll using RegSvr32.

       I could now get the UccPlatform Object.

       but when I try to do platform.Initialize with the context parameter set to null it gives the following error "The specified module could not be found. (Exception from HRESULT: 0x8007007E)"

       So I tried to pass a valid UccContext object to it, but

       CoCreateInstance for UccContext is failing  with 80040154 i.e class not registered

       UccContext is also in UccApi.dll but it hasn't been registered even after I registered the UccApi.dll

       I was doing this with MS Visual C#  2005 Express Edition and .Net 2.0 is installed on the machine.

     

       After reading your response, above, I tried It again on a new machine with VisualStudio 2005 and .Net 3.0

      but it still fails.

      Any Idea what it might be?

     

    Thanks,

    Ashutosh

     

    earlier I was doiong

                platform = new UccPlatform(); // was failing with Hresult 80040154. started working when I registered UccApi.dll
                Advise<_IUccPlatformEvents>(platform, this);
                platform.Initialize("uccp_client", null); // fails with Hresult 0x8007007E

     

    Now I am trying

               platform = new UccPlatform();
               UccContext cx = new UccContext(); // failing with Hresult 80040154
               Advise<_IUccPlatformEvents>(platform, this);
               platform.Initialize("uccp_client", cx);

    Wednesday, October 17, 2007 8:57 AM
  • Include all dlls to the project and from properties of individual dlls select "copy always" in "copyto output directory". It will solve this prb.

     

    Monday, October 22, 2007 11:29 AM
  • Hi Frank,

     

    I am a new starter of the UCCAPI, and the problem keeps popping up when I tried to run the Samples, which is as the following, even after I registered the UccApi.dll.

     

    Retrieving the COM class factory for component with CLSID {201D2DCD-AF4F-484E-9793-56CAC5EC0C16} failed due to the following error: 80040154.

     

    I really appreciate if you could send me a copy of the SAMPLE projects.

    My mailbox is zhaoshihu@hotmail.com

     

    A.Z

     

     

     

    Wednesday, October 24, 2007 9:42 AM
  •  

    Hi,

     

    I was also having the similar problem as AZ,   i  manually created a CLSID in registry (HKCR) and pointed it to the UccApi.dll which was already registered. The problem of COM component solved but i see that the client never authenticates. I am using TLS and have Basic authentication mode enabled in profile too. Also the Client Version filter is disabled on OCS.

     

    Probably there is a better way to solve the COM registration problem or i am making a mistake in authentication part. I am running .net 3.0. A working sample project would be helpful Smile my email is usmanzahidi(at)gmail(dot)com

     

    UZ

    Wednesday, October 24, 2007 9:57 AM
  •  

    I too am getting the same error...can you please share operational sample project  my mail id is v-amitku@hotmail.com

     

    thx

    Wednesday, October 24, 2007 1:48 PM
  •  

    Hi Guys,

     

    I just found I had made some progress on this, although another problem occurs, but I think I better share my experience with all of you, since that tricky problem must be annoying many people.

     

    My OS is Windows Vista Business, and my VS is VS 2005.

    And after I updated both of my OS and VS, the Register Error doesn't appear any more.

    So maybe you guys could have a shot to see if it could resolve yours.

     

    Thank you so much for your kindly response and help on this!

    Let's share our every tiny finding here, and I hope we could work closely to make it running smoothly in a short time!

     

    Cheers!

     

    A.Z

     

     

     

    Thursday, October 25, 2007 6:11 AM
  •  

    Thanks, that worked but I dont get it. That is not how COM is supposed to work, Is It?
    Monday, October 29, 2007 11:33 AM
  • For me the Class not registered error disappeared after copying the UccApi.dll and rtmpltfm.dll to the Application directory

     

     

    Monday, October 29, 2007 11:38 AM
  • I tried almost every way of doing this and only got a little further with each step, until a colleague recommended editing the registry.
    I created a .reg file containing the following code (repeating the segment for UccContext for each class I wanted to use):


    Windows Registry Editor Version 5.00 -- UccPlatform clsid="{EC10E7E8-797E-4495-A86D-3E9EADA6D5BB}" [HKEY_CLASSES_ROOT\CLSID\{EC10E7E8-797E-4495-A86D-3E9EADA6D5BB}] @="UccPlatform Class" "AppID"="MyTestApp" [HKEY_CLASSES_ROOT\CLSID\{EC10E7E8-797E-4495-A86D-3E9EADA6D5BB}\InprocServer32] @="C:\\Microsoft UCCAPI\\uccapi.dll" "ThreadingModel"="Apartment" [HKEY_CLASSES_ROOT\CLSID\{EC10E7E8-797E-4495-A86D-3E9EADA6D5BB}\ProgID] @="UCCP.UccPlatform.1" [HKEY_CLASSES_ROOT\CLSID\{EC10E7E8-797E-4495-A86D-3E9EADA6D5BB}\TypeLib] @="{ECD5307E-4419-43CF-8BDA-C9946AC375CF}" [HKEY_CLASSES_ROOT\CLSID\{EC10E7E8-797E-4495-A86D-3E9EADA6D5BB}\VersionIndependentProgID] @="UCCP.UccPlatform" -- UccContext clsid="{3af68966-5194-4de0-bdab-ae03653d914b}" [HKEY_CLASSES_ROOT\CLSID\{3af68966-5194-4de0-bdab-ae03653d914b}] @="UccContext Class" "AppID"="" [HKEY_CLASSES_ROOT\CLSID\{3af68966-5194-4de0-bdab-ae03653d914b}\InprocServer32] @="C:\\Microsoft UCCAPI\\UccApi.dll" "ThreadingModel"="Apartment" [HKEY_CLASSES_ROOT\CLSID\{3af68966-5194-4de0-bdab-ae03653d914b}\ProgID] @="UCCP.UccContext.1" [HKEY_CLASSES_ROOT\CLSID\{3af68966-5194-4de0-bdab-ae03653d914b}\TypeLib] @="{ECD5307E-4419-43CF-8BDA-C9946AC375CF}" [HKEY_CLASSES_ROOT\CLSID\{3af68966-5194-4de0-bdab-ae03653d914b}\VersionIndependentProgID] @="UCCP.UccContext"

    Thus pointing the CLSID to the correct dll.

    This solved all my issues with COM Errors.


    / Fredrik
    Thursday, April 30, 2009 5:55 AM
  • When  you using UccApi using Interop in Managed code you need to provide the manifest to Managed Executable to point to the COM DLL, for example your manifest can look like this:

     

    <?xml version="1.0" encoding="utf-8" standalone="yes"?>

    <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">

      <assemblyIdentity version="8.0.685.0" processorArchitecture="x86" name="ExecutableName.exe" type="win32" />

      <dependency>

        <dependentAssembly>

          <assemblyIdentity version="2.0.0.0" processorArchitecture="x86" name="UccApi" type="win32" />

        </dependentAssembly>

      </dependency>

    </assembly>

     

    You can save the above XML as “ExecutableName.exe.manifest” (ExecutableName should match the executable program file name). Place this file at the same level where your exe resides with the interop and COM DLL’s

     

    Also if you using VS2008 for development make sure go into Project Properties for the manifest -> Create application without a manifest.

     

    This is the only way to work with COM Objects in Managed Code using Interop.

    Thursday, September 17, 2009 8:12 PM