#1 Burning Software

It is currently Fri Apr 26, 2024 10:55 am

All times are UTC




Post new topic Reply to topic  [ 17 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: StarBurnX: Registration-free COM does not work anymore
PostPosted: Fri Aug 15, 2008 3:48 pm 
Offline

Joined: Fri Aug 15, 2008 3:42 pm
Posts: 1
Hi,

I'm using Windows' registration-free COM to avoid having to register COM and ActiveX components, and to avoid problems with other applications that use StarBurn. This works with all COM DLLs I have been using before, including StarBurn OCX. Never had any problems.

However, with StarBurnX, I get an InvalidCastException resulting from E_NOINTERFACE when just trying to call:

IStarBurnX starBurn = new StarBurnXClass();
starBurn.Initialize(...); // <- InvalidCastException

So, creating the COM class abviously succeeded without any problem - QueryInterface however returns E_NOINTERFACE.

Any suggestions?

Thanks in advance,
Stefan


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 15, 2008 7:06 pm 
Offline
Site Admin

Joined: Fri Jun 18, 2004 12:03 am
Posts: 4089
Location: British Virgin Islands
Register the component within a system. For now that's the only way to proceed.


Top
 Profile  
 
 Post subject: Re: StarBurnX: Registration-free COM does not work anymore
PostPosted: Mon Feb 08, 2010 5:18 pm 
Offline

Joined: Sun Jun 14, 2009 6:00 pm
Posts: 542
Any updated advice on this issue? I'm using two burning libraries in my application, both over COM, but only StarBurn causes very many of these error messages (I got a couple of hundred error reports). I'm registering the StarBurnX.dll on every setup and even attempt to do so at the startup of the application, if StarBurnX.dll cannot be loaded. The DLL can be loaded fine in such cases though. Would re-registering the DLL help? Actually, even if it did, the application would need admin permissions first.


Top
 Profile  
 
 Post subject: Re: StarBurnX: Registration-free COM does not work anymore
PostPosted: Mon Feb 08, 2010 8:56 pm 
Offline
Site Admin

Joined: Fri Jun 18, 2004 12:03 am
Posts: 4089
Location: British Virgin Islands
You need remove and de-register existing DLL first. If multiple apps share the same DLL you'll have to use manifests.


Top
 Profile  
 
 Post subject: Re: StarBurnX: Registration-free COM does not work anymore
PostPosted: Tue Feb 09, 2010 5:35 am 
Offline

Joined: Sun Jun 14, 2009 6:00 pm
Posts: 542
So...on each setup I am supposed to de-register and then register the DLL?
What about manifests? Can you elaborate a little on that one?


Top
 Profile  
 
 Post subject: Re: StarBurnX: Registration-free COM does not work anymore
PostPosted: Tue Feb 09, 2010 10:34 am 
Offline
Site Admin

Joined: Fri Jun 18, 2004 12:03 am
Posts: 4089
Location: British Virgin Islands
No you don't need. Stick with the manifest thing (Dima will put some more light on it now).


Top
 Profile  
 
 Post subject: Re: StarBurnX: Registration-free COM does not work anymore
PostPosted: Tue Feb 09, 2010 12:19 pm 
Offline

Joined: Thu Dec 13, 2007 8:44 am
Posts: 609
Hello,

1) Use the IStarBurnX2 interface;

IStarBurnX2 starBurn = new StarBurnXClass();

2) Refresh the reference of StarBurnX component for your application;

3) Select the right target platform - x86 or x64 .. do not use the "independent" target platform;

4) Installation of StarBurnX include two minifest files - "StarBurnX12x64.dll.manifest" and "StarBurnX12.dll.manifest";

Note: the "free-registration" method should work with StarBurnX ... at least you are first who reported about this problem :)

Regards,

Dmitry


Top
 Profile  
 
 Post subject: Re: StarBurnX: Registration-free COM does not work anymore
PostPosted: Tue Feb 09, 2010 4:24 pm 
Offline

Joined: Sun Jun 14, 2009 6:00 pm
Posts: 542
So StarBurn should work without a COM component being registered?
If so, it doesn't.

What I did:
IStarBurnX2 starBurn = new StarBurnXClass();
Platform: x86 (need that for other libraries as well)
Application folder contains: StarBurn.dll, StarBurnX12.dll, StarBurnX12.dll.manifest, RocketDivision.StarBurnX12.Interop.dll

References in main application (entry assembly):

Code:
    <Reference Include="RocketDivision.StarBurnX12.Interop, Version=12.0.0.0, Culture=neutral, PublicKeyToken=f47a23797b36988b, processorArchitecture=MSIL">
      <SpecificVersion>False</SpecificVersion>
      <HintPath>..\Assemblies\RocketDivision.StarBurnX12.Interop.dll</HintPath>
    </Reference>


References in calling assembly (the one with the initialisation code from above):

