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


Commercial message



Nero SDK Discussion Forum Discuss, C#, NeroDrive, Eventhandlers at International Chat: Software related forum; 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


Reply
 
Thread Tools
Old 14-06-2005   #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
tmoravan is offline   Reply With Quote
Old 19-06-2005   #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
Ianier is offline   Reply With Quote
Old 20-06-2005   #3 (permalink)
New on Forum
 
Join Date: Jun 2005
Posts: 2
Re: C#, NeroDrive, Eventhandlers

excellent suggestion. I cast the drive variable and life is good - assigned event handlers and now have something working.
tmoravan is offline   Reply With Quote
Old 07-07-2005   #4 (permalink)
New on Forum
 
Join Date: Jul 2005
Posts: 5
Re: C#, NeroDrive, Eventhandlers

it is so good to have Nero SDK Discussion Forun,and so is Nero SDK,
jayition is offline   Reply With Quote
Old 06-09-2005   #5 (permalink)
New on Forum
 
Join Date: Jul 2005
Posts: 13
Re: C#, NeroDrive, Eventhandlers

Quote:
Originally Posted by tmoravan
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

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
Setting nDrive to nD causes the error. When I paste this code into an EXE, it all works... why would I get a cast error in the Web Service and not the EXE?

Please help! After 2 weeks of searching, all my google result links are Purple (visited links)!!!
Kttii 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
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


All times are GMT +2. The time now is 17:41.


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