NeroGetAvailableDrivesEx(MEDIA_CD, NULL)

I’m using CBuilder6 and NeroAPI version
I create a NeroAPI.def from NeroAPI.dll , make some changes e create NeroAPI.lib and linked to my project , they compile well
The NeroInit() return NEROAPI_INIT_OK , NeroGetAvailableDrivesEx(MEDIA_CD, NULL) return a handle != NULL , but NeroDeviceInfos->nsdisNumDevInfos always return 0 (zero devices) ??
The NeroCmd , return 3 devices
I’m nothing using the NeroAPIGlueConnect( ) because I can’t compile using the NeroAPIGlue.lib in CBuilder
I try to use the LoadLibrary() too but I get the same result
I’m using the correction below , but have se same problens
#pragma pack(push, 8)
#include “NeroAPI.h”
#pragma pack(pop)

Please some one can tell me , what I’m missing

Thanks in advance

On start sorry for my English, but I think that You understand me :wink:

I have had some problems with BCB6 and NeroApi.

#pragma pack(push, 8)
#include “NeroAPI.h”
#pragma pack(pop)

not repairing all problems.
I must using:

#pragma pack(push, 8)
#pragma option push -b
#include “NeroAPI.h”
#pragma pack(pop)
#pragma option pop

Except this you must remember to succesfully init NeroApi with
NeroInit function. Only if initialization is successed you can use NeroGetAvailableDrivesEx function.
If it not help you try to write me email (
than I try to help you

Thank you for the help :slight_smile:
The #pragma pack(push, 8) don’t work to me too , because the CBuilder default compiler alread is -a8

I’m using now
#pragma option push -b
#include “NeroISODemo.h”
#pragma pack(pop)

The problem with NeroAPIGlue.lib it’is not a Import Library , it is a Object Library , and Coff2omf.exe is used only with Import library

You can use
>tdump -C NeroAPIGlue.lib
to see all *.obj it have

I’m looking for a application that convert COFF Object Library to OMF , but I can’t find one

I solve the problens with nero struct , by now , hava another problem with NeroBurn() it is return error "Access violation at address 326668EB in module ‘CC326MT.DLL’

Now I’m using MSVC to make a DLL , to use with CBuilder , I have less problens to solve

Thank again for the Help

Hi rtt100.

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 );



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

Thanks in advance.


Complementing my last post I am using Borland C++ Builder 6, NeroAPi.dll, and Nero 6.6 OEM Suite.