Code:
    <Reference Include="RocketDivision.StarBurnX12.Interop, Version=12.0.0.0, Culture=neutral, PublicKeyToken=f47a23797b36988b, processorArchitecture=MSIL">
      <SpecificVersion>False</SpecificVersion>
      <HintPath>..\Assemblies\RocketDivision.StarBurnX12.Interop.dll</HintPath>
    </Reference>


When I try to init StarBurn, the following exception occurs (StarBurnX is unregistered):

Code:
COMException: Retrieving the COM class factory for component with CLSID {B756C224-A1EA-44F8-95C1-9F726040C800} failed due to the following error: 80040154.



Before your post, I had it set up a bit differently. I used StarBurnX.dll directly as reference and set it to "Isolated". In this secenario, I only had a single reference in the calling assembly. But it doesn't work any better, with or without manifest files.


Top
 Profile  
 
 Post subject: Re: StarBurnX: Registration-free COM does not work anymore
PostPosted: Wed Feb 10, 2010 7:04 am 
Offline

Joined: Thu Dec 13, 2007 8:44 am
Posts: 609
Hello,

Which Windows version do you use?:)

Regards,

Dmitry


Top
 Profile  
 
 Post subject: Re: StarBurnX: Registration-free COM does not work anymore
PostPosted: Wed Feb 10, 2010 2:57 pm 
Offline

Joined: Sun Jun 14, 2009 6:00 pm
Posts: 542
Windows 7 (x64).


Last edited by flöle on Wed Feb 10, 2010 4:16 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: StarBurnX: Registration-free COM does not work anymore
PostPosted: Wed Feb 10, 2010 3:35 pm 
Offline

Joined: Thu Dec 13, 2007 8:44 am
Posts: 609
Ok, we will test this issue!

Regards,

Dmitry


Top
 Profile  
 
 Post subject: Re: StarBurnX: Registration-free COM does not work anymore
PostPosted: Thu Feb 18, 2010 8:17 pm 
Offline

Joined: Sun Jun 14, 2009 6:00 pm
Posts: 542
Any news yet?

(I hate to annoy, but this issue is rather important to me.)


Top
 Profile  
 
 Post subject: Re: StarBurnX: Registration-free COM does not work anymore
PostPosted: Fri Feb 19, 2010 11:40 am 
Offline

Joined: Thu Dec 13, 2007 8:44 am
Posts: 609
Hello,


Not yet, sorry :(

We will investigate it ASAP!!!

Regards,

Dmitry


Top
 Profile  
 
 Post subject: Re: StarBurnX: Registration-free COM does not work anymore
PostPosted: Sat Apr 10, 2010 10:20 am 
Offline

Joined: Sun Jun 14, 2009 6:00 pm
Posts: 542
Looks like I found a solution.

There seem to be two typical ways to add a registration free COM reference to a .NET project.

1. Register the COM-DLL on the developer machine, Add Reference --> COM, then set IsoLated=true in the properties of the DLL after it has been added to the project.
2. Instead of the DLL, add the manifest file (in our case, StarBurnX12.manifest) as reference.

This causes manifest files to be generated along with the DLL, and would allow us to make use of the COM-DLLs without registration.

Both of these methods, however, do not work (will result in error 0x80004002 for example) without the tweak below.
To work around this problem (see https://connect.microsoft.com/VisualStudio/feedback/details/114083/), you need to add the comInterfaceExternalProxyStub elements, which exist in the StarBurnX12.manifest or can also be generated manually (to get the necessary information like IIDS, use http://www.microsoft.com/downloads/details.aspx?familyid=5233b70d-d9b2-4cb5-aeb6-45664be858b6&displaylang=en), to the manifest files generated by Visual Studio.

I created a small tool for myself, which I use within the postbuild event and copies the necessary XML elements from a given source manifest to the Visual Studio generated target manifest file.

Code:
using System;
using System.Collections.Generic;
using System.Text;
using System.Xml;
using System.IO;

namespace MergeManifest
{
    class Program
    {
        static void Main(string[] args)
        {
            if (args.Length < 2) return;

            string sourceManifest = args[0];
            string targetManifest = args[1];

            XmlDocument docSource = new XmlDocument();
            docSource.Load(sourceManifest);
           
            XmlDocument docTarget = new XmlDocument();
            docTarget.Load(targetManifest);
            docSource.PreserveWhitespace = true;

            foreach (XmlElement element in docSource.GetElementsByTagName("comInterfaceExternalProxyStub"))
            {
                XmlNode copiedNode = docTarget.ImportNode(element, true);
                docTarget["assembly"].AppendChild(copiedNode);
            }

            docTarget.Save(targetManifest);
        }
    }
}


Top
 Profile  
 
 Post subject: Re: StarBurnX: Registration-free COM does not work anymore
PostPosted: Mon Apr 12, 2010 5:46 am 
Offline

Joined: Thu Dec 13, 2007 8:44 am
Posts: 609
Hello,

Ok, Thanx!! We will investigate this solution ASAP!!

Regards,

Dmitry


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 17 posts ]  Go to page 1, 2  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 30 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group