Da napiši i call-ov za taj dll, ako ti baš ide.
Recimo callovi :
CloseCDDoor(DriveLetter as string) as boolean
OpenCDDoor(DriveLetter as string) as boolean
Nije se ti treba mučiti oko ostalog u vezi sa imenom "CDRW/DVD" drive-a
A možeš i da napišeš sintaksu za mcisendcommand, ja sam zabeležio samo za standardni CD/DVD pogon, no to i sam mogu da učinim koji je definiran kao CDAudi drive (Windows default).
Gledao sam i u cdplayer.exe od win9x, no ima dosta typova i parametra te konstanti kod tog.
MCIERROR mciSendCommand(
MCIDEVICEID IDDevice,
UINT uMsg,
DWORD fdwCommand,
DWORD_PTR dwParam
);
Mislim da je največa fora po mom kod MCIDEVICEID IDDevice, ne znam zašto u VB ne radi na ostalim driveoma. A i MSDN je malo ....
MCI_OPEN_ALIAS
An alias is included in the lpstrAlias member of the structure identified by lpOpen.
MCI_OPEN_SHAREABLE
The device or file should be opened as shareable.
MCI_OPEN_TYPE
A device type name or constant is included in the lpstrDeviceType member of the structure identified by lpOpen.
MCI_OPEN_TYPE_ID
The low-order word of the lpstrDeviceType member of the structure identified by lpOpen contains a standard MCI device type identifier and the high-order word optionally contains the ordinal index for the device. Use this flag with the MCI_OPEN_TYPE flag.
The following additional flags apply to compound devices:
MCI_OPEN_ELEMENT
A filename is included in the lpstrElementName member of the structure identified by lpOpen.
MCI_OPEN_ELEMENT_ID
The lpstrElementName member of the structure identified by lpOpen is interpreted as a DWORD value and has meaning internal to the device. Use this flag with the MCI_OPEN_ELEMENT flag.
The following additional flags are used with the digitalvideo device type:
MCI_DGV_OPEN_NOSTATIC
The device should reduce the number of static (system) colors in the palette. This increases the number of colors available for rendering the video stream. This flag applies only to devices that share a palette with Windows.
MCI_DGV_OPEN_PARENT
The parent window handle is specified in the hWndParent member of the structure identified by lpOpen.
MCI_DGV_OPEN_WS
A window style is specified in the dwStyle member of the structure identified by lpOpen.
MCI_DGV_OPEN_16BIT
Indicates a preference for 16-bit MCI device support.
MCI_DGV_OPEN_32BIT
Indicates a preference for 32-bit MCI device support.
For digital-video devices, the lpOpen parameter points to an MCI_DGV_OPEN_PARMS structure.
The following additional flags are used with the overlay device type:
MCI_OVLY_OPEN_PARENT
The parent window handle is specified in the hWndParent member of the structure identified by lpOpen.
MCI_OVLY_OPEN_WS
A window style is specified in the dwStyle member of the structure identified by lpOpen. The dwStyle value specifies the style of the window that the driver will create and display if the application does not provide one. The style parameter takes an integer that defines the window style. These constants are the same as the standard window styles (such as WS_CHILD, WS_OVERLAPPEDWINDOW, or WS_POPUP).
For video-overlay devices, the lpOpen parameter points to an MCI_OVLY_OPEN_PARMS structure.
The following additional flag is used with the waveaudio device type:
MCI_WAVE_OPEN_BUFFER
A buffer length is specified in the dwBufferSeconds member of the structure identified by lpOpen.
For waveform-audio devices, the lpOpen parameter points to an MCI_WAVE_OPEN_PARMS structure. The MCIWAVE driver requires an asynchronous waveform-audio device.
Hvala unaprijed!
Pozdrav StratOS
"Multitasking - ability to f##k up several things at once."
"It works better if you plug it in."
"As a rule, software systems do not work well until they have been used, and have failed repeatedly, in real applications."
"The one who is digging the hole for the other to fall in is allready in it."