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


Commercial message



Nero SDK Discussion Forum Discuss, Problems with NeroGetAvailableDrivesEx (MEDIA_CD, NULL) at International Chat: Software related forum; Hi Friends. I think I am having a problem like you had with the NeroGetAvailableDrivesEx(MEDIA_CD, NULL) function of nero API. I don't have a NeroAPI.lib so this is the way I am using the function: typedef NERO_SCSI_DEVICE_INFOS* __stdcall (*TNeroGetAvailableDrivesEx) ( bool, unsigned long ); __fastcall TFormPrincipal::TFormPrincipal(TComponent* Owner) :


Reply
 
Thread Tools
Old 22-08-2006   #1 (permalink)
New on Forum
 
Join Date: Aug 2006
Location: Brazil
Posts: 7
Problems with NeroGetAvailableDrivesEx (MEDIA_CD, NULL)

Hi Friends.

I think I am having a problem like you had with the NeroGetAvailableDrivesEx(MEDIA_CD, NULL) function of nero API.

I don't have a NeroAPI.lib so this is the way I am using the function:


typedef NERO_SCSI_DEVICE_INFOS* __stdcall (*TNeroGetAvailableDrivesEx) ( bool, unsigned long );


__fastcall TFormPrincipal::TFormPrincipal(TComponent* Owner) : TForm(Owner)
{

TNeroGetAvailableDrivesEx PegaGravadoras;

HInstDLL = LoadLibrary("neroapi.dll");

PegaGravadoras = ( TNeroGetAvailableDrivesEx ) GetProcAddress ( HInstDLL, "NeroGetAvailableDrivesEx" );

m_pndiDeviceInfos = PegaGravadoras ( MEDIA_DVD_ANY , NULL );

FreeLibrary(HInstDLL);
}


It compiles well, but when I Run it, the application crashes. Somebody can explain me why?

I am using Borland C++ Builder 6, NeroAPi.dll 6.6.0.16, and Nero 6.6 OEM Suite.

Thanks in advance.

Ubaldo.
itaunaprofana is offline   Reply With Quote
Old 29-08-2006   #2 (permalink)
New on Forum
 
Join Date: Mar 2005
Posts: 10
Re: Problems with NeroGetAvailableDrivesEx (MEDIA_CD, NULL)

Perhaps your parameter types are defined wrongly ? In NeroAPI.h it says:

Code:
NEROAPI_API NERO_SCSI_DEVICE_INFOS * NADLL_ATTR NeroGetAvailableDrivesEx( NERO_MEDIA_TYPE mediaType, void *reserved);
and NERO_MEDIA_TYPE is a "typedef enum".
You have defined the parameter types as bool and unsigned long so perhaps it will work better if you use unsigned long and void * instead.

Another thing that I see now is that you are using "__stdcall". In NeroAPI.h NADLL_ATTR is defined to "__cdecl".

Cheers.
Creosote 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
NeroGetAvailableDrivesEx(MEDIA_CD, NULL) rtt100 Nero SDK Discussion Forum 4 22-08-2006 21:09
pCDInfo==NULL Tors Nero SDK Discussion Forum 1 25-01-2005 15:01
NeroGetAvailableDrivesEx(MEDIA_CD, NULL) rtt100 Nero SDK Discussion Forum 2 28-02-2004 20:22
NeroGetAvailableDrivesEx(MEDIA_CD, NULL) Steve Wagner Nero SDK Discussion Forum 1 20-02-2004 15:46
Dos + Null modem Net_Loony Dutch: De Woonkamer 8 27-11-2001 09:44


All times are GMT +2. The time now is 07:49.


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