+#elif defined(UNDER_CE)
+ msg_Warn( p_this, "CD-Rom ejection unsupported on this platform" );
+ return i_ret;
+
+#elif defined(WIN32)
+ MCI_OPEN_PARMS op;
+ MCI_STATUS_PARMS st;
+ DWORD i_flags;
+ char psz_drive[4];
+
+ memset( &op, 0, sizeof(MCI_OPEN_PARMS) );
+ op.lpstrDeviceType = (LPCSTR)MCI_DEVTYPE_CD_AUDIO;
+
+ strcpy( psz_drive, "X:" );
+ psz_drive[0] = psz_device[0];
+ op.lpstrElementName = psz_drive;
+
+ /* Set the flags for the device type */
+ i_flags = MCI_OPEN_TYPE | MCI_OPEN_TYPE_ID |
+ MCI_OPEN_ELEMENT | MCI_OPEN_SHAREABLE;
+
+ if( !mciSendCommand( 0, MCI_OPEN, i_flags, (unsigned long)&op ) )
+ {
+ st.dwItem = MCI_STATUS_READY;
+ /* Eject disc */
+ i_ret = mciSendCommand( op.wDeviceID, MCI_SET, MCI_SET_DOOR_OPEN, 0 );
+ /* Release access to the device */
+ mciSendCommand( op.wDeviceID, MCI_CLOSE, MCI_WAIT, 0 );
+ }
+ else i_ret = VLC_EGENERIC;
+
+ return i_ret;
+#else /* WIN32 */
+
+ int i_fd;