| |||||||
| Commercial message | |
| | |
|
![]() |
| | Thread Tools |
| | #1 (permalink) |
| New on Forum Join Date: Jun 2005
Posts: 2
| C#, NeroDrive, Eventhandlers OK, I'm stumped trying to get this happening. Situation: C#, using the NeroCOM interface. I create Nero, NeroDrives, and NeroDrive objects without a problem. I can pull data from NeroDrives using the standard nero.GetDrives(). However, I run into a Catch-22 trying to access a particular drive. If I use the syntax: drive = (NeroDrive)drives.Item(0); I get a runtime cast exception error. If I build w/o the cast, I get a compile-time error saying cannot implicitly cast NEROLib.INeroDrive to NEROLib.NeroDrive. If I declare drive as INeroDrive, the assignment is fine, but I can't assign event handlers since INeroDrive doesn't have them. Any suggestions? Would _INeroDriveEvents_SinkHelper be of any use? Finally, can anybody explain the difference (and proper use) of INeroxxxxx and Neroxxxxx? thanks Tom |
| | |
| | #2 (permalink) |
| New on Forum Join Date: Jun 2005
Posts: 3
| Re: C#, NeroDrive, Eventhandlers Hi Tom, There should be an interface named _INeroDriveEvents_Event, which declares the events of INeroDrive. You can just typecast your "drive" variable to _INeroDriveEvents_Event and assign your event handlers. Note that I'm not as familiar with the Nero SDK as I'm with COM Interop, so I might be wrong. Regards, Ianier Munoz http://www.chronotron.com |
| | |
| | #5 (permalink) | |
| New on Forum Join Date: Jul 2005
Posts: 13
| Re: C#, NeroDrive, Eventhandlers Quote:
I am having a similiar problem. I use VB.NET. I have created a web service to create an ISO on the fly and return it to the client app that is requesting it. The error I am getting is "Specified cast is not valid." This is the Code I am using: Code: <WebMethod()> _
Public Function testGetImageRecorder() As String Dim nNero As New NEROLib.Nero
Dim nDrives As NEROLib.INeroDrives
Dim nDrive As NEROLib.NeroDrive
Try
nDrives = nNero.GetDrives(NEROLib.NERO_MEDIA_TYPE.NERO_MEDIA_CDR)
For Each nD As NEROLib.NeroDrive In nDrives
If nD.DeviceName = "Image Recorder" Then nDrive = CType (nD, NEROLib.NeroDrive) Exit For
End If
Next
If nDrive Is Nothing Then
Return "No Supported Drives Found"
Else
Return nDrive.DeviceName
End If
Catch ex As Exception
Return ex.Message
End Try
End Function Please help! After 2 weeks of searching, all my google result links are Purple (visited links)!!! | |
| | |
| |
| |
![]() |
| 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 |
| NeroDrive Probleme | tommazzo | Nero SDK Discussion Forum | 12 | 01-11-2005 23:13 |
| casting INeroDrive to NeroDrive | yoss05 | Nero SDK Discussion Forum | 0 | 30-10-2005 10:18 |
| How to call NeroDrive.EstimateTrackSize | ae_srikanth | Nero SDK Discussion Forum | 0 | 25-08-2005 14:05 |
| NeroDrive.OnDriveStatusChanged is silent | yanush | Nero SDK Discussion Forum | 4 | 15-07-2005 18:38 |
| Getting intermittent errors with NeroDrive | Pamano | Nero SDK Discussion Forum | 12 | 14-12-2004 12:36 |