Merge win.ini/[mci extensions] into the registry.

This commit is contained in:
Dimitrie O. Paun 2003-10-15 20:49:29 +00:00 committed by Alexandre Julliard
parent 19c36fe7c3
commit fc551563ff
2 changed files with 10 additions and 44 deletions

View File

@ -35,6 +35,7 @@
#include "mmsystem.h"
#include "winuser.h"
#include "winnls.h"
#include "winreg.h"
#include "digitalv.h"
#include "winemm.h"
@ -185,13 +186,17 @@ const char* MCI_MessageToString(UINT16 wMsg)
static DWORD MCI_GetDevTypeFromFileName(LPCSTR fileName, LPSTR buf, UINT len)
{
LPSTR tmp;
HKEY hKey;
if ((tmp = strrchr(fileName, '.'))) {
GetProfileStringA("mci extensions", tmp + 1, "*", buf, len);
if (strcmp(buf, "*") != 0) {
return 0;
}
TRACE("No [mci extensions] entry for '%s' found.\n", tmp);
if (RegOpenKeyExA( HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\MCI Extensions",
0, KEY_QUERY_VALUE, &hKey ) == ERROR_SUCCESS) {
DWORD dwLen = len;
LONG lRet = RegQueryValueExA( hKey, tmp + 1, 0, 0, buf, &dwLen );
RegCloseKey( hKey );
if (lRet == ERROR_SUCCESS) return 0;
}
TRACE("No ...\\MCI Extensions entry for '%s' found.\n", tmp);
}
return MCIERR_EXTENSION_NOT_FOUND;
}

View File

@ -1,39 +0,0 @@
[mci extensions]
cda=cdaudio
mid=sequencer
midi=sequencer
rmi=sequencer
;aif=MPEGVideo
aifc=MPEGVideo
;aiff=MPEGVideo
asf=MPEGVideo2
asx=MPEGVideo2
au=MPEGVideo
;avi=MPEGVideo
lsf=MPEGVideo2
lsx=MPEGVideo2
m1v=MPEGVideo
m3u=MPEGVideo
;mov=MPEGVideo
m3u=MPEGVideo
mp2=MPEGVideo
mp2v=MPEGVideo
mp3=MPEGVideo
mpa=MPEGVideo
mpe=MPEGVideo
mpeg=MPEGVideo
mpg=MPEGVideo
mpv=MPEGVideo
mpv2=MPEGVideo
;qt=MPEGVideo
snd=MPEGVideo
rmi=MPEGVideo
;wav=MPEGVideo
wav=waveaudio
wax=MPEGVideo2
wm=MPEGVideo2
wma=MPEGVideo2
wmp=MPEGVideo2
wmv=MPEGVideo2
wmx=MPEGVideo2
wvx=MPEGVideo2