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


Commercial message



Nero SDK Discussion Forum Discuss, NVAPIExample - Unneccessary calls to NeroGetAvailableSpeeds at International Chat: Software related forum; Is there a reason why the method CSpeedComboBox::RefreshSpeeds() calls NeroGetAvailableSpeeds rather than just using the pnsdi->nsdiWriteSpeeds values passed to it? The code is currently: // Open the device... // NERO_DEVICEHANDLE hDevice = NeroOpenDevice (pnsdi); if (hDevice != NULL) { // Get the speeds... // NERO_SPEED_INFOS * pSpeeds = NeroGetAvailableSpeeds (hDevice, ACCESSTYPE_WRITE, MEDIA_CD, NULL); if (pSpeeds != NULL) { CString


Reply
 
Thread Tools
Old 03-05-2006   #1 (permalink)
New on Forum
 
Join Date: Jun 2004
Location: Manchester
Posts: 23
NVAPIExample - Unneccessary calls to NeroGetAvailableSpeeds

Is there a reason why the method CSpeedComboBox::RefreshSpeeds() calls NeroGetAvailableSpeeds rather than just using the pnsdi->nsdiWriteSpeeds values passed to it?

The code is currently:


// Open the device...
//
NERO_DEVICEHANDLE hDevice = NeroOpenDevice (pnsdi);

if (hDevice != NULL)
{
// Get the speeds...
//
NERO_SPEED_INFOS * pSpeeds = NeroGetAvailableSpeeds (hDevice,
ACCESSTYPE_WRITE,
MEDIA_CD,
NULL);
if (pSpeeds != NULL)
{
CString sSpeed;

// Loop through all available speeds and add them to
// the combobox.
//
for (DWORD i = 0; i < pSpeeds->nsiNumSupportedSpeeds; i ++)
{
sSpeed.Format ("%d", pSpeeds->nsiSupportedSpeeds[i]);
int iIndex = AddString (sSpeed);
if (iIndex != CB_ERR)
{
// Set the item data to be the speed itself in X.
//
SetItemData (iIndex, pSpeeds->nsiSupportedSpeeds[i]);
}
}

NeroFreeMem (pSpeeds);
}

NeroCloseDevice (hDevice);
}


When it only needs to be:


CString sSpeed;

// Loop through all available speeds and add them to
// the combobox.
//
for (DWORD i = 0; i < pnsdi->nsdiWriteSpeeds.nsiNumSupportedSpeeds; i ++)
{
sSpeed.Format ("%d", pnsdi->nsdiWriteSpeeds.nsiSupportedSpeeds[i]);
int iIndex = AddString (sSpeed);
if (iIndex != CB_ERR)
{
// Set the item data to be the speed itself in X.
//
SetItemData (iIndex, pnsdi->nsdiWriteSpeeds.nsiSupportedSpeeds[i]);
}
}


Or am I missing something?
AndyNugent is offline   Reply With Quote
Old 04-05-2006   #2 (permalink)
New on Forum
 
Join Date: Jun 2004
Location: Manchester
Posts: 23
Re: NVAPIExample - Unneccessary calls to NeroGetAvailableSpeeds

It's me being stupid.

NeroGetAvailableSpeeds() takes into account what disk is in the drive.
AndyNugent is offline   Reply With Quote
Old 09-05-2006   #3 (permalink)
CD Freaks Member
 
Eric545's Avatar
 
Join Date: Aug 2005
Location: Moreno Valley, CA
Posts: 122
Re: NVAPIExample - Unneccessary calls to NeroGetAvailableSpeeds

Test Post. Sorry
__________________
Eric's Wonderful World of Windows

I rarely check my cdfreaks messages, to reach me
visit my web site for my e-mail address.


My Main Computer

Thermaltake Armor VA8000BWS Full Tower Case
Thermaltake Silent Purepower 750-Watt Power Supply
Intel BLKD975XBXLKR "BadAxe" Motherboard
Intel Core 2 Extreme Processor X6800
4GB's DDR2 667MHz RAM
One (1) 80GB Maxtor ATA/133 C:\ Drive
Two (2) Seagate 750GB SATA 300 Hard Drives
One (1) Seagate 500GB SATA 300 Hard Drive
One (1) Samsung SH-S203 (Serial ATA) DVD Burner
One (1) Lite-On 16X DVD-ROM
ATI Radeon X1600 Pro PCI-E with 512MB’s Video Card
Samsung 24" Widescreen Flat Panel LCD Monitor
Canopus ADVC-110 Analog to Digital Converter
Epson Stylus Photo R340 Digital Printer
Microsoft Windows XP Pro with SP-2
DVDFab Platinum 5 plus AnyDVD & CloneDVD 2
Eric545 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
Having trouble burning when a stranger calls raphael_dg Newbie Forum 7 01-06-2006 20:43
NVAPIExample XML problem d5d Nero SDK Discussion Forum 3 21-10-2005 14:20
The Incredibles - When Danger Calls - Urgent. Nanometer Copy Protection 0 04-07-2005 21:55
NVAPIExample and xml problem pwbm Nero SDK Discussion Forum 7 31-08-2004 12:34


All times are GMT +2. The time now is 06:16.


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