| |||||||
| Commercial message | |
| | |
|
![]() |
| | Thread Tools |
| | #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 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. |
| | |
| | #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 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. |
| | |
| | #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! |
| | |
| |
| |
![]() |
| 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 | |
| |
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 |