realbasic-nug
[Top] [All Lists]

Re: accepting inserted cdr discs

To: REALbasic NUG <realbasic-nug at lists dot realsoftware dot com>
Subject: Re: accepting inserted cdr discs
From: Philip George <invest at juun dot com>
Date: Sun, 29 May 2005 23:31:46 -0500
Delivered-to: realbasic-nug at lists dot realsoftware dot com
References: <f40e06d6f8c17b0106756d6fa6670ca6 at juun dot com>
On May 29, 2005, at 10:17 PM, Philip George wrote:

how can i get similar behavior to roxio toast or itunes where clicking a 'burn' button allows the next inserted blank cdr to bypass the finder and be accepted by the app?

actually, i got a carbon test app to so this just now using DiscRecordingFramework:

    OSStatus err;
    CFArrayRef devices = DRCopyDeviceArray();

    if (CFArrayGetCount(devices) > 0) {
err = DRDeviceAcquireExclusiveAccess(CFArrayGetValueAtIndex(devices, 0));
        if (err == 0) {
                        // continue with disc burning operations...
        } else {
            // problem acquiring exclusive access to cd/dvd burner
        }
    } else {
        // no cd/dvd burner found
    }


once DRDeviceAcquireExclusiveAccess() is called, inserting a blank disc is **not** grabbed by the finder as it usually is.

next problem:

how do i translate that little code snippet into rb declares?

this first little piece of it isn't working:

  #if TargetMacOS
    dim devices as integer
Declare Function DRCopyDeviceArray Lib "DiscRecordingLib" () as integer
    devices = DRCopyDeviceArray()
  #endif

i get a runtime exception dialog that there was a shared lib problem. i tried with Lib "CarbonLib" too. no dice.

any ideas?

- philip





_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

<Prev in Thread] Current Thread [Next in Thread>