Go Back   Club CDFreaks - Knowledge is Power > International Chat: Software related > Nero SDK Discussion Forum


Commercial message



Nero SDK Discussion Forum Discuss, Problems distributing NeroCOM app at International Chat: Software related forum; I have a VB.Net app that uses NeroCOM which runs fine on my development machine. I have a production environment where I have installed Nero 6, but when I install my app I get an InvalidCastException from the following code: Code:


Reply
 
Thread Tools
Old 10-01-2006   #1 (permalink)
New on Forum
 
Join Date: Nov 2005
Posts: 11
Problems distributing NeroCOM app

I have a VB.Net app that uses NeroCOM which runs fine on my development machine. I have a production environment where I have installed Nero 6, but when I install my app I get an InvalidCastException from the following code:

Code:
        m_DVDControl = New NeroClass

        Dim devices As NeroDrives
        devices = m_DVDControl.GetDrives(NERO_MEDIA_TYPE.NERO_MEDIA_DVD_M Or NERO_MEDIA_TYPE.NERO_MEDIA_DVD_P)

        If devices.Count > 0 Then
            m_DVDDrive = CType(devices.Item(0), NeroDrive)
        Else
            LogText("Unable to find DVD burner")
        End If

        Dim drives As NeroDrives = m_DVDControl.GetDrives(NERO_MEDIA_TYPE.NERO_MEDIA_DVD_ANY)

        For i As Integer = 0 To drives.Count - 1
            If drives.Item(i).Capabilities = (drives.Item(i).Capabilities Or NERO_CAPABILITIES.NERO_CAP_IMAGE_RECORDER) Then
                m_ImageRecorder = CType(drives.Item(i), NeroDrive)
            End If
        Next

        If m_ImageRecorder Is Nothing Then
            LogText("Unable to find image recording device")
        End If
I copied the NeroFiddlesCOM.NET app to my production environment and it runs fine. I tried to set up the references in my VB.Net the same as in NeroFiddlesCOM.NET -- one reference to Interop.NEROLib.dll and one reference to Interop.NeroVisionAPI.dll. I copied these files out of the NeroFiddlesCOM.NET folder because I couldn't find NeroLib.dll or NeroVisionAPI.dll. For some reason in my project the references say Interop.NEROLib and Interop.NeroVisionAPI whereas in the NeroFiddlesCOM.NET they just say NEROLib and NeroVisionAPI.

I can't find NeroLib.dll or NeroVisionAPI.dll on my pc or in the nero sdk folder (v1.06). I'm guessing that maybe I need to tell .NET to reference these, and it will generate the Interop automatically?

On a side note, the NeroCOM documentation is way too sparse and the NeroFiddlesCOM.NET sample doesn't even exercise all the NeroCOM functionality. All the other DVD burning libraries I've used make sure to exercise all functionality in the sample programs so that its completely clear how things work. The NeroFiddlesCOM.NET doesn't even have functionality for selecting a group of files to burn to DVD -- you must start from an image or an existing disc.
farmerbuzz is offline   Reply With Quote
Old 11-01-2006   #2 (permalink)
New on Forum
 
Join Date: Nov 2005
Posts: 11
Re: Problems distributing NeroCOM app

I managed to narrow down the InvalidCastException to the following line:

Code:
m_DVDDrive = CType(devices.Item(0), NeroDrive)
I have to convert this from INeroDrive to NeroDrive because the INeroDrive interface doesn't have any events defined, and I need to handle them.

I was able to fix the references by deleting my old references and instead adding a reference directly to c:\program files\ahead\nero\nerocom.dll. Unfortunately this didn't fix the InvalidCastException. I noticed another forum post noting that this can happen when there is a version mismatch, but I have verified that Nero 6.6.0.18 is installed on both my development machine and the production environment.

I suppose I'll try contacting Nero support.
farmerbuzz is offline   Reply With Quote
Old 12-01-2006   #3 (permalink)
New on Forum
 
Join Date: Nov 2005
Posts: 11
Re: Problems distributing NeroCOM app

Well, finally fixed my own problem. I stopped using the NeroDrive class and instead used a combination of the INeroDrive3 interface (INeroDrive doesn't have the EraseDisc or BurnImage2 methods) and the _INeroDriveEvents_Event interface. I use the INeroDrive3 to start the operations, then catch the events with the _INeroDriveEvents_Event interface. For some reason neither of these pop up in intellisense, and are greyed out in the object browser, but they work fine with the latest version of NeroCOM. Convoluted solution, but it works!
farmerbuzz is offline   Reply With Quote
 
Reply


If you can't find where you are looking for, then become a member and get an answer fast! We have thousands of people online every moment of the day to help you! Click here



Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
NeroCOM and .NET Remoting problems QuRace Nero SDK Discussion Forum 0 31-08-2006 17:39
Barenaked Ladies distributing new release via USB flash drive Mr. Belvedere Latest News Headlines 3 19-12-2005 16:10
Problems with NeroCOM-DVD-Multisession DottG72 Nero SDK Discussion Forum 0 26-11-2004 12:44
Problems with NeroCOM and Multisession DottG72 Nero SDK Discussion Forum 7 25-11-2004 12:55
What +/- burner for distributing public copies SwissJay CD and DVD Burners 6 07-05-2004 19:49


All times are GMT +2. The time now is 21:56.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0