Removed more code at Hidenori's request.
This commit is contained in:
parent
ac3a9a327a
commit
140e7222e0
|
@ -3,9 +3,4 @@ type win32
|
|||
|
||||
import ntdll.dll
|
||||
|
||||
debug_channels (avicap32)
|
||||
|
||||
@ stdcall capCreateCaptureWindowA(str long long long long long long long) capCreateCaptureWindowA
|
||||
@ stdcall capCreateCaptureWindowW(wstr long long long long long long long) capCreateCaptureWindowW
|
||||
@ stdcall capGetDriverDescriptionA(long ptr long ptr long) capGetDriverDescriptionA
|
||||
@ stdcall capGetDriverDescriptionW(long ptr long ptr long) capGetDriverDescriptionW
|
||||
debug_channels ()
|
||||
|
|
|
@ -1,78 +1 @@
|
|||
/*
|
||||
* Copyright (C) Hidenori TAKESHIMA
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
* FIXME - stub
|
||||
*/
|
||||
|
||||
#include "winbase.h"
|
||||
#include "winuser.h"
|
||||
#include "wingdi.h"
|
||||
#include "vfw.h"
|
||||
|
||||
#include "wine/debug.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(avicap32);
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* capCreateCaptureWindowA (AVICAP32.@)
|
||||
*
|
||||
*/
|
||||
HWND WINAPI capCreateCaptureWindowA( LPCSTR pszTitle, DWORD dwStyle, int x, int y, int width, int height, HWND hwndParent, int nID )
|
||||
{
|
||||
FIXME( "(%s,%lx,%d,%d,%d,%d,%x,%d)\n",debugstr_a(pszTitle),dwStyle,x,y,width,height,hwndParent,nID );
|
||||
|
||||
return (HWND)NULL;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* capCreateCaptureWindowW (AVICAP32.@)
|
||||
*
|
||||
*/
|
||||
HWND WINAPI capCreateCaptureWindowW( LPCWSTR pwszTitle, DWORD dwStyle, int x, int y, int width, int height, HWND hwndParent, int nID )
|
||||
{
|
||||
FIXME( "(%s,%lx,%d,%d,%d,%d,%x,%d)\n",debugstr_w(pwszTitle),dwStyle,x,y,width,height,hwndParent,nID );
|
||||
|
||||
return (HWND)NULL;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* capGetDriverDescriptionA (AVICAP32.@)
|
||||
*
|
||||
*/
|
||||
BOOL WINAPI capGetDriverDescriptionA( UINT uDriverIndex, LPSTR pszName, int cbName, LPSTR pszVersion, int cbVersion )
|
||||
{
|
||||
FIXME( "(%u,%p,%d,%p,%d)\n",uDriverIndex,pszName,cbName,pszVersion,cbVersion );
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* capGetDriverDescriptionW (AVICAP32.@)
|
||||
*
|
||||
*/
|
||||
BOOL WINAPI capGetDriverDescriptionW( UINT uDriverIndex, LPWSTR pwszName, int cbName, LPWSTR pwszVersion, int cbVersion )
|
||||
{
|
||||
FIXME( "(%u,%p,%d,%p,%d)\n",uDriverIndex,pwszName,cbName,pwszVersion,cbVersion );
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* all codes are removed by author */
|
||||
|
|
|
@ -1,76 +0,0 @@
|
|||
/*
|
||||
* Copyright 2002 Hidenori Takeshima
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
LANGUAGE LANG_JAPANESE, SUBLANG_DEFAULT
|
||||
|
||||
IDD_PROPSHEET DIALOG DISCARDABLE 0, 0, 220, 140
|
||||
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE
|
||||
CAPTION "Properties for "
|
||||
FONT 8, "MS Pゴシック"
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "OK", IDOK,4,122,50,14, WS_TABSTOP | WS_GROUP
|
||||
PUSHBUTTON "キャンセル", IDCANCEL,58,122,50,14
|
||||
PUSHBUTTON "適用(&A)", IDC_APPLY_BUTTON,112,122,50,14,WS_DISABLED
|
||||
PUSHBUTTON "ヘルプ", IDHELP,166,122,50,14,WS_TABSTOP|WS_GROUP
|
||||
CONTROL "Tab", IDC_TABCONTROL,"SysTabControl32",WS_CLIPSIBLINGS|WS_GROUP|WS_TABSTOP,4,4,212,114
|
||||
END
|
||||
|
||||
|
||||
IDD_WIZARD DIALOG DISCARDABLE 0, 0, 290, 159
|
||||
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE
|
||||
CAPTION "ウィザード"
|
||||
FONT 8, "MS Pゴシック"
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "完了", IDC_FINISH_BUTTON,121,138,50,14
|
||||
DEFPUSHBUTTON "次へ(&N) >", IDC_NEXT_BUTTON,121,138,50,14
|
||||
PUSHBUTTON "< 前へ(&B)", IDC_BACK_BUTTON,71,138,50,14
|
||||
PUSHBUTTON "キャンセル", IDCANCEL,178,138,50,14
|
||||
PUSHBUTTON "ヘルプ", IDHELP,235,138,50,14,WS_GROUP
|
||||
LTEXT "", IDC_SUNKEN_LINE,7,129,278,1,SS_SUNKEN
|
||||
CONTROL "Tab", IDC_TABCONTROL,"SysTabControl32",WS_CLIPSIBLINGS | WS_DISABLED,7,7,258,5
|
||||
END
|
||||
|
||||
|
||||
IDD_TBCUSTOMIZE DIALOG DISCARDABLE 10, 20, 357, 125
|
||||
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "ツールバーのカスタマイズ"
|
||||
FONT 8, "MS Pゴシック"
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "閉じる(&C)", IDCANCEL,308,6,44,14
|
||||
PUSHBUTTON "リセット(&R)", IDC_RESET_BTN,308,23,44,14
|
||||
PUSHBUTTON "ヘルプ(&H)", IDC_HELP_BTN,308,40,44,14
|
||||
PUSHBUTTON "上へ(&U)", IDC_MOVEUP_BTN,308,74,44,14
|
||||
PUSHBUTTON "下へ(&D)", IDC_MOVEDN_BTN,308,91,44,14
|
||||
LTEXT "利用可能なボタン(&V):", -1,4,5,84,10
|
||||
LISTBOX IDC_AVAILBTN_LBOX,4,17,120,100, LBS_NOTIFY | LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | LBS_DISABLENOSCROLL | WS_BORDER | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP
|
||||
PUSHBUTTON "追加(&A) ->", IDOK, 131, 42, 44, 14
|
||||
PUSHBUTTON "<- 削除(&R)", IDC_REMOVE_BTN,131,62,44,14
|
||||
LTEXT "ツールバーのボタン(&T):", -1,182,5,78,10
|
||||
LISTBOX IDC_TOOLBARBTN_LBOX, 182,17,120,100,LBS_NOTIFY | LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | LBS_DISABLENOSCROLL | WS_BORDER | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP
|
||||
END
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
{
|
||||
IDS_CLOSE "閉じる"
|
||||
}
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
{
|
||||
IDS_SEPARATOR "区切り"
|
||||
}
|
||||
|
|
@ -1055,4 +1055,3 @@ IDI_DRAGARROW ICON LOADONCALL DISCARDABLE
|
|||
|
||||
#include "comctl_En.rc"
|
||||
#include "comctl_De.rc"
|
||||
#include "comctl_Ja.rc"
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
/*
|
||||
* OLE2NLS library
|
||||
* Japanese
|
||||
* Japanese strings in codepage 932(Shift-JIS)
|
||||
* modified by Hidenori Takeshima(hidenori@a2.ctktv.ne.jp)
|
||||
* (Japanese strings in EUC-JP)
|
||||
*
|
||||
* Copyright 1998 Marcel Baur
|
||||
*
|
||||
|
@ -22,127 +21,109 @@
|
|||
*/
|
||||
|
||||
LOCVAL(LOCALE_ILANGUAGE,"0411")
|
||||
LOCVAL(LOCALE_SLANGUAGE,"日本語")
|
||||
LOCVAL(LOCALE_SLANGUAGE,"日本語")
|
||||
LOCVAL(LOCALE_SENGLANGUAGE,"Japanese")
|
||||
LOCVAL(LOCALE_SABBREVLANGNAME,"jpn")
|
||||
LOCVAL(LOCALE_SNATIVELANGNAME,"日本語")
|
||||
LOCVAL(LOCALE_SNATIVELANGNAME,"日本語")
|
||||
LOCVAL(LOCALE_ICOUNTRY,"81")
|
||||
LOCVAL(LOCALE_SCOUNTRY,"日本")
|
||||
LOCVAL(LOCALE_SCOUNTRY,"日本")
|
||||
LOCVAL(LOCALE_SENGCOUNTRY,"Japan")
|
||||
LOCVAL(LOCALE_SABBREVCTRYNAME,"JPN")
|
||||
LOCVAL(LOCALE_SNATIVECTRYNAME,"日本")
|
||||
LOCVAL(LOCALE_SNATIVECTRYNAME,"日本")
|
||||
LOCVAL(LOCALE_IDEFAULTLANGUAGE,"0411")
|
||||
LOCVAL(LOCALE_IDEFAULTCOUNTRY,"81")
|
||||
LOCVAL(LOCALE_IDEFAULTCODEPAGE,"932")
|
||||
LOCVAL(LOCALE_IDEFAULTANSICODEPAGE,"932")
|
||||
LOCVAL(LOCALE_IDEFAULTMACCODEPAGE, "10001")
|
||||
LOCVAL(LOCALE_SLIST,",")
|
||||
LOCVAL(LOCALE_IMEASURE,"0")
|
||||
LOCVAL(LOCALE_SDECIMAL,".")
|
||||
LOCVAL(LOCALE_STHOUSAND,",")
|
||||
/* LOCVAL(LOCALE_IDEFAULTCODEPAGE) */
|
||||
/* LOCVAL(LOCALE_IDEFAULTANSICODEPAGE) */
|
||||
/* LOCVAL(LOCALE_SLIST,"") */
|
||||
/* LOCVAL(LOCALE_IMEASURE,"") */
|
||||
/* LOCVAL(LOCALE_SDECIMAL,"") */
|
||||
/* LOCVAL(LOCALE_STHOUSAND,"") */
|
||||
LOCVAL(LOCALE_SGROUPING,"3;0")
|
||||
LOCVAL(LOCALE_IDIGITS,"2")
|
||||
LOCVAL(LOCALE_ILZERO,"1")
|
||||
LOCVAL(LOCALE_INEGNUMBER,"1")
|
||||
/* LOCVAL(LOCALE_IDIGITS,"2") */
|
||||
/* LOCVAL(LOCALE_ILZERO,"1") */
|
||||
/* LOCVAL(LOCALE_INEGNUMBER) */
|
||||
LOCVAL(LOCALE_SNATIVEDIGITS,"0123456789")
|
||||
LOCVAL(LOCALE_SCURRENCY,"円")
|
||||
LOCVAL(LOCALE_SCURRENCY,"円")
|
||||
LOCVAL(LOCALE_SINTLSYMBOL, "JPY")
|
||||
LOCVAL(LOCALE_SMONDECIMALSEP,".")
|
||||
LOCVAL(LOCALE_SMONTHOUSANDSEP,",")
|
||||
LOCVAL(LOCALE_SMONGROUPING,"3;0")
|
||||
LOCVAL(LOCALE_ICURRDIGITS,"0")
|
||||
LOCVAL(LOCALE_IINTLCURRDIGITS,"2")
|
||||
LOCVAL(LOCALE_ICURRENCY,"3")
|
||||
LOCVAL(LOCALE_INEGCURR,"8")
|
||||
LOCVAL(LOCALE_SDATE,"-")
|
||||
LOCVAL(LOCALE_STIME,":")
|
||||
LOCVAL(LOCALE_SSHORTDATE,"yy-MM-dd")
|
||||
LOCVAL(LOCALE_SLONGDATE,"yyyy-MM-dd")
|
||||
LOCVAL(LOCALE_STIMEFORMAT,"HH:mm:ss")
|
||||
LOCVAL(LOCALE_IDATE,"2")
|
||||
LOCVAL(LOCALE_ILDATE,"2")
|
||||
/* LOCVAL(LOCALE_SMONDECIMALSEP,",") */
|
||||
/* LOCVAL(LOCALE_SMONTHOUSANDSEP,".") */
|
||||
/* LOCVAL(LOCALE_SMONGROUPING) */
|
||||
/* LOCVAL(LOCALE_ICURRDIGITS,"2") */
|
||||
/* LOCVAL(LOCALE_IINTLCURRDIGITS) */
|
||||
/* LOCVAL(LOCALE_ICURRENCY,"3") */
|
||||
/* LOCVAL(LOCALE_INEGCURR,"8") */
|
||||
/* LOCVAL(LOCALE_SDATE,".") */
|
||||
/* LOCVAL(LOCALE_STIME,":") */
|
||||
LOCVAL(LOCALE_SSHORTDATE,"yyyy.MM.dd")
|
||||
LOCVAL(LOCALE_SLONGDATE,"yyyy年MMMMd.日のddd")
|
||||
/* LOCVAL(LOCALE_STIMEFORMAT) */
|
||||
/* LOCVAL(LOCALE_IDATE,"1") */
|
||||
/* LOCVAL(LOCALE_ILDATE) */
|
||||
LOCVAL(LOCALE_ITIME,"1")
|
||||
LOCVAL(LOCALE_ITIMEMARKPOSN,"0") /* Is this correct?(I have no documents.) */
|
||||
LOCVAL(LOCALE_ICENTURY,"0")
|
||||
LOCVAL(LOCALE_ITLZERO,"0")
|
||||
LOCVAL(LOCALE_IDAYLZERO,"0")
|
||||
LOCVAL(LOCALE_IMONLZERO,"0")
|
||||
LOCVAL(LOCALE_S1159, "午前")
|
||||
LOCVAL(LOCALE_S2359, "午後")
|
||||
LOCVAL(LOCALE_ICALENDARTYPE, "2")
|
||||
LOCVAL(LOCALE_IOPTIONALCALENDAR,"2")
|
||||
LOCVAL(LOCALE_IFIRSTDAYOFWEEK,"6")
|
||||
LOCVAL(LOCALE_IFIRSTWEEKOFYEAR,"0")
|
||||
/* LOCVAL(LOCALE_ITIMEMARKPOSN) */
|
||||
/* LOCVAL(LOCALE_ICENTURY) */
|
||||
LOCVAL(LOCALE_ITLZERO,"1")
|
||||
/* LOCVAL(LOCALE_IDAYLZERO) */
|
||||
/* LOCVAL(LOCALE_IMONLZERO) */
|
||||
/* LOCVAL(LOCALE_S1159, "") */
|
||||
/* LOCVAL(LOCALE_S2359, "") */
|
||||
LOCVAL(LOCALE_ICALENDARTYPE, "1")
|
||||
/* LOCVAL(LOCALE_IOPTIONALCALENDAR) */
|
||||
/* LOCVAL(LOCALE_IFIRSTDAYOFWEEK) */
|
||||
/* LOCVAL(LOCALE_IFIRSTWEEKOFYEAR) */
|
||||
|
||||
LOCVAL(LOCALE_SDAYNAME1,"月曜日")
|
||||
LOCVAL(LOCALE_SDAYNAME2,"火曜日")
|
||||
LOCVAL(LOCALE_SDAYNAME3,"水曜日")
|
||||
LOCVAL(LOCALE_SDAYNAME4,"木曜日")
|
||||
LOCVAL(LOCALE_SDAYNAME5,"金曜日")
|
||||
LOCVAL(LOCALE_SDAYNAME6,"土曜日")
|
||||
LOCVAL(LOCALE_SDAYNAME7,"日曜日")
|
||||
LOCVAL(LOCALE_SDAYNAME1,"月曜日")
|
||||
LOCVAL(LOCALE_SDAYNAME2,"火曜日")
|
||||
LOCVAL(LOCALE_SDAYNAME3,"水曜日")
|
||||
LOCVAL(LOCALE_SDAYNAME4,"木曜日")
|
||||
LOCVAL(LOCALE_SDAYNAME5,"金曜日")
|
||||
LOCVAL(LOCALE_SDAYNAME6,"土曜日")
|
||||
LOCVAL(LOCALE_SDAYNAME7,"日曜日")
|
||||
|
||||
LOCVAL(LOCALE_SABBREVDAYNAME1,"月")
|
||||
LOCVAL(LOCALE_SABBREVDAYNAME2,"火")
|
||||
LOCVAL(LOCALE_SABBREVDAYNAME3,"水")
|
||||
LOCVAL(LOCALE_SABBREVDAYNAME4,"木")
|
||||
LOCVAL(LOCALE_SABBREVDAYNAME5,"金")
|
||||
LOCVAL(LOCALE_SABBREVDAYNAME6,"土")
|
||||
LOCVAL(LOCALE_SABBREVDAYNAME7,"日")
|
||||
LOCVAL(LOCALE_SABBREVDAYNAME1,"月")
|
||||
LOCVAL(LOCALE_SABBREVDAYNAME2,"火")
|
||||
LOCVAL(LOCALE_SABBREVDAYNAME3,"水")
|
||||
LOCVAL(LOCALE_SABBREVDAYNAME4,"木")
|
||||
LOCVAL(LOCALE_SABBREVDAYNAME5,"金")
|
||||
LOCVAL(LOCALE_SABBREVDAYNAME6,"土")
|
||||
LOCVAL(LOCALE_SABBREVDAYNAME7,"日")
|
||||
|
||||
#if 0
|
||||
/* classical format:-) */
|
||||
LOCVAL(LOCALE_SMONTHNAME1,"睦月")
|
||||
LOCVAL(LOCALE_SMONTHNAME2,"如月")
|
||||
LOCVAL(LOCALE_SMONTHNAME3,"弥生")
|
||||
LOCVAL(LOCALE_SMONTHNAME4,"卯月")
|
||||
LOCVAL(LOCALE_SMONTHNAME5,"皐月")
|
||||
LOCVAL(LOCALE_SMONTHNAME6,"水無月")
|
||||
LOCVAL(LOCALE_SMONTHNAME7,"文月")
|
||||
LOCVAL(LOCALE_SMONTHNAME8,"葉月")
|
||||
LOCVAL(LOCALE_SMONTHNAME9,"長月")
|
||||
LOCVAL(LOCALE_SMONTHNAME10,"神無月")
|
||||
LOCVAL(LOCALE_SMONTHNAME11,"霜月")
|
||||
LOCVAL(LOCALE_SMONTHNAME12,"師走")
|
||||
LOCVAL(LOCALE_SMONTHNAME13,"")
|
||||
#else
|
||||
LOCVAL(LOCALE_SMONTHNAME1,"1月")
|
||||
LOCVAL(LOCALE_SMONTHNAME2,"2月")
|
||||
LOCVAL(LOCALE_SMONTHNAME3,"3月")
|
||||
LOCVAL(LOCALE_SMONTHNAME4,"4月")
|
||||
LOCVAL(LOCALE_SMONTHNAME5,"5月")
|
||||
LOCVAL(LOCALE_SMONTHNAME6,"6月")
|
||||
LOCVAL(LOCALE_SMONTHNAME7,"7月")
|
||||
LOCVAL(LOCALE_SMONTHNAME8,"8月")
|
||||
LOCVAL(LOCALE_SMONTHNAME9,"9月")
|
||||
LOCVAL(LOCALE_SMONTHNAME10,"10月")
|
||||
LOCVAL(LOCALE_SMONTHNAME11,"11月")
|
||||
LOCVAL(LOCALE_SMONTHNAME12,"12月")
|
||||
LOCVAL(LOCALE_SMONTHNAME13,"")
|
||||
#endif
|
||||
LOCVAL(LOCALE_SMONTHNAME1,"一月")
|
||||
LOCVAL(LOCALE_SMONTHNAME2,"二月")
|
||||
LOCVAL(LOCALE_SMONTHNAME3,"三月")
|
||||
LOCVAL(LOCALE_SMONTHNAME4,"四月")
|
||||
LOCVAL(LOCALE_SMONTHNAME5,"五月")
|
||||
LOCVAL(LOCALE_SMONTHNAME6,"六月")
|
||||
LOCVAL(LOCALE_SMONTHNAME7,"七月")
|
||||
LOCVAL(LOCALE_SMONTHNAME8,"八月")
|
||||
LOCVAL(LOCALE_SMONTHNAME9,"九月")
|
||||
LOCVAL(LOCALE_SMONTHNAME10,"十月")
|
||||
LOCVAL(LOCALE_SMONTHNAME11,"十一月")
|
||||
LOCVAL(LOCALE_SMONTHNAME12,"十二月")
|
||||
/* LOCVAL(LOCALE_SMONTHNAME13,"") */
|
||||
|
||||
LOCVAL(LOCALE_SABBREVMONTHNAME1,"1")
|
||||
LOCVAL(LOCALE_SABBREVMONTHNAME2,"2")
|
||||
LOCVAL(LOCALE_SABBREVMONTHNAME3,"3")
|
||||
LOCVAL(LOCALE_SABBREVMONTHNAME4,"4")
|
||||
LOCVAL(LOCALE_SABBREVMONTHNAME5,"5")
|
||||
LOCVAL(LOCALE_SABBREVMONTHNAME6,"6")
|
||||
LOCVAL(LOCALE_SABBREVMONTHNAME7,"7")
|
||||
LOCVAL(LOCALE_SABBREVMONTHNAME8,"8")
|
||||
LOCVAL(LOCALE_SABBREVMONTHNAME9,"9")
|
||||
LOCVAL(LOCALE_SABBREVMONTHNAME10,"10")
|
||||
LOCVAL(LOCALE_SABBREVMONTHNAME11,"11")
|
||||
LOCVAL(LOCALE_SABBREVMONTHNAME12,"12")
|
||||
LOCVAL(LOCALE_SABBREVMONTHNAME13,"")
|
||||
LOCVAL(LOCALE_SABBREVMONTHNAME1,"1月")
|
||||
LOCVAL(LOCALE_SABBREVMONTHNAME2,"2月")
|
||||
LOCVAL(LOCALE_SABBREVMONTHNAME3,"3月")
|
||||
LOCVAL(LOCALE_SABBREVMONTHNAME4,"4月")
|
||||
LOCVAL(LOCALE_SABBREVMONTHNAME5,"5月")
|
||||
LOCVAL(LOCALE_SABBREVMONTHNAME6,"6月")
|
||||
LOCVAL(LOCALE_SABBREVMONTHNAME7,"7月")
|
||||
LOCVAL(LOCALE_SABBREVMONTHNAME8,"8月")
|
||||
LOCVAL(LOCALE_SABBREVMONTHNAME9,"9月")
|
||||
LOCVAL(LOCALE_SABBREVMONTHNAME10,"10月")
|
||||
LOCVAL(LOCALE_SABBREVMONTHNAME11,"11月")
|
||||
LOCVAL(LOCALE_SABBREVMONTHNAME12,"12月")
|
||||
/* LOCVAL(LOCALE_SABBREVMONTHNAME13,"") */
|
||||
|
||||
LOCVAL(LOCALE_SPOSITIVESIGN, "")
|
||||
LOCVAL(LOCALE_SNEGATIVESIGN, "-")
|
||||
LOCVAL(LOCALE_IPOSSIGNPOSN, "1")
|
||||
LOCVAL(LOCALE_INEGSIGNPOSN, "1")
|
||||
LOCVAL(LOCALE_IPOSSYMPRECEDES, "0")
|
||||
LOCVAL(LOCALE_IPOSSEPBYSPACE, "1")
|
||||
LOCVAL(LOCALE_INEGSYMPRECEDES, "0")
|
||||
LOCVAL(LOCALE_INEGSEPBYSPACE, "1")
|
||||
/* LOCVAL(LOCALE_SPOSITIVESIGN, "") */
|
||||
/* LOCVAL(LOCALE_SNEGATIVESIGN, "") */
|
||||
/* LOCVAL(LOCALE_IPOSSIGNPOSN, "") */
|
||||
/* LOCVAL(LOCALE_INEGSIGNPOSN, "") */
|
||||
/* LOCVAL(LOCALE_IPOSSYMPRECEDES, "") */
|
||||
/* LOCVAL(LOCALE_IPOSSEPBYSPACE, "") */
|
||||
/* LOCVAL(LOCALE_INEGSYMPRECEDES, "") */
|
||||
/* LOCVAL(LOCALE_INEGSEPBYSPACE, "") */
|
||||
/* LOCVAL(LOCALE_FONTSIGNATURE, "") */
|
||||
LOCVAL(LOCALE_SISO639LANGNAME,"ja")
|
||||
LOCVAL(LOCALE_SISO3166CTRYNAME,"JP")
|
||||
|
|
|
@ -1,13 +1,9 @@
|
|||
name imaadp32
|
||||
file imaadp32.acm
|
||||
type win32
|
||||
init IMAADP32_DllMain
|
||||
|
||||
import winmm.dll
|
||||
import user32.dll
|
||||
import kernel32.dll
|
||||
import ntdll.dll
|
||||
|
||||
debug_channels (imaadp32)
|
||||
debug_channels ()
|
||||
|
||||
@ stdcall DriverProc(long long long long long) IMAADP32_DriverProc
|
||||
@ stub DriverProc #(long long long long long)
|
||||
|
|
|
@ -1,727 +1 @@
|
|||
/*
|
||||
* imaadp32.drv - IMA4 codec driver
|
||||
*
|
||||
* Copyright 2001 Hidenori Takeshima
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*
|
||||
* FIXME - no encoding.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "wingdi.h"
|
||||
#include "winnls.h"
|
||||
#include "winuser.h"
|
||||
#include "mmsystem.h"
|
||||
#include "msacm.h"
|
||||
#include "../msacmdrv.h"
|
||||
|
||||
#include "wine/debug.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(imaadp32);
|
||||
|
||||
/***********************************************************************/
|
||||
|
||||
enum CodecType
|
||||
{
|
||||
CodecType_Invalid,
|
||||
CodecType_EncIMAADPCM,
|
||||
CodecType_DecIMAADPCM,
|
||||
};
|
||||
|
||||
typedef struct CodecImpl
|
||||
{
|
||||
int dummy;
|
||||
} CodecImpl;
|
||||
|
||||
/***********************************************************************/
|
||||
|
||||
|
||||
static const int ima_step[88+1] =
|
||||
{
|
||||
/* from Y.Ajima's WAVFMT.TXT */
|
||||
7, 8, 9, 10, 11, 12, 13, 14,
|
||||
16, 17, 19, 21, 23, 25, 28, 31,
|
||||
34, 37, 41, 45, 50, 55, 60, 66,
|
||||
73, 80, 88, 97, 107, 118, 130, 143,
|
||||
157, 173, 190, 209, 230, 253, 279, 307,
|
||||
337, 371, 408, 449, 494, 544, 598, 658,
|
||||
724, 796, 876, 963, 1060, 1166, 1282, 1411,
|
||||
1552, 1707, 1878, 2066, 2272, 2499, 2749, 3024,
|
||||
3327, 3660, 4026, 4428, 4871, 5358, 5894, 6484,
|
||||
7132, 7845, 8630, 9493, 10442, 11487, 12635, 13899,
|
||||
15289, 16818, 18500, 20350, 22385, 24623, 27086, 29794, 32767
|
||||
};
|
||||
|
||||
static const int ima_indexupdate[8*2] =
|
||||
{
|
||||
/* from Y.Ajima's WAVFMT.TXT */
|
||||
-1,-1,-1,-1, 2, 4, 6, 8,
|
||||
-1,-1,-1,-1, 2, 4, 6, 8,
|
||||
};
|
||||
|
||||
static int stepindex_to_diff( int stepindex, int input )
|
||||
{
|
||||
/* from Y.Ajima's WAVFMT.TXT */
|
||||
int absdiff;
|
||||
|
||||
absdiff = (ima_step[stepindex]*((input&0x7)*2+1)) >> 3;
|
||||
return (input&0x8) ? (-absdiff) : absdiff;
|
||||
}
|
||||
|
||||
static int update_stepindex( int oldindex, int input )
|
||||
{
|
||||
int index;
|
||||
|
||||
index = oldindex + ima_indexupdate[input];
|
||||
return (index < 0) ? 0 : (index > 88) ? 88 : index;
|
||||
}
|
||||
|
||||
static void decode_ima_block( int channels, int samplesperblock, SHORT* pDst, BYTE* pSrc )
|
||||
{
|
||||
int samp[2];
|
||||
int stepindex[2];
|
||||
int inputs[8];
|
||||
int n,k,diff;
|
||||
|
||||
for ( n = 0; n < channels; n++ )
|
||||
{
|
||||
samp[n] = *(SHORT*)pSrc; pSrc += sizeof(SHORT);
|
||||
stepindex[n] = *pSrc; pSrc += sizeof(SHORT);
|
||||
*pDst++ = samp[n];
|
||||
}
|
||||
samplesperblock --;
|
||||
|
||||
while ( samplesperblock >= 8 )
|
||||
{
|
||||
for ( n = 0; n < channels; n++ )
|
||||
{
|
||||
for ( k = 0; k < 4; k++ )
|
||||
{
|
||||
inputs[k*2+0] = (*pSrc) & 0xf;
|
||||
inputs[k*2+1] = (*pSrc) >> 4;
|
||||
pSrc ++;
|
||||
}
|
||||
for ( k = 0; k < 8; k++ )
|
||||
{
|
||||
diff = stepindex_to_diff( stepindex[n], inputs[k] );
|
||||
stepindex[n] = update_stepindex( stepindex[n], inputs[k] );
|
||||
diff += samp[n];
|
||||
if ( diff < -32768 ) diff = -32768;
|
||||
if ( diff > 32767 ) diff = 32767;
|
||||
samp[n] = diff;
|
||||
pDst[k*channels+n] = samp[n];
|
||||
}
|
||||
}
|
||||
|
||||
pDst += channels*8;
|
||||
samplesperblock -= 8;
|
||||
}
|
||||
}
|
||||
|
||||
static LONG IMAADPCM32_Decode( int channels, int blockalign, int samplesperblock, BYTE* pbDst, DWORD cbDstLength, DWORD* pcbDstLengthUsed, BYTE* pbSrc, DWORD cbSrcLength, DWORD* pcbSrcLengthUsed )
|
||||
{
|
||||
DWORD cbDstLengthUsed = 0;
|
||||
DWORD cbSrcLengthUsed = 0;
|
||||
int dstblocksize;
|
||||
|
||||
dstblocksize = samplesperblock*channels*sizeof(SHORT);
|
||||
while ( cbDstLength >= dstblocksize && cbSrcLength >= blockalign )
|
||||
{
|
||||
decode_ima_block( channels, samplesperblock, (SHORT*)pbDst, pbSrc );
|
||||
pbDst += dstblocksize;
|
||||
cbDstLength -= dstblocksize;
|
||||
cbDstLengthUsed += dstblocksize;
|
||||
pbSrc += blockalign;
|
||||
cbSrcLength -= blockalign;
|
||||
cbSrcLengthUsed += blockalign;
|
||||
}
|
||||
|
||||
*pcbSrcLengthUsed = cbSrcLengthUsed;
|
||||
*pcbDstLengthUsed = cbDstLengthUsed;
|
||||
|
||||
return MMSYSERR_NOERROR;
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************/
|
||||
|
||||
static LONG Codec_DrvQueryConfigure( CodecImpl* This )
|
||||
{
|
||||
return MMSYSERR_NOTSUPPORTED;
|
||||
}
|
||||
|
||||
static LONG Codec_DrvConfigure( CodecImpl* This, HWND hwnd, DRVCONFIGINFO* pinfo )
|
||||
{
|
||||
return MMSYSERR_NOTSUPPORTED;
|
||||
}
|
||||
|
||||
static LONG Codec_DriverDetails( ACMDRIVERDETAILSW* pDrvDetails )
|
||||
{
|
||||
if ( pDrvDetails->cbStruct < sizeof(ACMDRIVERDETAILSW) )
|
||||
return MMSYSERR_INVALPARAM;
|
||||
|
||||
ZeroMemory( pDrvDetails, sizeof(ACMDRIVERDETAILSW) );
|
||||
pDrvDetails->cbStruct = sizeof(ACMDRIVERDETAILSW);
|
||||
|
||||
pDrvDetails->fccType = ACMDRIVERDETAILS_FCCTYPE_AUDIOCODEC;
|
||||
pDrvDetails->fccComp = ACMDRIVERDETAILS_FCCCOMP_UNDEFINED;
|
||||
pDrvDetails->wMid = 0xff; /* FIXME? */
|
||||
pDrvDetails->wPid = 0x00; /* FIXME? */
|
||||
pDrvDetails->vdwACM = 0x01000000; /* FIXME? */
|
||||
pDrvDetails->vdwDriver = 0x01000000; /* FIXME? */
|
||||
pDrvDetails->fdwSupport = ACMDRIVERDETAILS_SUPPORTF_CODEC;
|
||||
pDrvDetails->cFormatTags = 2;
|
||||
pDrvDetails->cFilterTags = 0;
|
||||
pDrvDetails->hicon = (HICON)NULL;
|
||||
MultiByteToWideChar( CP_ACP, 0, "WineIMA", -1,
|
||||
pDrvDetails->szShortName,
|
||||
sizeof(pDrvDetails->szShortName)/sizeof(WCHAR) );
|
||||
MultiByteToWideChar( CP_ACP, 0, "Wine IMA codec", -1,
|
||||
pDrvDetails->szLongName,
|
||||
sizeof(pDrvDetails->szLongName)/sizeof(WCHAR) );
|
||||
MultiByteToWideChar( CP_ACP, 0, "Brought to you by the Wine team...", -1,
|
||||
pDrvDetails->szCopyright,
|
||||
sizeof(pDrvDetails->szCopyright)/sizeof(WCHAR) );
|
||||
MultiByteToWideChar( CP_ACP, 0, "Refer to LICENSE file", -1,
|
||||
pDrvDetails->szLicensing,
|
||||
sizeof(pDrvDetails->szLicensing)/sizeof(WCHAR) );
|
||||
pDrvDetails->szFeatures[0] = 0;
|
||||
|
||||
return MMSYSERR_NOERROR;
|
||||
}
|
||||
|
||||
static LONG Codec_QueryAbout( void )
|
||||
{
|
||||
return MMSYSERR_NOTSUPPORTED;
|
||||
}
|
||||
|
||||
static LONG Codec_About( HWND hwnd )
|
||||
{
|
||||
return MMSYSERR_NOTSUPPORTED;
|
||||
}
|
||||
|
||||
/***********************************************************************/
|
||||
|
||||
static LONG Codec_FormatTagDetails( CodecImpl* This, ACMFORMATTAGDETAILSW* pFmtTagDetails, DWORD dwFlags )
|
||||
{
|
||||
FIXME( "enumerate tags\n" );
|
||||
|
||||
switch ( dwFlags )
|
||||
{
|
||||
case ACM_FORMATTAGDETAILSF_INDEX:
|
||||
switch ( pFmtTagDetails->dwFormatTagIndex )
|
||||
{
|
||||
case 0:
|
||||
pFmtTagDetails->dwFormatTag = 0x11; /* IMA ADPCM */
|
||||
break;
|
||||
case 1:
|
||||
pFmtTagDetails->dwFormatTag = 1; /* PCM */
|
||||
break;
|
||||
default:
|
||||
return ACMERR_NOTPOSSIBLE;
|
||||
}
|
||||
break;
|
||||
case ACM_FORMATTAGDETAILSF_FORMATTAG:
|
||||
switch ( pFmtTagDetails->dwFormatTag )
|
||||
{
|
||||
case 0x11: /* IMA ADPCM */
|
||||
pFmtTagDetails->dwFormatTagIndex = 0;
|
||||
break;
|
||||
case 1: /* PCM */
|
||||
pFmtTagDetails->dwFormatTagIndex = 1;
|
||||
break;
|
||||
default:
|
||||
return ACMERR_NOTPOSSIBLE;
|
||||
}
|
||||
break;
|
||||
case ACM_FORMATTAGDETAILSF_LARGESTSIZE:
|
||||
if ( pFmtTagDetails->dwFormatTag != 0 &&
|
||||
pFmtTagDetails->dwFormatTag != 1 &&
|
||||
pFmtTagDetails->dwFormatTag != 0x11 )
|
||||
return ACMERR_NOTPOSSIBLE;
|
||||
pFmtTagDetails->dwFormatTagIndex = 0;
|
||||
break;
|
||||
default:
|
||||
return MMSYSERR_NOTSUPPORTED;
|
||||
}
|
||||
|
||||
pFmtTagDetails->fdwSupport = ACMDRIVERDETAILS_SUPPORTF_CODEC;
|
||||
pFmtTagDetails->cbFormatSize = sizeof(WAVEFORMATEX);
|
||||
pFmtTagDetails->cStandardFormats = 2; /* FIXME */
|
||||
pFmtTagDetails->szFormatTag[0] = 0; /* FIXME */
|
||||
|
||||
return MMSYSERR_NOERROR;
|
||||
}
|
||||
|
||||
static LONG Codec_FormatDetails( CodecImpl* This, ACMFORMATDETAILSW* pFmtDetails, DWORD dwFlags )
|
||||
{
|
||||
FIXME( "enumerate standard formats\n" );
|
||||
|
||||
if ( pFmtDetails->cbStruct < sizeof(ACMFORMATDETAILSW) )
|
||||
return MMSYSERR_INVALPARAM;
|
||||
pFmtDetails->cbStruct = sizeof(ACMFORMATDETAILSW);
|
||||
|
||||
switch ( dwFlags )
|
||||
{
|
||||
case ACM_FORMATDETAILSF_INDEX:
|
||||
switch ( pFmtDetails->dwFormatIndex )
|
||||
{
|
||||
case 0:
|
||||
pFmtDetails->dwFormatTag = 0x11; /* IMA ADPCM */
|
||||
break;
|
||||
case 1:
|
||||
pFmtDetails->dwFormatTag = 1; /* PCM */
|
||||
break;
|
||||
default:
|
||||
return MMSYSERR_INVALPARAM;
|
||||
}
|
||||
break;
|
||||
case ACM_FORMATDETAILSF_FORMAT:
|
||||
switch ( pFmtDetails->dwFormatTag )
|
||||
{
|
||||
case 0x11: /* IMA ADPCM */
|
||||
pFmtDetails->dwFormatIndex = 0;
|
||||
break;
|
||||
case 1: /* PCM */
|
||||
pFmtDetails->dwFormatIndex = 1;
|
||||
break;
|
||||
default:
|
||||
return ACMERR_NOTPOSSIBLE;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
return MMSYSERR_NOTSUPPORTED;
|
||||
}
|
||||
|
||||
pFmtDetails->fdwSupport = ACMDRIVERDETAILS_SUPPORTF_CODEC;
|
||||
pFmtDetails->pwfx->wFormatTag = pFmtDetails->dwFormatTag;
|
||||
pFmtDetails->pwfx->nChannels = 1;
|
||||
pFmtDetails->pwfx->nSamplesPerSec = 11025;
|
||||
pFmtDetails->pwfx->wBitsPerSample = 4;
|
||||
if ( pFmtDetails->dwFormatTag == 1 )
|
||||
{
|
||||
pFmtDetails->cbwfx = sizeof(PCMWAVEFORMAT);
|
||||
}
|
||||
else
|
||||
{
|
||||
pFmtDetails->pwfx->cbSize = sizeof(WORD);
|
||||
pFmtDetails->cbwfx = sizeof(WAVEFORMATEX) + sizeof(WORD);
|
||||
}
|
||||
pFmtDetails->szFormat[0] = 0; /* FIXME */
|
||||
|
||||
return MMSYSERR_NOERROR;
|
||||
}
|
||||
|
||||
|
||||
static LONG Codec_FormatSuggest( CodecImpl* This, ACMDRVFORMATSUGGEST* pFmtSuggest )
|
||||
{
|
||||
DWORD fdwSuggest;
|
||||
|
||||
FIXME( "get suggested format\n" );
|
||||
|
||||
if ( pFmtSuggest->cbStruct != sizeof(ACMDRVFORMATSUGGEST) )
|
||||
return MMSYSERR_INVALPARAM;
|
||||
|
||||
if ( pFmtSuggest->cbwfxSrc < sizeof(PCMWAVEFORMAT) ||
|
||||
pFmtSuggest->cbwfxDst < sizeof(PCMWAVEFORMAT) )
|
||||
return MMSYSERR_INVALPARAM;
|
||||
|
||||
fdwSuggest = pFmtSuggest->fdwSuggest;
|
||||
|
||||
if ( fdwSuggest & ACM_FORMATSUGGESTF_NCHANNELS )
|
||||
{
|
||||
if ( pFmtSuggest->pwfxSrc->nChannels != pFmtSuggest->pwfxDst->nChannels )
|
||||
return ACMERR_NOTPOSSIBLE;
|
||||
fdwSuggest &= ~ACM_FORMATSUGGESTF_NCHANNELS;
|
||||
}
|
||||
|
||||
if ( fdwSuggest & ACM_FORMATSUGGESTF_NSAMPLESPERSEC )
|
||||
{
|
||||
if ( pFmtSuggest->pwfxSrc->nSamplesPerSec != pFmtSuggest->pwfxDst->nSamplesPerSec )
|
||||
return ACMERR_NOTPOSSIBLE;
|
||||
fdwSuggest &= ~ACM_FORMATSUGGESTF_NSAMPLESPERSEC;
|
||||
}
|
||||
|
||||
if ( pFmtSuggest->pwfxSrc->wFormatTag == 1 )
|
||||
{
|
||||
/* Compressor */
|
||||
if ( pFmtSuggest->cbwfxDst < (sizeof(WAVEFORMATEX)+sizeof(WORD)) )
|
||||
return MMSYSERR_INVALPARAM;
|
||||
if ( pFmtSuggest->pwfxSrc->wBitsPerSample != 16 )
|
||||
return ACMERR_NOTPOSSIBLE;
|
||||
|
||||
if ( fdwSuggest & ACM_FORMATSUGGESTF_WFORMATTAG )
|
||||
{
|
||||
if ( pFmtSuggest->pwfxDst->wFormatTag != 0x11 )
|
||||
return ACMERR_NOTPOSSIBLE;
|
||||
fdwSuggest &= ~ACM_FORMATSUGGESTF_WFORMATTAG;
|
||||
}
|
||||
|
||||
if ( fdwSuggest & ACM_FORMATSUGGESTF_WBITSPERSAMPLE )
|
||||
{
|
||||
if ( pFmtSuggest->pwfxDst->wBitsPerSample != 4 )
|
||||
return ACMERR_NOTPOSSIBLE;
|
||||
fdwSuggest &= ~ACM_FORMATSUGGESTF_WFORMATTAG;
|
||||
}
|
||||
|
||||
if ( fdwSuggest != 0 )
|
||||
return MMSYSERR_INVALFLAG;
|
||||
|
||||
if ( !(fdwSuggest & ACM_FORMATSUGGESTF_WFORMATTAG) )
|
||||
pFmtSuggest->pwfxDst->wFormatTag = 0x11;
|
||||
pFmtSuggest->pwfxDst->nChannels = pFmtSuggest->pwfxSrc->nChannels;
|
||||
pFmtSuggest->pwfxDst->nSamplesPerSec = pFmtSuggest->pwfxSrc->nSamplesPerSec;
|
||||
pFmtSuggest->pwfxDst->nAvgBytesPerSec = 0; /* FIXME */
|
||||
pFmtSuggest->pwfxDst->nBlockAlign = 0; /* FIXME */
|
||||
pFmtSuggest->pwfxDst->wBitsPerSample = 4;
|
||||
pFmtSuggest->pwfxDst->cbSize = 2;
|
||||
|
||||
FIXME( "no compressor" );
|
||||
return ACMERR_NOTPOSSIBLE;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Decompressor */
|
||||
if ( pFmtSuggest->cbwfxSrc < (sizeof(WAVEFORMATEX)+sizeof(WORD)) )
|
||||
return MMSYSERR_INVALPARAM;
|
||||
if ( pFmtSuggest->pwfxSrc->wFormatTag != 0x11 )
|
||||
return ACMERR_NOTPOSSIBLE;
|
||||
if ( pFmtSuggest->pwfxSrc->wBitsPerSample != 4 )
|
||||
return ACMERR_NOTPOSSIBLE;
|
||||
|
||||
if ( fdwSuggest & ACM_FORMATSUGGESTF_WFORMATTAG )
|
||||
{
|
||||
if ( pFmtSuggest->pwfxDst->wFormatTag != 1 )
|
||||
return ACMERR_NOTPOSSIBLE;
|
||||
fdwSuggest &= ~ACM_FORMATSUGGESTF_WFORMATTAG;
|
||||
}
|
||||
|
||||
if ( fdwSuggest & ACM_FORMATSUGGESTF_WBITSPERSAMPLE )
|
||||
{
|
||||
if ( pFmtSuggest->pwfxDst->wBitsPerSample != 16 )
|
||||
return ACMERR_NOTPOSSIBLE;
|
||||
fdwSuggest &= ~ACM_FORMATSUGGESTF_WFORMATTAG;
|
||||
}
|
||||
|
||||
if ( fdwSuggest != 0 )
|
||||
return MMSYSERR_INVALFLAG;
|
||||
|
||||
pFmtSuggest->pwfxDst->wFormatTag = 1;
|
||||
pFmtSuggest->pwfxDst->nChannels = pFmtSuggest->pwfxSrc->nChannels;
|
||||
pFmtSuggest->pwfxDst->nSamplesPerSec = pFmtSuggest->pwfxSrc->nSamplesPerSec;
|
||||
pFmtSuggest->pwfxDst->nAvgBytesPerSec = pFmtSuggest->pwfxSrc->nSamplesPerSec * pFmtSuggest->pwfxSrc->nChannels * 2;
|
||||
pFmtSuggest->pwfxDst->nBlockAlign = pFmtSuggest->pwfxSrc->nChannels * 2;
|
||||
pFmtSuggest->pwfxDst->wBitsPerSample = 16;
|
||||
}
|
||||
|
||||
return MMSYSERR_NOERROR;
|
||||
}
|
||||
|
||||
static LONG Codec_FilterTagDetails( CodecImpl* This, ACMFILTERTAGDETAILSW* pFilterTagDetails, DWORD dwFlags )
|
||||
{
|
||||
/* This is a codec driver. */
|
||||
return MMSYSERR_NOTSUPPORTED;
|
||||
}
|
||||
|
||||
static LONG Codec_FilterDetails( CodecImpl* This, ACMFILTERDETAILSW* pFilterDetails, DWORD dwFlags )
|
||||
{
|
||||
/* This is a codec driver. */
|
||||
return MMSYSERR_NOTSUPPORTED;
|
||||
}
|
||||
|
||||
static LONG Codec_StreamOpen( CodecImpl* This, ACMDRVSTREAMINSTANCE* pStreamInst )
|
||||
{
|
||||
enum CodecType codectype = CodecType_Invalid;
|
||||
|
||||
if ( pStreamInst->cbStruct != sizeof(ACMDRVSTREAMINSTANCE) )
|
||||
{
|
||||
TRACE("invalid size of struct\n");
|
||||
return MMSYSERR_INVALPARAM;
|
||||
}
|
||||
|
||||
if ( pStreamInst->fdwOpen & (~(ACM_STREAMOPENF_ASYNC|ACM_STREAMOPENF_NONREALTIME|ACM_STREAMOPENF_QUERY|CALLBACK_EVENT|CALLBACK_FUNCTION|CALLBACK_WINDOW)) )
|
||||
{
|
||||
TRACE("unknown flags\n");
|
||||
return MMSYSERR_INVALFLAG;
|
||||
}
|
||||
|
||||
/* No support for async operations. */
|
||||
if ( pStreamInst->fdwOpen & ACM_STREAMOPENF_ASYNC )
|
||||
return MMSYSERR_INVALFLAG;
|
||||
|
||||
/* This is a codec driver. */
|
||||
if ( pStreamInst->pwfxSrc->nChannels != pStreamInst->pwfxDst->nChannels || pStreamInst->pwfxSrc->nSamplesPerSec != pStreamInst->pwfxDst->nSamplesPerSec )
|
||||
return ACMERR_NOTPOSSIBLE;
|
||||
if ( pStreamInst->pwfltr != NULL )
|
||||
return ACMERR_NOTPOSSIBLE;
|
||||
|
||||
if ( pStreamInst->pwfxSrc->wFormatTag == 1 )
|
||||
{
|
||||
if ( pStreamInst->pwfxSrc->wBitsPerSample != 16 )
|
||||
return ACMERR_NOTPOSSIBLE;
|
||||
if ( pStreamInst->pwfxDst->wBitsPerSample != 4 )
|
||||
return ACMERR_NOTPOSSIBLE;
|
||||
|
||||
/* Queried as a compressor */
|
||||
FIXME( "Compressor is not implemented now\n" );
|
||||
return ACMERR_NOTPOSSIBLE;
|
||||
}
|
||||
else
|
||||
if ( pStreamInst->pwfxDst->wFormatTag == 1 )
|
||||
{
|
||||
if ( pStreamInst->pwfxDst->wBitsPerSample != 16 )
|
||||
return ACMERR_NOTPOSSIBLE;
|
||||
if ( pStreamInst->pwfxSrc->wBitsPerSample != 4 )
|
||||
return ACMERR_NOTPOSSIBLE;
|
||||
|
||||
switch ( pStreamInst->pwfxSrc->wFormatTag )
|
||||
{
|
||||
case 0x11: /* IMA ADPCM */
|
||||
TRACE( "IMG ADPCM deompressor\n" );
|
||||
codectype = CodecType_DecIMAADPCM;
|
||||
break;
|
||||
default:
|
||||
return ACMERR_NOTPOSSIBLE;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return ACMERR_NOTPOSSIBLE;
|
||||
}
|
||||
|
||||
if ( pStreamInst->fdwOpen & ACM_STREAMOPENF_QUERY )
|
||||
return MMSYSERR_NOERROR;
|
||||
|
||||
pStreamInst->dwDriver = (DWORD)codectype;
|
||||
|
||||
return MMSYSERR_NOERROR;
|
||||
}
|
||||
|
||||
static LONG Codec_StreamClose( CodecImpl* This, ACMDRVSTREAMINSTANCE* pStreamInst )
|
||||
{
|
||||
return MMSYSERR_NOERROR;
|
||||
}
|
||||
|
||||
static LONG Codec_StreamSize( CodecImpl* This, ACMDRVSTREAMINSTANCE* pStreamInst, ACMDRVSTREAMSIZE* pStreamSize )
|
||||
{
|
||||
enum CodecType codectype;
|
||||
LONG res;
|
||||
|
||||
if ( pStreamSize->cbStruct != sizeof(ACMDRVSTREAMSIZE) )
|
||||
return MMSYSERR_INVALPARAM;
|
||||
|
||||
codectype = (enum CodecType)pStreamInst->dwDriver;
|
||||
|
||||
res = MMSYSERR_NOERROR;
|
||||
FIXME("()\n");
|
||||
switch ( codectype )
|
||||
{
|
||||
case CodecType_EncIMAADPCM:
|
||||
if ( pStreamSize->fdwSize == ACM_STREAMSIZEF_SOURCE )
|
||||
pStreamSize->cbDstLength = 64 + (pStreamSize->cbSrcLength >> 2);
|
||||
else
|
||||
if ( pStreamSize->fdwSize == ACM_STREAMSIZEF_DESTINATION )
|
||||
pStreamSize->cbSrcLength = pStreamSize->cbDstLength << 2;
|
||||
else
|
||||
res = MMSYSERR_INVALFLAG;
|
||||
break;
|
||||
case CodecType_DecIMAADPCM:
|
||||
if ( pStreamSize->fdwSize == ACM_STREAMSIZEF_SOURCE )
|
||||
pStreamSize->cbDstLength = pStreamSize->cbSrcLength << 2;
|
||||
else
|
||||
if ( pStreamSize->fdwSize == ACM_STREAMSIZEF_DESTINATION )
|
||||
pStreamSize->cbSrcLength = 64 + (pStreamSize->cbDstLength >> 2);
|
||||
else
|
||||
res = MMSYSERR_INVALFLAG;
|
||||
break;
|
||||
default:
|
||||
ERR( "CodecType_Invalid\n" );
|
||||
res = MMSYSERR_NOTSUPPORTED;
|
||||
break;
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
static LONG Codec_StreamConvert( CodecImpl* This, ACMDRVSTREAMINSTANCE* pStreamInst, ACMDRVSTREAMHEADER* pStreamHdr )
|
||||
{
|
||||
enum CodecType codectype;
|
||||
LONG res;
|
||||
|
||||
codectype = (enum CodecType)pStreamInst->dwDriver;
|
||||
|
||||
res = MMSYSERR_NOTSUPPORTED;
|
||||
switch ( codectype )
|
||||
{
|
||||
case CodecType_EncIMAADPCM:
|
||||
FIXME( "CodecType_EncIMAADPCM\n" );
|
||||
break;
|
||||
case CodecType_DecIMAADPCM:
|
||||
TRACE( "CodecType_DecIMAADPCM\n" );
|
||||
res = IMAADPCM32_Decode( pStreamInst->pwfxSrc->nChannels, pStreamInst->pwfxSrc->nBlockAlign, *(WORD*)(((BYTE*)pStreamInst->pwfxSrc) + sizeof(WAVEFORMATEX)), pStreamHdr->pbDst, pStreamHdr->cbDstLength, &pStreamHdr->cbDstLengthUsed, pStreamHdr->pbSrc, pStreamHdr->cbSrcLength, &pStreamHdr->cbSrcLengthUsed );
|
||||
break;
|
||||
default:
|
||||
ERR( "CodecType_Invalid\n" );
|
||||
break;
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
static LONG Codec_StreamReset( CodecImpl* This, ACMDRVSTREAMINSTANCE* pStreamInst, DWORD dwFlags )
|
||||
{
|
||||
return MMSYSERR_NOTSUPPORTED;
|
||||
}
|
||||
|
||||
static LONG Codec_StreamPrepare( CodecImpl* This, ACMDRVSTREAMINSTANCE* pStreamInst, ACMDRVSTREAMHEADER* pStreamHdr )
|
||||
{
|
||||
return MMSYSERR_NOTSUPPORTED;
|
||||
}
|
||||
|
||||
static LONG Codec_StreamUnprepare( CodecImpl* This, ACMDRVSTREAMINSTANCE* pStreamInst, ACMDRVSTREAMHEADER* pStreamHdr )
|
||||
{
|
||||
return MMSYSERR_NOTSUPPORTED;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/***********************************************************************/
|
||||
|
||||
static CodecImpl* Codec_AllocDriver( void )
|
||||
{
|
||||
CodecImpl* This;
|
||||
|
||||
This = HeapAlloc( GetProcessHeap(), 0, sizeof(CodecImpl) );
|
||||
if ( This == NULL )
|
||||
return NULL;
|
||||
ZeroMemory( This, sizeof(CodecImpl) );
|
||||
|
||||
/* initialize members. */
|
||||
|
||||
return This;
|
||||
}
|
||||
|
||||
static void Codec_Close( CodecImpl* This )
|
||||
{
|
||||
|
||||
HeapFree( GetProcessHeap(), 0, This );
|
||||
}
|
||||
|
||||
|
||||
|
||||
/***********************************************************************/
|
||||
|
||||
LONG WINAPI IMAADP32_DriverProc(
|
||||
DWORD dwDriverId, HDRVR hdrvr, UINT msg, LONG lParam1, LONG lParam2 )
|
||||
{
|
||||
TRACE( "DriverProc(%08lx,%08x,%08x,%08lx,%08lx)\n",
|
||||
dwDriverId, hdrvr, msg, lParam1, lParam2 );
|
||||
|
||||
switch ( msg )
|
||||
{
|
||||
case DRV_LOAD:
|
||||
TRACE("DRV_LOAD\n");
|
||||
return TRUE;
|
||||
case DRV_FREE:
|
||||
TRACE("DRV_FREE\n");
|
||||
return TRUE;
|
||||
case DRV_OPEN:
|
||||
TRACE("DRV_OPEN\n");
|
||||
return (LONG)Codec_AllocDriver();
|
||||
case DRV_CLOSE:
|
||||
TRACE("DRV_CLOSE\n");
|
||||
Codec_Close( (CodecImpl*)dwDriverId );
|
||||
return TRUE;
|
||||
case DRV_ENABLE:
|
||||
TRACE("DRV_ENABLE\n");
|
||||
return TRUE;
|
||||
case DRV_DISABLE:
|
||||
TRACE("DRV_DISABLE\n");
|
||||
return TRUE;
|
||||
case DRV_QUERYCONFIGURE:
|
||||
TRACE("DRV_QUERYCONFIGURE\n");
|
||||
return Codec_DrvQueryConfigure( (CodecImpl*)dwDriverId );
|
||||
case DRV_CONFIGURE:
|
||||
TRACE("DRV_CONFIGURE\n");
|
||||
return Codec_DrvConfigure( (CodecImpl*)dwDriverId,
|
||||
(HWND)lParam1, (DRVCONFIGINFO*)lParam2 );
|
||||
case DRV_INSTALL:
|
||||
TRACE("DRV_INSTALL\n");
|
||||
return DRVCNF_OK;
|
||||
case DRV_REMOVE:
|
||||
TRACE("DRV_REMOVE\n");
|
||||
return 0;
|
||||
case DRV_POWER:
|
||||
TRACE("DRV_POWER\n");
|
||||
return TRUE;
|
||||
|
||||
case ACMDM_DRIVER_NOTIFY:
|
||||
return MMSYSERR_NOERROR;
|
||||
case ACMDM_DRIVER_DETAILS:
|
||||
return Codec_DriverDetails((ACMDRIVERDETAILSW*)lParam1);
|
||||
case ACMDM_DRIVER_ABOUT:
|
||||
TRACE("ACMDM_DRIVER_ABOUT\n");
|
||||
return (lParam1 == -1) ? Codec_QueryAbout() : Codec_About( (HWND)lParam1 );
|
||||
|
||||
case ACMDM_HARDWARE_WAVE_CAPS_INPUT:
|
||||
return MMSYSERR_NOTSUPPORTED;
|
||||
case ACMDM_HARDWARE_WAVE_CAPS_OUTPUT:
|
||||
return MMSYSERR_NOTSUPPORTED;
|
||||
|
||||
case ACMDM_FORMATTAG_DETAILS:
|
||||
return Codec_FormatTagDetails( (CodecImpl*)dwDriverId, (ACMFORMATTAGDETAILSW*)lParam1, (DWORD)lParam2 );
|
||||
case ACMDM_FORMAT_DETAILS:
|
||||
return Codec_FormatDetails( (CodecImpl*)dwDriverId, (ACMFORMATDETAILSW*)lParam1, (DWORD)lParam2 );
|
||||
case ACMDM_FORMAT_SUGGEST:
|
||||
return Codec_FormatSuggest( (CodecImpl*)dwDriverId, (ACMDRVFORMATSUGGEST*)lParam1 );
|
||||
|
||||
case ACMDM_FILTERTAG_DETAILS:
|
||||
return Codec_FilterTagDetails( (CodecImpl*)dwDriverId, (ACMFILTERTAGDETAILSW*)lParam1, (DWORD)lParam2 );
|
||||
case ACMDM_FILTER_DETAILS:
|
||||
return Codec_FilterDetails( (CodecImpl*)dwDriverId, (ACMFILTERDETAILSW*)lParam1, (DWORD)lParam2 );
|
||||
|
||||
case ACMDM_STREAM_OPEN:
|
||||
return Codec_StreamOpen( (CodecImpl*)dwDriverId, (ACMDRVSTREAMINSTANCE*)lParam1 );
|
||||
case ACMDM_STREAM_CLOSE:
|
||||
return Codec_StreamClose( (CodecImpl*)dwDriverId, (ACMDRVSTREAMINSTANCE*)lParam1 );
|
||||
case ACMDM_STREAM_SIZE:
|
||||
return Codec_StreamSize( (CodecImpl*)dwDriverId, (ACMDRVSTREAMINSTANCE*)lParam1, (ACMDRVSTREAMSIZE*)lParam2 );
|
||||
case ACMDM_STREAM_CONVERT:
|
||||
return Codec_StreamConvert( (CodecImpl*)dwDriverId, (ACMDRVSTREAMINSTANCE*)lParam1, (ACMDRVSTREAMHEADER*)lParam2 );
|
||||
case ACMDM_STREAM_RESET:
|
||||
return Codec_StreamReset( (CodecImpl*)dwDriverId, (ACMDRVSTREAMINSTANCE*)lParam1, (DWORD)lParam2 );
|
||||
case ACMDM_STREAM_PREPARE:
|
||||
return Codec_StreamPrepare( (CodecImpl*)dwDriverId, (ACMDRVSTREAMINSTANCE*)lParam1, (ACMDRVSTREAMHEADER*)lParam2 );
|
||||
case ACMDM_STREAM_UNPREPARE:
|
||||
return Codec_StreamUnprepare( (CodecImpl*)dwDriverId, (ACMDRVSTREAMINSTANCE*)lParam1, (ACMDRVSTREAMHEADER*)lParam2 );
|
||||
|
||||
}
|
||||
|
||||
return DefDriverProc( dwDriverId, hdrvr, msg, lParam1, lParam2 );
|
||||
}
|
||||
|
||||
/***********************************************************************/
|
||||
|
||||
BOOL WINAPI IMAADP32_DllMain( HINSTANCE hInst, DWORD dwReason, LPVOID lpvReserved )
|
||||
{
|
||||
TRACE( "(%08x,%08lx,%p)\n",hInst,dwReason,lpvReserved );
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
/* all codes are removed by author */
|
||||
|
|
|
@ -1,744 +1 @@
|
|||
/*
|
||||
* msg711.drv - G711 codec driver
|
||||
*
|
||||
* Copyright 2001 Hidenori Takeshima
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*
|
||||
* FIXME - no encoding.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "wingdi.h"
|
||||
#include "winnls.h"
|
||||
#include "winuser.h"
|
||||
#include "mmsystem.h"
|
||||
#include "msacm.h"
|
||||
#include "../msacmdrv.h"
|
||||
|
||||
#include "wine/debug.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(msg711);
|
||||
|
||||
|
||||
/***********************************************************************/
|
||||
|
||||
enum CodecType
|
||||
{
|
||||
CodecType_Invalid,
|
||||
CodecType_EncMuLaw,
|
||||
CodecType_EncALaw,
|
||||
CodecType_DecMuLaw,
|
||||
CodecType_DecALaw,
|
||||
};
|
||||
|
||||
typedef struct CodecImpl
|
||||
{
|
||||
int dummy;
|
||||
} CodecImpl;
|
||||
|
||||
/***********************************************************************/
|
||||
|
||||
static const WORD dec_mulaw[256] =
|
||||
{
|
||||
0x8284, 0x8684, 0x8A84, 0x8E84, 0x9284, 0x9684, 0x9A84, 0x9E84,
|
||||
0xA284, 0xA684, 0xAA84, 0xAE84, 0xB284, 0xB684, 0xBA84, 0xBE84,
|
||||
0xC184, 0xC384, 0xC584, 0xC784, 0xC984, 0xCB84, 0xCD84, 0xCF84,
|
||||
0xD184, 0xD384, 0xD584, 0xD784, 0xD984, 0xDB84, 0xDD84, 0xDF84,
|
||||
0xE104, 0xE204, 0xE304, 0xE404, 0xE504, 0xE604, 0xE704, 0xE804,
|
||||
0xE904, 0xEA04, 0xEB04, 0xEC04, 0xED04, 0xEE04, 0xEF04, 0xF004,
|
||||
0xF0C4, 0xF144, 0xF1C4, 0xF244, 0xF2C4, 0xF344, 0xF3C4, 0xF444,
|
||||
0xF4C4, 0xF544, 0xF5C4, 0xF644, 0xF6C4, 0xF744, 0xF7C4, 0xF844,
|
||||
0xF8A4, 0xF8E4, 0xF924, 0xF964, 0xF9A4, 0xF9E4, 0xFA24, 0xFA64,
|
||||
0xFAA4, 0xFAE4, 0xFB24, 0xFB64, 0xFBA4, 0xFBE4, 0xFC24, 0xFC64,
|
||||
0xFC94, 0xFCB4, 0xFCD4, 0xFCF4, 0xFD14, 0xFD34, 0xFD54, 0xFD74,
|
||||
0xFD94, 0xFDB4, 0xFDD4, 0xFDF4, 0xFE14, 0xFE34, 0xFE54, 0xFE74,
|
||||
0xFE8C, 0xFE9C, 0xFEAC, 0xFEBC, 0xFECC, 0xFEDC, 0xFEEC, 0xFEFC,
|
||||
0xFF0C, 0xFF1C, 0xFF2C, 0xFF3C, 0xFF4C, 0xFF5C, 0xFF6C, 0xFF7C,
|
||||
0xFF88, 0xFF90, 0xFF98, 0xFFA0, 0xFFA8, 0xFFB0, 0xFFB8, 0xFFC0,
|
||||
0xFFC8, 0xFFD0, 0xFFD8, 0xFFE0, 0xFFE8, 0xFFF0, 0xFFF8, 0x0000,
|
||||
0x7D7C, 0x797C, 0x757C, 0x717C, 0x6D7C, 0x697C, 0x657C, 0x617C,
|
||||
0x5D7C, 0x597C, 0x557C, 0x517C, 0x4D7C, 0x497C, 0x457C, 0x417C,
|
||||
0x3E7C, 0x3C7C, 0x3A7C, 0x387C, 0x367C, 0x347C, 0x327C, 0x307C,
|
||||
0x2E7C, 0x2C7C, 0x2A7C, 0x287C, 0x267C, 0x247C, 0x227C, 0x207C,
|
||||
0x1EFC, 0x1DFC, 0x1CFC, 0x1BFC, 0x1AFC, 0x19FC, 0x18FC, 0x17FC,
|
||||
0x16FC, 0x15FC, 0x14FC, 0x13FC, 0x12FC, 0x11FC, 0x10FC, 0x0FFC,
|
||||
0x0F3C, 0x0EBC, 0x0E3C, 0x0DBC, 0x0D3C, 0x0CBC, 0x0C3C, 0x0BBC,
|
||||
0x0B3C, 0x0ABC, 0x0A3C, 0x09BC, 0x093C, 0x08BC, 0x083C, 0x07BC,
|
||||
0x075C, 0x071C, 0x06DC, 0x069C, 0x065C, 0x061C, 0x05DC, 0x059C,
|
||||
0x055C, 0x051C, 0x04DC, 0x049C, 0x045C, 0x041C, 0x03DC, 0x039C,
|
||||
0x036C, 0x034C, 0x032C, 0x030C, 0x02EC, 0x02CC, 0x02AC, 0x028C,
|
||||
0x026C, 0x024C, 0x022C, 0x020C, 0x01EC, 0x01CC, 0x01AC, 0x018C,
|
||||
0x0174, 0x0164, 0x0154, 0x0144, 0x0134, 0x0124, 0x0114, 0x0104,
|
||||
0x00F4, 0x00E4, 0x00D4, 0x00C4, 0x00B4, 0x00A4, 0x0094, 0x0084,
|
||||
0x0078, 0x0070, 0x0068, 0x0060, 0x0058, 0x0050, 0x0048, 0x0040,
|
||||
0x0038, 0x0030, 0x0028, 0x0020, 0x0018, 0x0010, 0x0008, 0x0000,
|
||||
};
|
||||
|
||||
static const WORD dec_alaw[256] =
|
||||
{
|
||||
0xEA80, 0xEB80, 0xE880, 0xE980, 0xEE80, 0xEF80, 0xEC80, 0xED80,
|
||||
0xE280, 0xE380, 0xE080, 0xE180, 0xE680, 0xE780, 0xE480, 0xE580,
|
||||
0xF540, 0xF5C0, 0xF440, 0xF4C0, 0xF740, 0xF7C0, 0xF640, 0xF6C0,
|
||||
0xF140, 0xF1C0, 0xF040, 0xF0C0, 0xF340, 0xF3C0, 0xF240, 0xF2C0,
|
||||
0xAA00, 0xAE00, 0xA200, 0xA600, 0xBA00, 0xBE00, 0xB200, 0xB600,
|
||||
0x8A00, 0x8E00, 0x8200, 0x8600, 0x9A00, 0x9E00, 0x9200, 0x9600,
|
||||
0xD500, 0xD700, 0xD100, 0xD300, 0xDD00, 0xDF00, 0xD900, 0xDB00,
|
||||
0xC500, 0xC700, 0xC100, 0xC300, 0xCD00, 0xCF00, 0xC900, 0xCB00,
|
||||
0xFEA8, 0xFEB8, 0xFE88, 0xFE98, 0xFEE8, 0xFEF8, 0xFEC8, 0xFED8,
|
||||
0xFE28, 0xFE38, 0xFE08, 0xFE18, 0xFE68, 0xFE78, 0xFE48, 0xFE58,
|
||||
0xFFA8, 0xFFB8, 0xFF88, 0xFF98, 0xFFE8, 0xFFF8, 0xFFC8, 0xFFD8,
|
||||
0xFF28, 0xFF38, 0xFF08, 0xFF18, 0xFF68, 0xFF78, 0xFF48, 0xFF58,
|
||||
0xFAA0, 0xFAE0, 0xFA20, 0xFA60, 0xFBA0, 0xFBE0, 0xFB20, 0xFB60,
|
||||
0xF8A0, 0xF8E0, 0xF820, 0xF860, 0xF9A0, 0xF9E0, 0xF920, 0xF960,
|
||||
0xFD50, 0xFD70, 0xFD10, 0xFD30, 0xFDD0, 0xFDF0, 0xFD90, 0xFDB0,
|
||||
0xFC50, 0xFC70, 0xFC10, 0xFC30, 0xFCD0, 0xFCF0, 0xFC90, 0xFCB0,
|
||||
0x1580, 0x1480, 0x1780, 0x1680, 0x1180, 0x1080, 0x1380, 0x1280,
|
||||
0x1D80, 0x1C80, 0x1F80, 0x1E80, 0x1980, 0x1880, 0x1B80, 0x1A80,
|
||||
0x0AC0, 0x0A40, 0x0BC0, 0x0B40, 0x08C0, 0x0840, 0x09C0, 0x0940,
|
||||
0x0EC0, 0x0E40, 0x0FC0, 0x0F40, 0x0CC0, 0x0C40, 0x0DC0, 0x0D40,
|
||||
0x5600, 0x5200, 0x5E00, 0x5A00, 0x4600, 0x4200, 0x4E00, 0x4A00,
|
||||
0x7600, 0x7200, 0x7E00, 0x7A00, 0x6600, 0x6200, 0x6E00, 0x6A00,
|
||||
0x2B00, 0x2900, 0x2F00, 0x2D00, 0x2300, 0x2100, 0x2700, 0x2500,
|
||||
0x3B00, 0x3900, 0x3F00, 0x3D00, 0x3300, 0x3100, 0x3700, 0x3500,
|
||||
0x0158, 0x0148, 0x0178, 0x0168, 0x0118, 0x0108, 0x0138, 0x0128,
|
||||
0x01D8, 0x01C8, 0x01F8, 0x01E8, 0x0198, 0x0188, 0x01B8, 0x01A8,
|
||||
0x0058, 0x0048, 0x0078, 0x0068, 0x0018, 0x0008, 0x0038, 0x0028,
|
||||
0x00D8, 0x00C8, 0x00F8, 0x00E8, 0x0098, 0x0088, 0x00B8, 0x00A8,
|
||||
0x0560, 0x0520, 0x05E0, 0x05A0, 0x0460, 0x0420, 0x04E0, 0x04A0,
|
||||
0x0760, 0x0720, 0x07E0, 0x07A0, 0x0660, 0x0620, 0x06E0, 0x06A0,
|
||||
0x02B0, 0x0290, 0x02F0, 0x02D0, 0x0230, 0x0210, 0x0270, 0x0250,
|
||||
0x03B0, 0x0390, 0x03F0, 0x03D0, 0x0330, 0x0310, 0x0370, 0x0350,
|
||||
};
|
||||
|
||||
static LONG MSG711_Decode( const WORD* pdec, BYTE* pbDst, DWORD cbDstLength, DWORD* pcbDstLengthUsed, BYTE* pbSrc, DWORD cbSrcLength, DWORD* pcbSrcLengthUsed )
|
||||
{
|
||||
DWORD cSample;
|
||||
WORD w;
|
||||
|
||||
cSample = cbSrcLength;
|
||||
if ( cSample > (cbDstLength>>1) )
|
||||
cSample = (cbDstLength>>1);
|
||||
|
||||
*pcbSrcLengthUsed = cSample;
|
||||
*pcbDstLengthUsed = cSample << 1;
|
||||
|
||||
while ( cSample-- > 0 )
|
||||
{
|
||||
w = pdec[*pbSrc++];
|
||||
*pbDst++ = LOBYTE(w);
|
||||
*pbDst++ = HIBYTE(w);
|
||||
}
|
||||
|
||||
return MMSYSERR_NOERROR;
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************/
|
||||
|
||||
static LONG Codec_DrvQueryConfigure( CodecImpl* This )
|
||||
{
|
||||
return MMSYSERR_NOTSUPPORTED;
|
||||
}
|
||||
|
||||
static LONG Codec_DrvConfigure( CodecImpl* This, HWND hwnd, DRVCONFIGINFO* pinfo )
|
||||
{
|
||||
return MMSYSERR_NOTSUPPORTED;
|
||||
}
|
||||
|
||||
static LONG Codec_DriverDetails( ACMDRIVERDETAILSW* pDrvDetails )
|
||||
{
|
||||
if ( pDrvDetails->cbStruct < sizeof(ACMDRIVERDETAILSW) )
|
||||
return MMSYSERR_INVALPARAM;
|
||||
|
||||
ZeroMemory( pDrvDetails, sizeof(ACMDRIVERDETAILSW) );
|
||||
pDrvDetails->cbStruct = sizeof(ACMDRIVERDETAILSW);
|
||||
|
||||
pDrvDetails->fccType = ACMDRIVERDETAILS_FCCTYPE_AUDIOCODEC;
|
||||
pDrvDetails->fccComp = ACMDRIVERDETAILS_FCCCOMP_UNDEFINED;
|
||||
pDrvDetails->wMid = 0xff; /* FIXME? */
|
||||
pDrvDetails->wPid = 0x00; /* FIXME? */
|
||||
pDrvDetails->vdwACM = 0x01000000; /* FIXME? */
|
||||
pDrvDetails->vdwDriver = 0x01000000; /* FIXME? */
|
||||
pDrvDetails->fdwSupport = ACMDRIVERDETAILS_SUPPORTF_CODEC;
|
||||
pDrvDetails->cFormatTags = 3;
|
||||
pDrvDetails->cFilterTags = 0;
|
||||
pDrvDetails->hicon = (HICON)NULL;
|
||||
MultiByteToWideChar( CP_ACP, 0, "WineG711", -1,
|
||||
pDrvDetails->szShortName,
|
||||
sizeof(pDrvDetails->szShortName)/sizeof(WCHAR) );
|
||||
MultiByteToWideChar( CP_ACP, 0, "Wine G711 codec", -1,
|
||||
pDrvDetails->szLongName,
|
||||
sizeof(pDrvDetails->szLongName)/sizeof(WCHAR) );
|
||||
MultiByteToWideChar( CP_ACP, 0, "Brought to you by the Wine team...", -1,
|
||||
pDrvDetails->szCopyright,
|
||||
sizeof(pDrvDetails->szCopyright)/sizeof(WCHAR) );
|
||||
MultiByteToWideChar( CP_ACP, 0, "Refer to LICENSE file", -1,
|
||||
pDrvDetails->szLicensing,
|
||||
sizeof(pDrvDetails->szLicensing)/sizeof(WCHAR) );
|
||||
pDrvDetails->szFeatures[0] = 0;
|
||||
|
||||
return MMSYSERR_NOERROR;
|
||||
}
|
||||
|
||||
static LONG Codec_QueryAbout( void )
|
||||
{
|
||||
return MMSYSERR_NOTSUPPORTED;
|
||||
}
|
||||
|
||||
static LONG Codec_About( HWND hwnd )
|
||||
{
|
||||
return MMSYSERR_NOTSUPPORTED;
|
||||
}
|
||||
|
||||
/***********************************************************************/
|
||||
|
||||
static LONG Codec_FormatTagDetails( CodecImpl* This, ACMFORMATTAGDETAILSW* pFmtTagDetails, DWORD dwFlags )
|
||||
{
|
||||
FIXME( "enumerate tags\n" );
|
||||
|
||||
switch ( dwFlags )
|
||||
{
|
||||
case ACM_FORMATTAGDETAILSF_INDEX:
|
||||
switch ( pFmtTagDetails->dwFormatTagIndex )
|
||||
{
|
||||
case 0:
|
||||
pFmtTagDetails->dwFormatTag = 7; /* Mu-Law */
|
||||
break;
|
||||
case 1:
|
||||
pFmtTagDetails->dwFormatTag = 6; /* A-Law */
|
||||
break;
|
||||
case 2:
|
||||
pFmtTagDetails->dwFormatTag = 1; /* PCM */
|
||||
break;
|
||||
default:
|
||||
return ACMERR_NOTPOSSIBLE;
|
||||
}
|
||||
break;
|
||||
case ACM_FORMATTAGDETAILSF_FORMATTAG:
|
||||
switch ( pFmtTagDetails->dwFormatTag )
|
||||
{
|
||||
case 7: /* Mu-Law */
|
||||
pFmtTagDetails->dwFormatTagIndex = 0;
|
||||
break;
|
||||
case 6: /* A-Law */
|
||||
pFmtTagDetails->dwFormatTagIndex = 1;
|
||||
break;
|
||||
case 1: /* PCM */
|
||||
pFmtTagDetails->dwFormatTagIndex = 2;
|
||||
break;
|
||||
default:
|
||||
return ACMERR_NOTPOSSIBLE;
|
||||
}
|
||||
break;
|
||||
case ACM_FORMATTAGDETAILSF_LARGESTSIZE:
|
||||
if ( pFmtTagDetails->dwFormatTag != 0 &&
|
||||
pFmtTagDetails->dwFormatTag != 1 &&
|
||||
pFmtTagDetails->dwFormatTag != 6 &&
|
||||
pFmtTagDetails->dwFormatTag != 7 )
|
||||
return ACMERR_NOTPOSSIBLE;
|
||||
pFmtTagDetails->dwFormatTagIndex = 0;
|
||||
break;
|
||||
default:
|
||||
return MMSYSERR_NOTSUPPORTED;
|
||||
}
|
||||
|
||||
pFmtTagDetails->fdwSupport = ACMDRIVERDETAILS_SUPPORTF_CODEC;
|
||||
pFmtTagDetails->cbFormatSize = sizeof(WAVEFORMATEX);
|
||||
pFmtTagDetails->cStandardFormats = 3; /* FIXME */
|
||||
pFmtTagDetails->szFormatTag[0] = 0; /* FIXME */
|
||||
|
||||
return MMSYSERR_NOERROR;
|
||||
}
|
||||
|
||||
static LONG Codec_FormatDetails( CodecImpl* This, ACMFORMATDETAILSW* pFmtDetails, DWORD dwFlags )
|
||||
{
|
||||
FIXME( "enumerate standard formats\n" );
|
||||
|
||||
if ( pFmtDetails->cbStruct < sizeof(ACMFORMATDETAILSW) )
|
||||
return MMSYSERR_INVALPARAM;
|
||||
pFmtDetails->cbStruct = sizeof(ACMFORMATDETAILSW);
|
||||
|
||||
switch ( dwFlags )
|
||||
{
|
||||
case ACM_FORMATDETAILSF_INDEX:
|
||||
switch ( pFmtDetails->dwFormatIndex )
|
||||
{
|
||||
case 0:
|
||||
pFmtDetails->dwFormatTag = 7; /* Mu-Law */
|
||||
break;
|
||||
case 1:
|
||||
pFmtDetails->dwFormatTag = 6; /* A-Law */
|
||||
break;
|
||||
case 2:
|
||||
pFmtDetails->dwFormatTag = 1; /* PCM */
|
||||
break;
|
||||
default:
|
||||
return MMSYSERR_INVALPARAM;
|
||||
}
|
||||
break;
|
||||
case ACM_FORMATDETAILSF_FORMAT:
|
||||
switch ( pFmtDetails->dwFormatTag )
|
||||
{
|
||||
case 7: /* Mu-Law */
|
||||
pFmtDetails->dwFormatIndex = 0;
|
||||
break;
|
||||
case 6: /* A-Law */
|
||||
pFmtDetails->dwFormatIndex = 1;
|
||||
break;
|
||||
case 1: /* PCM */
|
||||
pFmtDetails->dwFormatIndex = 2;
|
||||
break;
|
||||
default:
|
||||
return ACMERR_NOTPOSSIBLE;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
return MMSYSERR_NOTSUPPORTED;
|
||||
}
|
||||
|
||||
pFmtDetails->fdwSupport = ACMDRIVERDETAILS_SUPPORTF_CODEC;
|
||||
pFmtDetails->pwfx->wFormatTag = pFmtDetails->dwFormatTag;
|
||||
pFmtDetails->pwfx->nChannels = 1;
|
||||
pFmtDetails->pwfx->nSamplesPerSec = 8000;
|
||||
pFmtDetails->pwfx->wBitsPerSample = 8;
|
||||
if ( pFmtDetails->dwFormatTag == 1 )
|
||||
{
|
||||
pFmtDetails->cbwfx = sizeof(PCMWAVEFORMAT);
|
||||
}
|
||||
else
|
||||
{
|
||||
pFmtDetails->pwfx->cbSize = 0;
|
||||
pFmtDetails->cbwfx = sizeof(WAVEFORMATEX);
|
||||
}
|
||||
pFmtDetails->szFormat[0] = 0; /* FIXME */
|
||||
|
||||
return MMSYSERR_NOERROR;
|
||||
}
|
||||
|
||||
|
||||
static LONG Codec_FormatSuggest( CodecImpl* This, ACMDRVFORMATSUGGEST* pFmtSuggest )
|
||||
{
|
||||
DWORD fdwSuggest;
|
||||
|
||||
FIXME( "get suggested format\n" );
|
||||
|
||||
if ( pFmtSuggest->cbStruct != sizeof(ACMDRVFORMATSUGGEST) )
|
||||
return MMSYSERR_INVALPARAM;
|
||||
|
||||
if ( pFmtSuggest->cbwfxSrc < sizeof(PCMWAVEFORMAT) ||
|
||||
pFmtSuggest->cbwfxDst < sizeof(PCMWAVEFORMAT) )
|
||||
return MMSYSERR_INVALPARAM;
|
||||
|
||||
fdwSuggest = pFmtSuggest->fdwSuggest;
|
||||
|
||||
if ( fdwSuggest & ACM_FORMATSUGGESTF_NCHANNELS )
|
||||
{
|
||||
if ( pFmtSuggest->pwfxSrc->nChannels != pFmtSuggest->pwfxDst->nChannels )
|
||||
return ACMERR_NOTPOSSIBLE;
|
||||
fdwSuggest &= ~ACM_FORMATSUGGESTF_NCHANNELS;
|
||||
}
|
||||
|
||||
if ( fdwSuggest & ACM_FORMATSUGGESTF_NSAMPLESPERSEC )
|
||||
{
|
||||
if ( pFmtSuggest->pwfxSrc->nSamplesPerSec != pFmtSuggest->pwfxDst->nSamplesPerSec )
|
||||
return ACMERR_NOTPOSSIBLE;
|
||||
fdwSuggest &= ~ACM_FORMATSUGGESTF_NSAMPLESPERSEC;
|
||||
}
|
||||
|
||||
if ( pFmtSuggest->pwfxSrc->wFormatTag == 1 )
|
||||
{
|
||||
/* Compressor */
|
||||
if ( pFmtSuggest->cbwfxDst < sizeof(WAVEFORMATEX) )
|
||||
return MMSYSERR_INVALPARAM;
|
||||
if ( pFmtSuggest->pwfxSrc->wBitsPerSample != 16 )
|
||||
return ACMERR_NOTPOSSIBLE;
|
||||
|
||||
if ( fdwSuggest & ACM_FORMATSUGGESTF_WFORMATTAG )
|
||||
{
|
||||
if ( pFmtSuggest->pwfxDst->wFormatTag != 6 &&
|
||||
pFmtSuggest->pwfxDst->wFormatTag != 7 )
|
||||
return ACMERR_NOTPOSSIBLE;
|
||||
fdwSuggest &= ~ACM_FORMATSUGGESTF_WFORMATTAG;
|
||||
}
|
||||
|
||||
if ( fdwSuggest & ACM_FORMATSUGGESTF_WBITSPERSAMPLE )
|
||||
{
|
||||
if ( pFmtSuggest->pwfxDst->wBitsPerSample != 8 )
|
||||
return ACMERR_NOTPOSSIBLE;
|
||||
fdwSuggest &= ~ACM_FORMATSUGGESTF_WFORMATTAG;
|
||||
}
|
||||
|
||||
if ( fdwSuggest != 0 )
|
||||
return MMSYSERR_INVALFLAG;
|
||||
|
||||
if ( !(fdwSuggest & ACM_FORMATSUGGESTF_WFORMATTAG) )
|
||||
pFmtSuggest->pwfxDst->wFormatTag = 7;
|
||||
pFmtSuggest->pwfxDst->nChannels = pFmtSuggest->pwfxSrc->nChannels;
|
||||
pFmtSuggest->pwfxDst->nSamplesPerSec = pFmtSuggest->pwfxSrc->nSamplesPerSec;
|
||||
pFmtSuggest->pwfxDst->nAvgBytesPerSec = pFmtSuggest->pwfxSrc->nSamplesPerSec * pFmtSuggest->pwfxSrc->nChannels;
|
||||
pFmtSuggest->pwfxDst->nBlockAlign = pFmtSuggest->pwfxSrc->nChannels;
|
||||
pFmtSuggest->pwfxDst->wBitsPerSample = 8;
|
||||
pFmtSuggest->pwfxDst->cbSize = 0;
|
||||
|
||||
FIXME( "no compressor" );
|
||||
return ACMERR_NOTPOSSIBLE;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Decompressor */
|
||||
if ( pFmtSuggest->cbwfxSrc < sizeof(WAVEFORMATEX) )
|
||||
return MMSYSERR_INVALPARAM;
|
||||
if ( pFmtSuggest->pwfxSrc->wFormatTag != 6 &&
|
||||
pFmtSuggest->pwfxSrc->wFormatTag != 7 )
|
||||
return ACMERR_NOTPOSSIBLE;
|
||||
if ( pFmtSuggest->pwfxSrc->wBitsPerSample != 8 )
|
||||
return ACMERR_NOTPOSSIBLE;
|
||||
|
||||
if ( fdwSuggest & ACM_FORMATSUGGESTF_WFORMATTAG )
|
||||
{
|
||||
if ( pFmtSuggest->pwfxDst->wFormatTag != 1 )
|
||||
return ACMERR_NOTPOSSIBLE;
|
||||
fdwSuggest &= ~ACM_FORMATSUGGESTF_WFORMATTAG;
|
||||
}
|
||||
|
||||
if ( fdwSuggest & ACM_FORMATSUGGESTF_WBITSPERSAMPLE )
|
||||
{
|
||||
if ( pFmtSuggest->pwfxDst->wBitsPerSample != 16 )
|
||||
return ACMERR_NOTPOSSIBLE;
|
||||
fdwSuggest &= ~ACM_FORMATSUGGESTF_WFORMATTAG;
|
||||
}
|
||||
|
||||
if ( fdwSuggest != 0 )
|
||||
return MMSYSERR_INVALFLAG;
|
||||
|
||||
pFmtSuggest->pwfxDst->wFormatTag = 1;
|
||||
pFmtSuggest->pwfxDst->nChannels = pFmtSuggest->pwfxSrc->nChannels;
|
||||
pFmtSuggest->pwfxDst->nSamplesPerSec = pFmtSuggest->pwfxSrc->nSamplesPerSec;
|
||||
pFmtSuggest->pwfxDst->nAvgBytesPerSec = pFmtSuggest->pwfxSrc->nSamplesPerSec * pFmtSuggest->pwfxSrc->nChannels * 2;
|
||||
pFmtSuggest->pwfxDst->nBlockAlign = pFmtSuggest->pwfxSrc->nChannels * 2;
|
||||
pFmtSuggest->pwfxDst->wBitsPerSample = 16;
|
||||
}
|
||||
|
||||
return MMSYSERR_NOERROR;
|
||||
}
|
||||
|
||||
static LONG Codec_FilterTagDetails( CodecImpl* This, ACMFILTERTAGDETAILSW* pFilterTagDetails, DWORD dwFlags )
|
||||
{
|
||||
/* This is a codec driver. */
|
||||
return MMSYSERR_NOTSUPPORTED;
|
||||
}
|
||||
|
||||
static LONG Codec_FilterDetails( CodecImpl* This, ACMFILTERDETAILSW* pFilterDetails, DWORD dwFlags )
|
||||
{
|
||||
/* This is a codec driver. */
|
||||
return MMSYSERR_NOTSUPPORTED;
|
||||
}
|
||||
|
||||
static LONG Codec_StreamOpen( CodecImpl* This, ACMDRVSTREAMINSTANCE* pStreamInst )
|
||||
{
|
||||
enum CodecType codectype = CodecType_Invalid;
|
||||
|
||||
if ( pStreamInst->cbStruct != sizeof(ACMDRVSTREAMINSTANCE) )
|
||||
{
|
||||
TRACE("invalid size of struct\n");
|
||||
return MMSYSERR_INVALPARAM;
|
||||
}
|
||||
|
||||
if ( pStreamInst->fdwOpen & (~(ACM_STREAMOPENF_ASYNC|ACM_STREAMOPENF_NONREALTIME|ACM_STREAMOPENF_QUERY|CALLBACK_EVENT|CALLBACK_FUNCTION|CALLBACK_WINDOW)) )
|
||||
{
|
||||
TRACE("unknown flags\n");
|
||||
return MMSYSERR_INVALFLAG;
|
||||
}
|
||||
|
||||
/* No support for async operations. */
|
||||
if ( pStreamInst->fdwOpen & ACM_STREAMOPENF_ASYNC )
|
||||
return MMSYSERR_INVALFLAG;
|
||||
|
||||
/* This is a codec driver. */
|
||||
if ( pStreamInst->pwfxSrc->nChannels != pStreamInst->pwfxDst->nChannels || pStreamInst->pwfxSrc->nSamplesPerSec != pStreamInst->pwfxDst->nSamplesPerSec )
|
||||
return ACMERR_NOTPOSSIBLE;
|
||||
if ( pStreamInst->pwfltr != NULL )
|
||||
return ACMERR_NOTPOSSIBLE;
|
||||
|
||||
if ( pStreamInst->pwfxSrc->wFormatTag == 1 )
|
||||
{
|
||||
if ( pStreamInst->pwfxSrc->wBitsPerSample != 16 )
|
||||
return ACMERR_NOTPOSSIBLE;
|
||||
if ( pStreamInst->pwfxDst->wBitsPerSample != 8 )
|
||||
return ACMERR_NOTPOSSIBLE;
|
||||
|
||||
/* Queried as a compressor */
|
||||
FIXME( "Compressor is not implemented now\n" );
|
||||
return ACMERR_NOTPOSSIBLE;
|
||||
}
|
||||
else
|
||||
if ( pStreamInst->pwfxDst->wFormatTag == 1 )
|
||||
{
|
||||
if ( pStreamInst->pwfxDst->wBitsPerSample != 16 )
|
||||
return ACMERR_NOTPOSSIBLE;
|
||||
if ( pStreamInst->pwfxSrc->wBitsPerSample != 8 )
|
||||
return ACMERR_NOTPOSSIBLE;
|
||||
|
||||
switch ( pStreamInst->pwfxSrc->wFormatTag )
|
||||
{
|
||||
case 6: /* A-Law */
|
||||
TRACE( "A-Law deompressor\n" );
|
||||
codectype = CodecType_DecALaw;
|
||||
break;
|
||||
case 7: /* Mu-Law */
|
||||
TRACE( "Mu-Law deompressor\n" );
|
||||
codectype = CodecType_DecMuLaw;
|
||||
break;
|
||||
default:
|
||||
return ACMERR_NOTPOSSIBLE;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return ACMERR_NOTPOSSIBLE;
|
||||
}
|
||||
|
||||
if ( pStreamInst->fdwOpen & ACM_STREAMOPENF_QUERY )
|
||||
return MMSYSERR_NOERROR;
|
||||
|
||||
pStreamInst->dwDriver = (DWORD)codectype;
|
||||
|
||||
return MMSYSERR_NOERROR;
|
||||
}
|
||||
|
||||
static LONG Codec_StreamClose( CodecImpl* This, ACMDRVSTREAMINSTANCE* pStreamInst )
|
||||
{
|
||||
return MMSYSERR_NOERROR;
|
||||
}
|
||||
|
||||
static LONG Codec_StreamSize( CodecImpl* This, ACMDRVSTREAMINSTANCE* pStreamInst, ACMDRVSTREAMSIZE* pStreamSize )
|
||||
{
|
||||
enum CodecType codectype;
|
||||
LONG res;
|
||||
|
||||
if ( pStreamSize->cbStruct != sizeof(ACMDRVSTREAMSIZE) )
|
||||
return MMSYSERR_INVALPARAM;
|
||||
|
||||
codectype = (enum CodecType)pStreamInst->dwDriver;
|
||||
|
||||
res = MMSYSERR_NOERROR;
|
||||
switch ( codectype )
|
||||
{
|
||||
case CodecType_EncMuLaw:
|
||||
case CodecType_EncALaw:
|
||||
if ( pStreamSize->fdwSize == ACM_STREAMSIZEF_SOURCE )
|
||||
pStreamSize->cbDstLength = pStreamSize->cbSrcLength >> 1;
|
||||
else
|
||||
if ( pStreamSize->fdwSize == ACM_STREAMSIZEF_DESTINATION )
|
||||
pStreamSize->cbSrcLength = pStreamSize->cbDstLength << 1;
|
||||
else
|
||||
res = MMSYSERR_INVALFLAG;
|
||||
break;
|
||||
case CodecType_DecMuLaw:
|
||||
case CodecType_DecALaw:
|
||||
if ( pStreamSize->fdwSize == ACM_STREAMSIZEF_SOURCE )
|
||||
pStreamSize->cbDstLength = pStreamSize->cbSrcLength << 1;
|
||||
else
|
||||
if ( pStreamSize->fdwSize == ACM_STREAMSIZEF_DESTINATION )
|
||||
pStreamSize->cbSrcLength = pStreamSize->cbDstLength >> 1;
|
||||
else
|
||||
res = MMSYSERR_INVALFLAG;
|
||||
break;
|
||||
default:
|
||||
ERR( "CodecType_Invalid\n" );
|
||||
res = MMSYSERR_NOTSUPPORTED;
|
||||
break;
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
static LONG Codec_StreamConvert( CodecImpl* This, ACMDRVSTREAMINSTANCE* pStreamInst, ACMDRVSTREAMHEADER* pStreamHdr )
|
||||
{
|
||||
enum CodecType codectype;
|
||||
LONG res;
|
||||
|
||||
codectype = (enum CodecType)pStreamInst->dwDriver;
|
||||
|
||||
res = MMSYSERR_NOTSUPPORTED;
|
||||
switch ( codectype )
|
||||
{
|
||||
case CodecType_EncMuLaw:
|
||||
FIXME( "CodecType_EncMuLaw\n" );
|
||||
break;
|
||||
case CodecType_EncALaw:
|
||||
FIXME( "CodecType_EncALaw\n" );
|
||||
break;
|
||||
case CodecType_DecMuLaw:
|
||||
TRACE( "CodecType_DecMuLaw\n" );
|
||||
res = MSG711_Decode( dec_mulaw, pStreamHdr->pbDst, pStreamHdr->cbDstLength, &pStreamHdr->cbDstLengthUsed, pStreamHdr->pbSrc, pStreamHdr->cbSrcLength, &pStreamHdr->cbSrcLengthUsed );
|
||||
break;
|
||||
case CodecType_DecALaw:
|
||||
TRACE( "CodecType_DecALaw\n" );
|
||||
res = MSG711_Decode( dec_alaw, pStreamHdr->pbDst, pStreamHdr->cbDstLength, &pStreamHdr->cbDstLengthUsed, pStreamHdr->pbSrc, pStreamHdr->cbSrcLength, &pStreamHdr->cbSrcLengthUsed );
|
||||
break;
|
||||
default:
|
||||
ERR( "CodecType_Invalid\n" );
|
||||
break;
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
static LONG Codec_StreamReset( CodecImpl* This, ACMDRVSTREAMINSTANCE* pStreamInst, DWORD dwFlags )
|
||||
{
|
||||
return MMSYSERR_NOTSUPPORTED;
|
||||
}
|
||||
|
||||
static LONG Codec_StreamPrepare( CodecImpl* This, ACMDRVSTREAMINSTANCE* pStreamInst, ACMDRVSTREAMHEADER* pStreamHdr )
|
||||
{
|
||||
return MMSYSERR_NOTSUPPORTED;
|
||||
}
|
||||
|
||||
static LONG Codec_StreamUnprepare( CodecImpl* This, ACMDRVSTREAMINSTANCE* pStreamInst, ACMDRVSTREAMHEADER* pStreamHdr )
|
||||
{
|
||||
return MMSYSERR_NOTSUPPORTED;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/***********************************************************************/
|
||||
|
||||
static CodecImpl* Codec_AllocDriver( void )
|
||||
{
|
||||
CodecImpl* This;
|
||||
|
||||
This = HeapAlloc( GetProcessHeap(), 0, sizeof(CodecImpl) );
|
||||
if ( This == NULL )
|
||||
return NULL;
|
||||
ZeroMemory( This, sizeof(CodecImpl) );
|
||||
|
||||
/* initialize members. */
|
||||
|
||||
return This;
|
||||
}
|
||||
|
||||
static void Codec_Close( CodecImpl* This )
|
||||
{
|
||||
|
||||
HeapFree( GetProcessHeap(), 0, This );
|
||||
}
|
||||
|
||||
|
||||
|
||||
/***********************************************************************/
|
||||
|
||||
LONG WINAPI MSG711_DriverProc(
|
||||
DWORD dwDriverId, HDRVR hdrvr, UINT msg, LONG lParam1, LONG lParam2 )
|
||||
{
|
||||
TRACE( "DriverProc(%08lx,%08x,%08x,%08lx,%08lx)\n",
|
||||
dwDriverId, hdrvr, msg, lParam1, lParam2 );
|
||||
|
||||
switch ( msg )
|
||||
{
|
||||
case DRV_LOAD:
|
||||
TRACE("DRV_LOAD\n");
|
||||
return TRUE;
|
||||
case DRV_FREE:
|
||||
TRACE("DRV_FREE\n");
|
||||
return TRUE;
|
||||
case DRV_OPEN:
|
||||
TRACE("DRV_OPEN\n");
|
||||
return (LONG)Codec_AllocDriver();
|
||||
case DRV_CLOSE:
|
||||
TRACE("DRV_CLOSE\n");
|
||||
Codec_Close( (CodecImpl*)dwDriverId );
|
||||
return TRUE;
|
||||
case DRV_ENABLE:
|
||||
TRACE("DRV_ENABLE\n");
|
||||
return TRUE;
|
||||
case DRV_DISABLE:
|
||||
TRACE("DRV_DISABLE\n");
|
||||
return TRUE;
|
||||
case DRV_QUERYCONFIGURE:
|
||||
TRACE("DRV_QUERYCONFIGURE\n");
|
||||
return Codec_DrvQueryConfigure( (CodecImpl*)dwDriverId );
|
||||
case DRV_CONFIGURE:
|
||||
TRACE("DRV_CONFIGURE\n");
|
||||
return Codec_DrvConfigure( (CodecImpl*)dwDriverId,
|
||||
(HWND)lParam1, (DRVCONFIGINFO*)lParam2 );
|
||||
case DRV_INSTALL:
|
||||
TRACE("DRV_INSTALL\n");
|
||||
return DRVCNF_OK;
|
||||
case DRV_REMOVE:
|
||||
TRACE("DRV_REMOVE\n");
|
||||
return 0;
|
||||
case DRV_POWER:
|
||||
TRACE("DRV_POWER\n");
|
||||
return TRUE;
|
||||
|
||||
case ACMDM_DRIVER_NOTIFY:
|
||||
return MMSYSERR_NOERROR;
|
||||
case ACMDM_DRIVER_DETAILS:
|
||||
return Codec_DriverDetails((ACMDRIVERDETAILSW*)lParam1);
|
||||
case ACMDM_DRIVER_ABOUT:
|
||||
TRACE("ACMDM_DRIVER_ABOUT\n");
|
||||
return (lParam1 == -1) ? Codec_QueryAbout() : Codec_About( (HWND)lParam1 );
|
||||
|
||||
case ACMDM_HARDWARE_WAVE_CAPS_INPUT:
|
||||
return MMSYSERR_NOTSUPPORTED;
|
||||
case ACMDM_HARDWARE_WAVE_CAPS_OUTPUT:
|
||||
return MMSYSERR_NOTSUPPORTED;
|
||||
|
||||
case ACMDM_FORMATTAG_DETAILS:
|
||||
return Codec_FormatTagDetails( (CodecImpl*)dwDriverId, (ACMFORMATTAGDETAILSW*)lParam1, (DWORD)lParam2 );
|
||||
case ACMDM_FORMAT_DETAILS:
|
||||
return Codec_FormatDetails( (CodecImpl*)dwDriverId, (ACMFORMATDETAILSW*)lParam1, (DWORD)lParam2 );
|
||||
case ACMDM_FORMAT_SUGGEST:
|
||||
return Codec_FormatSuggest( (CodecImpl*)dwDriverId, (ACMDRVFORMATSUGGEST*)lParam1 );
|
||||
|
||||
case ACMDM_FILTERTAG_DETAILS:
|
||||
return Codec_FilterTagDetails( (CodecImpl*)dwDriverId, (ACMFILTERTAGDETAILSW*)lParam1, (DWORD)lParam2 );
|
||||
case ACMDM_FILTER_DETAILS:
|
||||
return Codec_FilterDetails( (CodecImpl*)dwDriverId, (ACMFILTERDETAILSW*)lParam1, (DWORD)lParam2 );
|
||||
|
||||
case ACMDM_STREAM_OPEN:
|
||||
return Codec_StreamOpen( (CodecImpl*)dwDriverId, (ACMDRVSTREAMINSTANCE*)lParam1 );
|
||||
case ACMDM_STREAM_CLOSE:
|
||||
return Codec_StreamClose( (CodecImpl*)dwDriverId, (ACMDRVSTREAMINSTANCE*)lParam1 );
|
||||
case ACMDM_STREAM_SIZE:
|
||||
return Codec_StreamSize( (CodecImpl*)dwDriverId, (ACMDRVSTREAMINSTANCE*)lParam1, (ACMDRVSTREAMSIZE*)lParam2 );
|
||||
case ACMDM_STREAM_CONVERT:
|
||||
return Codec_StreamConvert( (CodecImpl*)dwDriverId, (ACMDRVSTREAMINSTANCE*)lParam1, (ACMDRVSTREAMHEADER*)lParam2 );
|
||||
case ACMDM_STREAM_RESET:
|
||||
return Codec_StreamReset( (CodecImpl*)dwDriverId, (ACMDRVSTREAMINSTANCE*)lParam1, (DWORD)lParam2 );
|
||||
case ACMDM_STREAM_PREPARE:
|
||||
return Codec_StreamPrepare( (CodecImpl*)dwDriverId, (ACMDRVSTREAMINSTANCE*)lParam1, (ACMDRVSTREAMHEADER*)lParam2 );
|
||||
case ACMDM_STREAM_UNPREPARE:
|
||||
return Codec_StreamUnprepare( (CodecImpl*)dwDriverId, (ACMDRVSTREAMINSTANCE*)lParam1, (ACMDRVSTREAMHEADER*)lParam2 );
|
||||
|
||||
}
|
||||
|
||||
return DefDriverProc( dwDriverId, hdrvr, msg, lParam1, lParam2 );
|
||||
}
|
||||
|
||||
/***********************************************************************/
|
||||
|
||||
BOOL WINAPI MSG711_DllMain( HINSTANCE hInst, DWORD dwReason, LPVOID lpvReserved )
|
||||
{
|
||||
TRACE( "(%08x,%08lx,%p)\n",hInst,dwReason,lpvReserved );
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
/* all codes are removed by author */
|
||||
|
|
|
@ -1,13 +1,9 @@
|
|||
name msg711
|
||||
file msg711.drv
|
||||
type win32
|
||||
init MSG711_DllMain
|
||||
|
||||
import winmm.dll
|
||||
import user32.dll
|
||||
import kernel32.dll
|
||||
import ntdll.dll
|
||||
|
||||
debug_channels (msg711)
|
||||
debug_channels ()
|
||||
|
||||
@ stdcall DriverProc(long long long long long) MSG711_DriverProc
|
||||
@ stub DriverProc #(long long long long long)
|
||||
|
|
|
@ -1,631 +1 @@
|
|||
/*
|
||||
* MSRLE32 Driver
|
||||
*
|
||||
* Copyright 2001 TAKESHIMA Hidenori <hidenori@a2.ctktv.ne.jp>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
* FIXME - encoding
|
||||
* FIXME - RLE4
|
||||
*
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "wingdi.h"
|
||||
#include "winuser.h"
|
||||
#include "mmsystem.h"
|
||||
#include "vfw.h"
|
||||
|
||||
#include "wine/debug.h"
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(msrle32);
|
||||
|
||||
|
||||
|
||||
|
||||
typedef struct CodecImpl
|
||||
{
|
||||
BOOL bInCompress;
|
||||
BOOL bInDecompress;
|
||||
BOOL bInDecompressEx;
|
||||
} CodecImpl;
|
||||
|
||||
/***********************************************************************/
|
||||
|
||||
static LONG MSRLE32_DecompressRLE4(
|
||||
BYTE* pDst, LONG pitch,
|
||||
const BYTE* pSrc,
|
||||
LONG width, LONG height )
|
||||
{
|
||||
FIXME( "RLE4 - not implemented yet\n" );
|
||||
return ICERR_UNSUPPORTED;
|
||||
}
|
||||
|
||||
static LONG MSRLE32_DecompressRLE8(
|
||||
BYTE* pDst, LONG pitch,
|
||||
const BYTE* pSrc,
|
||||
LONG width, LONG height )
|
||||
{
|
||||
LONG x,y;
|
||||
LONG delta_x,delta_y;
|
||||
int len;
|
||||
UINT data;
|
||||
|
||||
x = 0; y = 0;
|
||||
while ( y < height )
|
||||
{
|
||||
len = *pSrc++; data = *pSrc++;
|
||||
if ( len > 0 )
|
||||
{
|
||||
/* run length encoding */
|
||||
while ( len-- > 0 && x < width )
|
||||
pDst[x++] = (BYTE)data;
|
||||
}
|
||||
else
|
||||
{
|
||||
switch ( data )
|
||||
{
|
||||
case 0: /* EOL */
|
||||
x = 0; y++; pDst += pitch;
|
||||
break;
|
||||
case 1: /* END */
|
||||
return ICERR_OK;
|
||||
case 2: /* DELTA */
|
||||
delta_x = (LONG)*pSrc++;
|
||||
delta_y = (LONG)*pSrc++;
|
||||
x += delta_x;
|
||||
y += delta_y;
|
||||
pDst += delta_y * pitch;
|
||||
break;
|
||||
default: /* RAW */
|
||||
len = data;
|
||||
if ( (len+x) > width )
|
||||
len = width-x;
|
||||
memcpy( &pDst[x], pSrc, len );
|
||||
x += len;
|
||||
pSrc += (data+1)&(~1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return ICERR_OK;
|
||||
}
|
||||
|
||||
/***********************************************************************/
|
||||
|
||||
static BOOL MSRLE32_IsValidInfoHeader( const BITMAPINFO* pbiIn )
|
||||
{
|
||||
if ( pbiIn->bmiHeader.biSize < sizeof(BITMAPINFOHEADER) ||
|
||||
pbiIn->bmiHeader.biWidth <= 0 ||
|
||||
pbiIn->bmiHeader.biHeight == 0 ||
|
||||
pbiIn->bmiHeader.biPlanes != 1 )
|
||||
return FALSE;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static DWORD MSRLE32_GetClrUsed( const BITMAPINFO* pbiIn )
|
||||
{
|
||||
if ( pbiIn->bmiHeader.biBitCount > 8 )
|
||||
return 0;
|
||||
return (pbiIn->bmiHeader.biClrUsed == 0) ? (1<<pbiIn->bmiHeader.biBitCount) : pbiIn->bmiHeader.biClrUsed;
|
||||
}
|
||||
|
||||
static DWORD MSRLE32_GetUncompressedPitch( const BITMAPINFOHEADER* pbiIn )
|
||||
{
|
||||
return ((((pbiIn->biWidth*pbiIn->biBitCount)+7)>>3)+3)&(~3);
|
||||
}
|
||||
|
||||
static DWORD MSRLE32_GetUncompressedSize( const BITMAPINFOHEADER* pbiIn )
|
||||
{
|
||||
return MSRLE32_GetUncompressedPitch( pbiIn ) * abs(pbiIn->biHeight);
|
||||
}
|
||||
|
||||
|
||||
static BOOL MSRLE32_IsValidRGB( const BITMAPINFO* pbiIn )
|
||||
{
|
||||
if ( !MSRLE32_IsValidInfoHeader( pbiIn ) )
|
||||
return FALSE;
|
||||
|
||||
if ( pbiIn->bmiHeader.biSizeImage != 0 &&
|
||||
pbiIn->bmiHeader.biSizeImage < MSRLE32_GetUncompressedSize( &pbiIn->bmiHeader ) )
|
||||
return FALSE;
|
||||
|
||||
|
||||
switch ( pbiIn->bmiHeader.biCompression )
|
||||
{
|
||||
case 0:
|
||||
case mmioFOURCC('R','G','B',' '):
|
||||
if ( pbiIn->bmiHeader.biBitCount == 1 ||
|
||||
pbiIn->bmiHeader.biBitCount == 4 ||
|
||||
pbiIn->bmiHeader.biBitCount == 8 ||
|
||||
pbiIn->bmiHeader.biBitCount == 16 ||
|
||||
pbiIn->bmiHeader.biBitCount == 24 ||
|
||||
pbiIn->bmiHeader.biBitCount == 32 )
|
||||
return TRUE;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static BOOL MSRLE32_IsValidRLE( const BITMAPINFO* pbiIn )
|
||||
{
|
||||
if ( !MSRLE32_IsValidInfoHeader( pbiIn ) )
|
||||
return FALSE;
|
||||
|
||||
switch ( pbiIn->bmiHeader.biCompression )
|
||||
{
|
||||
case 1:
|
||||
case 2:
|
||||
case mmioFOURCC('R','L','E',' '):
|
||||
case mmioFOURCC('R','L','E','8'):
|
||||
case mmioFOURCC('R','L','E','4'):
|
||||
case mmioFOURCC('M','R','L','E'):
|
||||
if ( pbiIn->bmiHeader.biBitCount == 8 ||
|
||||
pbiIn->bmiHeader.biBitCount == 4 )
|
||||
return TRUE;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static BOOL MSRLE32_CompareInfoHeader( const BITMAPINFO* pbiIn, const BITMAPINFO* pbiOut )
|
||||
{
|
||||
if ( !MSRLE32_IsValidInfoHeader( pbiIn ) ||
|
||||
!MSRLE32_IsValidInfoHeader( pbiOut ) )
|
||||
return FALSE;
|
||||
|
||||
if ( pbiIn->bmiHeader.biWidth != pbiOut->bmiHeader.biWidth ||
|
||||
pbiIn->bmiHeader.biHeight != pbiOut->bmiHeader.biHeight ||
|
||||
pbiIn->bmiHeader.biPlanes != pbiOut->bmiHeader.biPlanes ||
|
||||
pbiIn->bmiHeader.biBitCount != pbiOut->bmiHeader.biBitCount )
|
||||
return FALSE;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************/
|
||||
|
||||
static LONG Codec_DrvQueryConfigure( CodecImpl* This )
|
||||
{
|
||||
return ICERR_UNSUPPORTED;
|
||||
}
|
||||
|
||||
static LONG Codec_DrvConfigure( CodecImpl* This, HWND hwnd, DRVCONFIGINFO* pinfo )
|
||||
{
|
||||
return ICERR_UNSUPPORTED;
|
||||
}
|
||||
|
||||
static LONG Codec_QueryAbout( void )
|
||||
{
|
||||
return ICERR_UNSUPPORTED;
|
||||
}
|
||||
|
||||
static LONG Codec_About( HWND hwnd )
|
||||
{
|
||||
return ICERR_UNSUPPORTED;
|
||||
}
|
||||
|
||||
static LONG Codec_CompressQuery( CodecImpl* This, BITMAPINFO* pbiIn, BITMAPINFO* pbiOut )
|
||||
{
|
||||
FIXME( "compression is not implemented!\n" );
|
||||
return ICERR_UNSUPPORTED;
|
||||
}
|
||||
|
||||
static LONG Codec_CompressBegin( CodecImpl* This, BITMAPINFO* pbiIn, BITMAPINFO* pbiOut )
|
||||
{
|
||||
return ICERR_UNSUPPORTED;
|
||||
}
|
||||
|
||||
static LONG Codec_Compress( CodecImpl* This, ICCOMPRESS* picc, DWORD dwSize )
|
||||
{
|
||||
FIXME( "compression is not implemented!\n" );
|
||||
return ICERR_UNSUPPORTED;
|
||||
}
|
||||
|
||||
static LONG Codec_CompressEnd( CodecImpl* This )
|
||||
{
|
||||
This->bInCompress = FALSE;
|
||||
return ICERR_UNSUPPORTED;
|
||||
}
|
||||
|
||||
static LONG Codec_CompressFramesInfo( CodecImpl* This, ICCOMPRESSFRAMES* piccf, DWORD dwSize )
|
||||
{
|
||||
return ICERR_UNSUPPORTED;
|
||||
}
|
||||
|
||||
static LONG Codec_CompressGetFormat( CodecImpl* This, BITMAPINFO* pbiIn, BITMAPINFO* pbiOut )
|
||||
{
|
||||
return ICERR_UNSUPPORTED;
|
||||
}
|
||||
|
||||
static LONG Codec_CompressGetSize( CodecImpl* This, BITMAPINFO* pbiIn, BITMAPINFO* pbiOut )
|
||||
{
|
||||
return ICERR_UNSUPPORTED;
|
||||
}
|
||||
|
||||
static LONG Codec_ICQueryConfigure( CodecImpl* This )
|
||||
{
|
||||
return ICERR_OK;
|
||||
}
|
||||
static LONG Codec_ICConfigure( CodecImpl* This, HWND hwnd )
|
||||
{
|
||||
MessageBoxA( hwnd, "Wine RLE Driver", "MSRLE32", MB_OK );
|
||||
return ICERR_OK;
|
||||
}
|
||||
|
||||
static LONG Codec_DecompressQuery( CodecImpl* This, BITMAPINFO* pbiIn, BITMAPINFO* pbiOut )
|
||||
{
|
||||
if ( pbiIn == NULL )
|
||||
return ICERR_BADPARAM;
|
||||
if ( !MSRLE32_IsValidRLE( pbiIn ) )
|
||||
return ICERR_UNSUPPORTED;
|
||||
|
||||
if ( pbiOut != NULL )
|
||||
{
|
||||
if ( !MSRLE32_IsValidRGB( pbiOut ) )
|
||||
return ICERR_UNSUPPORTED;
|
||||
if ( !MSRLE32_CompareInfoHeader( pbiIn, pbiOut ) )
|
||||
return ICERR_UNSUPPORTED;
|
||||
}
|
||||
|
||||
return ICERR_OK;
|
||||
}
|
||||
|
||||
static LONG Codec_DecompressBegin( CodecImpl* This, BITMAPINFO* pbiIn, BITMAPINFO* pbiOut )
|
||||
{
|
||||
LONG lr;
|
||||
|
||||
if ( pbiIn == NULL || pbiOut == NULL )
|
||||
return ICERR_BADPARAM;
|
||||
lr = Codec_DecompressQuery( This, pbiIn, pbiOut );
|
||||
if ( lr != ICERR_OK )
|
||||
return lr;
|
||||
|
||||
This->bInDecompress = TRUE;
|
||||
|
||||
return ICERR_OK;
|
||||
}
|
||||
|
||||
static LONG Codec_Decompress( CodecImpl* This, ICDECOMPRESS* picd, DWORD dwSize )
|
||||
{
|
||||
LONG lr;
|
||||
|
||||
if ( !This->bInDecompress )
|
||||
return ICERR_BADHANDLE; /* FIXME? */
|
||||
|
||||
if ( ( picd->dwFlags & ICDECOMPRESS_NOTKEYFRAME ) &&
|
||||
( picd->dwFlags & ICDECOMPRESS_UPDATE ) )
|
||||
return ICERR_CANTUPDATE; /* FIXME? */
|
||||
|
||||
if ( picd->lpbiInput == NULL ||
|
||||
picd->lpInput == NULL ||
|
||||
picd->lpbiOutput == NULL ||
|
||||
picd->lpOutput == NULL )
|
||||
return ICERR_BADPARAM;
|
||||
|
||||
switch ( picd->lpbiInput->biBitCount )
|
||||
{
|
||||
case 4: /* RLE4 */
|
||||
lr = MSRLE32_DecompressRLE4(
|
||||
(BYTE*)picd->lpOutput,
|
||||
MSRLE32_GetUncompressedPitch( picd->lpbiInput ),
|
||||
(const BYTE*)picd->lpInput,
|
||||
picd->lpbiInput->biWidth,
|
||||
picd->lpbiInput->biHeight );
|
||||
break;
|
||||
case 8: /* RLE8 */
|
||||
lr = MSRLE32_DecompressRLE8(
|
||||
(BYTE*)picd->lpOutput,
|
||||
MSRLE32_GetUncompressedPitch( picd->lpbiInput ),
|
||||
(const BYTE*)picd->lpInput,
|
||||
picd->lpbiInput->biWidth,
|
||||
picd->lpbiInput->biHeight );
|
||||
break;
|
||||
default:
|
||||
lr = ICERR_BADBITDEPTH;
|
||||
break;
|
||||
}
|
||||
|
||||
return lr;
|
||||
}
|
||||
|
||||
static LONG Codec_DecompressEnd( CodecImpl* This )
|
||||
{
|
||||
This->bInDecompress = FALSE;
|
||||
return ICERR_OK;
|
||||
}
|
||||
|
||||
static LONG Codec_DecompressGetFormat( CodecImpl* This, BITMAPINFO* pbiIn, BITMAPINFO* pbiOut )
|
||||
{
|
||||
DWORD biClrUsed;
|
||||
LONG lr;
|
||||
|
||||
if ( pbiIn == NULL )
|
||||
return ICERR_BADPARAM;
|
||||
|
||||
lr = Codec_DecompressQuery( This, pbiIn, NULL );
|
||||
if ( lr != ICERR_OK )
|
||||
return ( pbiOut == NULL ) ? 0 : lr;
|
||||
|
||||
biClrUsed = MSRLE32_GetClrUsed(pbiIn);
|
||||
if ( pbiOut == NULL )
|
||||
return sizeof(BITMAPINFOHEADER) + sizeof(RGBQUAD) * biClrUsed;
|
||||
|
||||
ZeroMemory( pbiOut, sizeof(BITMAPINFOHEADER) );
|
||||
memcpy( &pbiOut->bmiHeader, &pbiIn->bmiHeader, sizeof(BITMAPINFOHEADER) );
|
||||
memcpy( &pbiOut->bmiColors, &pbiIn->bmiColors, sizeof(RGBQUAD) * biClrUsed );
|
||||
pbiOut->bmiHeader.biCompression = 0;
|
||||
pbiOut->bmiHeader.biSizeImage = MSRLE32_GetUncompressedSize( &pbiOut->bmiHeader );
|
||||
|
||||
return ICERR_OK;
|
||||
}
|
||||
|
||||
static LONG Codec_DecompressGetPalette( CodecImpl* This, BITMAPINFO* pbiIn, BITMAPINFO* pbiOut )
|
||||
{
|
||||
if ( pbiIn == NULL )
|
||||
return ICERR_BADPARAM;
|
||||
|
||||
return (pbiOut == NULL) ? 0 : ICERR_UNSUPPORTED;
|
||||
}
|
||||
|
||||
static LONG Codec_DecompressSetPalette( CodecImpl* This, BITMAPINFO* pbiIn )
|
||||
{
|
||||
return ICERR_UNSUPPORTED;
|
||||
}
|
||||
|
||||
static LONG Codec_DecompressExQuery( CodecImpl* This, ICDECOMPRESSEX* picdex, DWORD dwSize )
|
||||
{
|
||||
FIXME( "DecompressEx is not implemented!\n" );
|
||||
return ICERR_UNSUPPORTED;
|
||||
}
|
||||
|
||||
static LONG Codec_DecompressExBegin( CodecImpl* This, ICDECOMPRESSEX* picdex, DWORD dwSize )
|
||||
{
|
||||
FIXME( "DecompressEx is not implemented!\n" );
|
||||
return ICERR_UNSUPPORTED;
|
||||
}
|
||||
|
||||
static LONG Codec_DecompressEx( CodecImpl* This, ICDECOMPRESSEX* picdex, DWORD dwSize )
|
||||
{
|
||||
return ICERR_UNSUPPORTED;
|
||||
}
|
||||
|
||||
static LONG Codec_DecompressExEnd( CodecImpl* This )
|
||||
{
|
||||
This->bInDecompressEx = FALSE;
|
||||
return ICERR_UNSUPPORTED;
|
||||
}
|
||||
|
||||
static LONG Codec_GetInfo( CodecImpl* This, ICINFO* pici, DWORD dwSize )
|
||||
{
|
||||
return ICERR_UNSUPPORTED;
|
||||
}
|
||||
|
||||
static LONG Codec_GetQuality( CodecImpl* This, DWORD* pdwQuality )
|
||||
{
|
||||
return ICERR_UNSUPPORTED;
|
||||
}
|
||||
|
||||
static LONG Codec_GetState( CodecImpl* This, LPVOID pvState, DWORD dwSize )
|
||||
{
|
||||
if ( pvState == NULL )
|
||||
return 0;
|
||||
|
||||
/* no driver-specific state */
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static LONG Codec_SetQuality( CodecImpl* This, DWORD* pdwQuality )
|
||||
{
|
||||
return ICERR_UNSUPPORTED;
|
||||
}
|
||||
|
||||
static LONG Codec_SetStatusProc(CodecImpl* This, ICSETSTATUSPROC* picssp, DWORD dwSize )
|
||||
{
|
||||
if ( picssp == NULL )
|
||||
return 0;
|
||||
|
||||
/* no driver-specific state */
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static LONG Codec_SetState( CodecImpl* This, LPVOID pvState, DWORD dwSize )
|
||||
{
|
||||
return ICERR_UNSUPPORTED;
|
||||
}
|
||||
|
||||
static CodecImpl* Codec_AllocDriver( void )
|
||||
{
|
||||
CodecImpl* This;
|
||||
|
||||
This = HeapAlloc( GetProcessHeap(), 0, sizeof(CodecImpl) );
|
||||
if ( This == NULL )
|
||||
return NULL;
|
||||
ZeroMemory( This, sizeof(CodecImpl) );
|
||||
This->bInCompress = FALSE;
|
||||
This->bInDecompress = FALSE;
|
||||
This->bInDecompressEx = FALSE;
|
||||
|
||||
return This;
|
||||
}
|
||||
|
||||
static void Codec_Close( CodecImpl* This )
|
||||
{
|
||||
if ( This->bInCompress )
|
||||
Codec_CompressEnd(This);
|
||||
if ( This->bInDecompress )
|
||||
Codec_DecompressEnd(This);
|
||||
if ( This->bInDecompressEx )
|
||||
Codec_DecompressExEnd(This);
|
||||
|
||||
HeapFree( GetProcessHeap(), 0, This );
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
LONG WINAPI MSRLE32_DriverProc(
|
||||
DWORD dwDriverId, HDRVR hdrvr, UINT msg, LONG lParam1, LONG lParam2 )
|
||||
{
|
||||
TRACE( "DriverProc(%08lx,%08x,%08x,%08lx,%08lx)\n",
|
||||
dwDriverId, hdrvr, msg, lParam1, lParam2 );
|
||||
|
||||
switch ( msg )
|
||||
{
|
||||
case DRV_LOAD:
|
||||
TRACE("DRV_LOAD\n");
|
||||
return TRUE;
|
||||
case DRV_FREE:
|
||||
TRACE("DRV_FREE\n");
|
||||
return TRUE;
|
||||
case DRV_OPEN:
|
||||
TRACE("DRV_OPEN\n");
|
||||
return (LONG)Codec_AllocDriver();
|
||||
case DRV_CLOSE:
|
||||
TRACE("DRV_CLOSE\n");
|
||||
Codec_Close( (CodecImpl*)dwDriverId );
|
||||
return TRUE;
|
||||
case DRV_ENABLE:
|
||||
TRACE("DRV_ENABLE\n");
|
||||
return TRUE;
|
||||
case DRV_DISABLE:
|
||||
TRACE("DRV_DISABLE\n");
|
||||
return TRUE;
|
||||
case DRV_QUERYCONFIGURE:
|
||||
TRACE("DRV_QUERYCONFIGURE\n");
|
||||
return Codec_DrvQueryConfigure( (CodecImpl*)dwDriverId );
|
||||
case DRV_CONFIGURE:
|
||||
TRACE("DRV_CONFIGURE\n");
|
||||
return Codec_DrvConfigure( (CodecImpl*)dwDriverId,
|
||||
(HWND)lParam1, (DRVCONFIGINFO*)lParam2 );
|
||||
case DRV_INSTALL:
|
||||
TRACE("DRV_INSTALL\n");
|
||||
return DRVCNF_OK;
|
||||
case DRV_REMOVE:
|
||||
TRACE("DRV_REMOVE\n");
|
||||
return 0;
|
||||
case DRV_POWER:
|
||||
TRACE("DRV_POWER\n");
|
||||
return TRUE;
|
||||
|
||||
case ICM_ABOUT:
|
||||
TRACE("ICM_ABOUT\n");
|
||||
return (lParam1 == -1) ? Codec_QueryAbout() : Codec_About( (HWND)lParam1 );
|
||||
case ICM_COMPRESS:
|
||||
TRACE("ICM_COMPRESS\n");
|
||||
return Codec_Compress((CodecImpl*)dwDriverId,(ICCOMPRESS*)lParam1,(DWORD)lParam2);
|
||||
case ICM_COMPRESS_BEGIN:
|
||||
TRACE("ICM_COMPRESS_BEGIN\n");
|
||||
return Codec_CompressBegin((CodecImpl*)dwDriverId,(BITMAPINFO*)lParam1,(BITMAPINFO*)lParam2);
|
||||
case ICM_COMPRESS_END:
|
||||
TRACE("ICM_COMPRESS_END\n");
|
||||
return Codec_CompressEnd((CodecImpl*)dwDriverId);
|
||||
case ICM_COMPRESS_FRAMES_INFO:
|
||||
TRACE("ICM_COMPRESS_FRAMES_INFO\n");
|
||||
return Codec_CompressFramesInfo((CodecImpl*)dwDriverId,(ICCOMPRESSFRAMES*)lParam1,(DWORD)lParam2);
|
||||
case ICM_COMPRESS_GET_FORMAT:
|
||||
TRACE("ICM_COMPRESS_GET_FORMAT\n");
|
||||
return Codec_CompressGetFormat((CodecImpl*)dwDriverId,(BITMAPINFO*)lParam1,(BITMAPINFO*)lParam2);
|
||||
case ICM_COMPRESS_GET_SIZE:
|
||||
TRACE("ICM_COMPRESS_GET_SIZE\n");
|
||||
return Codec_CompressGetSize((CodecImpl*)dwDriverId,(BITMAPINFO*)lParam1,(BITMAPINFO*)lParam2);
|
||||
case ICM_COMPRESS_QUERY:
|
||||
TRACE("ICM_COMPRESS_GET_SIZE\n");
|
||||
return Codec_CompressQuery((CodecImpl*)dwDriverId,(BITMAPINFO*)lParam1,(BITMAPINFO*)lParam2);
|
||||
|
||||
case ICM_CONFIGURE:
|
||||
TRACE("ICM_CONFIGURE\n");
|
||||
return ( lParam1 == -1 ) ? Codec_ICQueryConfigure( (CodecImpl*)dwDriverId ) : Codec_ICConfigure( (CodecImpl*)dwDriverId, (HWND)lParam1 );
|
||||
|
||||
case ICM_DECOMPRESS:
|
||||
TRACE( "ICM_DECOMPRESS\n" );
|
||||
return Codec_Decompress((CodecImpl*)dwDriverId,(ICDECOMPRESS*)lParam1,(DWORD)lParam2);
|
||||
case ICM_DECOMPRESS_BEGIN:
|
||||
TRACE( "ICM_DECOMPRESS_BEGIN\n" );
|
||||
return Codec_DecompressBegin((CodecImpl*)dwDriverId,(BITMAPINFO*)lParam1,(BITMAPINFO*)lParam2);
|
||||
case ICM_DECOMPRESS_END:
|
||||
TRACE( "ICM_DECOMPRESS_END\n" );
|
||||
return Codec_DecompressEnd((CodecImpl*)dwDriverId);
|
||||
case ICM_DECOMPRESS_GET_FORMAT:
|
||||
TRACE( "ICM_DECOMPRESS_GET_FORMAT\n" );
|
||||
return Codec_DecompressGetFormat((CodecImpl*)dwDriverId,(BITMAPINFO*)lParam1,(BITMAPINFO*)lParam2);
|
||||
case ICM_DECOMPRESS_GET_PALETTE:
|
||||
TRACE( "ICM_DECOMPRESS_GET_PALETTE\n" );
|
||||
return Codec_DecompressGetPalette((CodecImpl*)dwDriverId,(BITMAPINFO*)lParam1,(BITMAPINFO*)lParam2);
|
||||
case ICM_DECOMPRESS_QUERY:
|
||||
TRACE( "ICM_DECOMPRESS_QUERY\n" );
|
||||
return Codec_DecompressQuery((CodecImpl*)dwDriverId,(BITMAPINFO*)lParam1,(BITMAPINFO*)lParam2);
|
||||
case ICM_DECOMPRESS_SET_PALETTE:
|
||||
TRACE( "ICM_DECOMPRESS_SET_PALETTE\n" );
|
||||
return Codec_DecompressSetPalette((CodecImpl*)dwDriverId,(BITMAPINFO*)lParam1);
|
||||
|
||||
case ICM_DECOMPRESSEX_BEGIN:
|
||||
TRACE( "ICM_DECOMPRESSEX_BEGIN\n" );
|
||||
return Codec_DecompressExBegin((CodecImpl*)dwDriverId,(ICDECOMPRESSEX*)lParam1,(DWORD)lParam2);
|
||||
case ICM_DECOMPRESSEX:
|
||||
TRACE( "ICM_DECOMPRESSEX\n" );
|
||||
return Codec_DecompressEx((CodecImpl*)dwDriverId,(ICDECOMPRESSEX*)lParam1,(DWORD)lParam2);
|
||||
case ICM_DECOMPRESSEX_END:
|
||||
TRACE( "ICM_DECOMPRESSEX_END\n" );
|
||||
return Codec_DecompressExEnd((CodecImpl*)dwDriverId);
|
||||
case ICM_DECOMPRESSEX_QUERY:
|
||||
TRACE( "ICM_DECOMPRESSEX_QUERY\n" );
|
||||
return Codec_DecompressExQuery((CodecImpl*)dwDriverId,(ICDECOMPRESSEX*)lParam1,(DWORD)lParam2);
|
||||
|
||||
case ICM_GETINFO:
|
||||
TRACE( "ICM_GETINFO\n" );
|
||||
return Codec_GetInfo((CodecImpl*)dwDriverId,(ICINFO*)lParam1,(DWORD)lParam2);
|
||||
case ICM_GETQUALITY:
|
||||
TRACE( "ICM_SETQUALITY\n");
|
||||
return Codec_GetQuality((CodecImpl*)dwDriverId,(DWORD*)lParam1);
|
||||
case ICM_GETSTATE:
|
||||
TRACE( "ICM_GETSTATE\n" );
|
||||
return Codec_GetState((CodecImpl*)dwDriverId,(LPVOID)lParam1,(DWORD)lParam2);
|
||||
case ICM_SETQUALITY:
|
||||
TRACE( "ICM_SETQUALITY\n");
|
||||
return Codec_SetQuality((CodecImpl*)dwDriverId,(DWORD*)lParam1);
|
||||
case ICM_SET_STATUS_PROC:
|
||||
TRACE( "ICM_SET_STATUS_PROC\n" );
|
||||
return Codec_SetStatusProc((CodecImpl*)dwDriverId,(ICSETSTATUSPROC*)lParam1,(DWORD)lParam2);
|
||||
case ICM_SETSTATE:
|
||||
TRACE( "ICM_SETSTATE\n" );
|
||||
return Codec_SetState((CodecImpl*)dwDriverId,(LPVOID)lParam1,(DWORD)lParam2);
|
||||
|
||||
}
|
||||
|
||||
return DefDriverProc( dwDriverId, hdrvr, msg, lParam1, lParam2 );
|
||||
}
|
||||
|
||||
BOOL WINAPI MSRLE32_DllMain( HINSTANCE hInst, DWORD dwReason, LPVOID lpvReserved )
|
||||
{
|
||||
TRACE( "(%08x,%08lx,%p)\n",hInst,dwReason,lpvReserved );
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
/* all codes are removed by author */
|
||||
|
|
|
@ -1,13 +1,9 @@
|
|||
name msrle32
|
||||
type win32
|
||||
init MSRLE32_DllMain
|
||||
|
||||
import winmm.dll
|
||||
import user32.dll
|
||||
import kernel32.dll
|
||||
import ntdll.dll
|
||||
|
||||
debug_channels(msrle32)
|
||||
debug_channels()
|
||||
|
||||
@ stdcall DriverProc(long long long long long) MSRLE32_DriverProc
|
||||
@ stub DriverProc #(long long long long long)
|
||||
|
||||
|
|
|
@ -12,15 +12,12 @@ SYMBOLFILE = $(MODULE).tmp.o
|
|||
C_SRCS = \
|
||||
connpt.c \
|
||||
dispatch.c \
|
||||
dispstd.c \
|
||||
disptype.c \
|
||||
hash.c \
|
||||
ole2disp.c \
|
||||
oleaut.c \
|
||||
olefont.c \
|
||||
olepicture.c \
|
||||
parsedt.c \
|
||||
propertyframe.c \
|
||||
safearray.c \
|
||||
stubs.c \
|
||||
tmarshal.c \
|
||||
|
|
|
@ -1,246 +0,0 @@
|
|||
/*
|
||||
* Copyright 2001 Hidenori Takeshima
|
||||
*
|
||||
* FIXME - stub
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include "winerror.h"
|
||||
#include "winnls.h" /* for PRIMARYLANGID */
|
||||
#include "winreg.h" /* for HKEY_LOCAL_MACHINE */
|
||||
#include "winuser.h"
|
||||
#include "oleauto.h"
|
||||
|
||||
#include "wine/debug.h"
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(ole);
|
||||
|
||||
typedef struct CStdDispImpl
|
||||
{
|
||||
ICOM_VFIELD(IDispatch);
|
||||
struct { ICOM_VFIELD(IUnknown); } unkimpl;
|
||||
UINT ref;
|
||||
|
||||
IUnknown* punk;
|
||||
void* pvThis;
|
||||
ITypeInfo* pti;
|
||||
} CStdDispImpl;
|
||||
|
||||
static HRESULT CStdDispImpl_Construct(
|
||||
CStdDispImpl* This,
|
||||
IUnknown* punkOuter, void* pvThis, ITypeInfo* pti )
|
||||
{
|
||||
This->punk = punkOuter;
|
||||
This->pvThis = pvThis;
|
||||
This->pti = pti; ITypeInfo_AddRef(pti);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static void CStdDispImpl_Destruct(
|
||||
CStdDispImpl* This )
|
||||
{
|
||||
if ( This->pti != NULL )
|
||||
ITypeInfo_Release(This->pti);
|
||||
}
|
||||
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
|
||||
static HRESULT WINAPI In_CStdDispImpl_fnQueryInterface(
|
||||
IUnknown* iface,REFIID riid,void** ppvobj)
|
||||
{
|
||||
CStdDispImpl* This = (CStdDispImpl*)(((BYTE*)iface)-offsetof(CStdDispImpl,unkimpl));
|
||||
|
||||
if ( IsEqualGUID(riid,&IID_IUnknown) )
|
||||
{
|
||||
*ppvobj = (void*)iface;
|
||||
IUnknown_AddRef(iface);
|
||||
return S_OK;
|
||||
}
|
||||
if ( IsEqualGUID(riid,&IID_IDispatch) )
|
||||
{
|
||||
*ppvobj = (void*)This;
|
||||
IUnknown_AddRef((IUnknown*)This);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
return E_NOINTERFACE;
|
||||
}
|
||||
|
||||
static ULONG WINAPI In_CStdDispImpl_fnAddRef(IUnknown* iface)
|
||||
{
|
||||
CStdDispImpl* This = (CStdDispImpl*)(((BYTE*)iface)-offsetof(CStdDispImpl,unkimpl));
|
||||
|
||||
return ++ This->ref;
|
||||
}
|
||||
|
||||
static ULONG WINAPI In_CStdDispImpl_fnRelease(IUnknown* iface)
|
||||
{
|
||||
CStdDispImpl* This = (CStdDispImpl*)(((BYTE*)iface)-offsetof(CStdDispImpl,unkimpl));
|
||||
|
||||
if ( -- This->ref > 0 ) return This->ref;
|
||||
|
||||
++ This->ref;
|
||||
CStdDispImpl_Destruct(This);
|
||||
HeapFree(GetProcessHeap(),0,This);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
|
||||
|
||||
static HRESULT WINAPI CStdDispImpl_fnQueryInterface(
|
||||
IDispatch* iface,REFIID riid,void** ppvobj)
|
||||
{
|
||||
ICOM_THIS(CStdDispImpl,iface);
|
||||
|
||||
return IUnknown_QueryInterface(This->punk,riid,ppvobj);
|
||||
}
|
||||
|
||||
static ULONG WINAPI CStdDispImpl_fnAddRef(IDispatch* iface)
|
||||
{
|
||||
ICOM_THIS(CStdDispImpl,iface);
|
||||
|
||||
return IUnknown_AddRef(This->punk);
|
||||
}
|
||||
|
||||
static ULONG WINAPI CStdDispImpl_fnRelease(IDispatch* iface)
|
||||
{
|
||||
ICOM_THIS(CStdDispImpl,iface);
|
||||
|
||||
return IUnknown_Release(This->punk);
|
||||
}
|
||||
|
||||
|
||||
static HRESULT WINAPI CStdDispImpl_fnGetTypeInfoCount(
|
||||
IDispatch* iface,UINT* pctinfo)
|
||||
{
|
||||
ICOM_THIS(CStdDispImpl,iface);
|
||||
|
||||
FIXME("(%p)\n",This);
|
||||
if ( pctinfo == NULL ) return E_POINTER;
|
||||
*pctinfo = 1;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI CStdDispImpl_fnGetTypeInfo(
|
||||
IDispatch* iface,
|
||||
UINT itiindex,LCID lcid,ITypeInfo** ppti)
|
||||
{
|
||||
ICOM_THIS(CStdDispImpl,iface);
|
||||
|
||||
FIXME("(%p)\n",This);
|
||||
|
||||
if ( ppti != NULL ) return E_POINTER;
|
||||
*ppti = NULL;
|
||||
|
||||
if ( itiindex != 0 ) return DISP_E_BADINDEX;
|
||||
/* lcid is ignored */
|
||||
ITypeInfo_AddRef(This->pti);
|
||||
*ppti = This->pti;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI CStdDispImpl_fnGetIDsOfNames(
|
||||
IDispatch* iface,
|
||||
REFIID riid,LPOLESTR* ppwszNames,UINT cNames,LCID lcid,DISPID* pdispid)
|
||||
{
|
||||
ICOM_THIS(CStdDispImpl,iface);
|
||||
|
||||
FIXME("(%p)\n",This);
|
||||
return DispGetIDsOfNames(This->pti,ppwszNames,cNames,pdispid);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI CStdDispImpl_fnInvoke(
|
||||
IDispatch* iface,
|
||||
DISPID dispid,REFIID riid,LCID lcid,WORD wFlags,
|
||||
DISPPARAMS* pDispParams,VARIANT* pVarResult,
|
||||
EXCEPINFO* pExcepInfo,UINT* puArgErr)
|
||||
{
|
||||
ICOM_THIS(CStdDispImpl,iface);
|
||||
|
||||
FIXME("(%p)\n",This);
|
||||
return DispInvoke(This->pvThis,
|
||||
This->pti,dispid,wFlags,
|
||||
pDispParams,pVarResult,
|
||||
pExcepInfo,puArgErr);
|
||||
}
|
||||
|
||||
static ICOM_VTABLE(IUnknown) iunk =
|
||||
{
|
||||
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
|
||||
|
||||
/* IUnknown */
|
||||
In_CStdDispImpl_fnQueryInterface,
|
||||
In_CStdDispImpl_fnAddRef,
|
||||
In_CStdDispImpl_fnRelease,
|
||||
};
|
||||
|
||||
static ICOM_VTABLE(IDispatch) idisp =
|
||||
{
|
||||
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
|
||||
|
||||
/* IUnknown */
|
||||
CStdDispImpl_fnQueryInterface,
|
||||
CStdDispImpl_fnAddRef,
|
||||
CStdDispImpl_fnRelease,
|
||||
/* IDispatch */
|
||||
CStdDispImpl_fnGetTypeInfoCount,
|
||||
CStdDispImpl_fnGetTypeInfo,
|
||||
CStdDispImpl_fnGetIDsOfNames,
|
||||
CStdDispImpl_fnInvoke,
|
||||
};
|
||||
|
||||
/******************************************************************************
|
||||
* CreateStdDispatch (OLEAUT32.32)
|
||||
*/
|
||||
|
||||
HRESULT WINAPI CreateStdDispatch(
|
||||
IUnknown* punkOuter,
|
||||
void* pvThis,
|
||||
ITypeInfo* pti,
|
||||
IUnknown** ppvobj )
|
||||
{
|
||||
HRESULT hr;
|
||||
CStdDispImpl* This;
|
||||
|
||||
if ( punkOuter == NULL || pvThis == NULL ||
|
||||
pti == NULL || ppvobj == NULL )
|
||||
return E_POINTER;
|
||||
|
||||
This = (CStdDispImpl*)HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(CStdDispImpl));
|
||||
if ( This == NULL ) return E_OUTOFMEMORY;
|
||||
ICOM_VTBL(This) = &idisp;
|
||||
ICOM_VTBL(&(This->unkimpl)) = &iunk;
|
||||
This->ref = 1;
|
||||
|
||||
hr = CStdDispImpl_Construct( This, punkOuter, pvThis, pti );
|
||||
if ( FAILED(hr) )
|
||||
{
|
||||
IUnknown_Release((IUnknown*)(&This->unkimpl));
|
||||
return hr;
|
||||
}
|
||||
*ppvobj = (IUnknown*)(&This->unkimpl);
|
||||
|
||||
return S_OK;
|
||||
}
|
|
@ -1,783 +0,0 @@
|
|||
/*
|
||||
* Copyright 2001 Hidenori Takeshima
|
||||
*
|
||||
* FIXME - stub
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include "winerror.h"
|
||||
#include "winnls.h" /* for PRIMARYLANGID */
|
||||
#include "winreg.h" /* for HKEY_LOCAL_MACHINE */
|
||||
#include "winuser.h"
|
||||
#include "oleauto.h"
|
||||
|
||||
#include "typelib.h"
|
||||
|
||||
#include "wine/debug.h"
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(ole);
|
||||
|
||||
typedef struct CTypeInfo2Impl
|
||||
{
|
||||
ICOM_VFIELD(ITypeInfo2);
|
||||
UINT ref;
|
||||
|
||||
INTERFACEDATA ifd;
|
||||
LCID lcid;
|
||||
} CTypeInfo2Impl;
|
||||
|
||||
static OLECHAR* olestrdup(OLECHAR* psz)
|
||||
{
|
||||
OLECHAR* pret;
|
||||
DWORD cb;
|
||||
|
||||
cb = (lstrlenW(psz)+1) * sizeof(OLECHAR);
|
||||
pret = (OLECHAR*)HeapAlloc( GetProcessHeap(), 0, cb );
|
||||
if ( pret != NULL )
|
||||
memcpy( pret, psz, cb );
|
||||
return pret;
|
||||
}
|
||||
|
||||
static HRESULT CTypeInfo2Impl_Construct(
|
||||
CTypeInfo2Impl* This,INTERFACEDATA* pifd,LCID lcid)
|
||||
{
|
||||
DWORD n,k;
|
||||
METHODDATA* pmdst;
|
||||
const METHODDATA* pmsrc;
|
||||
PARAMDATA* pPdst;
|
||||
const PARAMDATA* pPsrc;
|
||||
|
||||
This->ifd.pmethdata = (METHODDATA*)HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(METHODDATA)*pifd->cMembers);
|
||||
if ( This->ifd.pmethdata == NULL ) return E_OUTOFMEMORY;
|
||||
This->ifd.cMembers = pifd->cMembers;
|
||||
for ( n = 0; n < pifd->cMembers; n++ )
|
||||
{
|
||||
pmdst = &This->ifd.pmethdata[n];
|
||||
pmsrc = &pifd->pmethdata[n];
|
||||
|
||||
pmdst->szName = olestrdup(pmsrc->szName);
|
||||
if ( pmdst->szName == NULL ) return E_OUTOFMEMORY;
|
||||
pmdst->ppdata = NULL;
|
||||
pmdst->dispid = pmsrc->dispid;
|
||||
pmdst->iMeth = pmsrc->iMeth;
|
||||
pmdst->cc = pmsrc->cc;
|
||||
pmdst->cArgs = pmsrc->cArgs;
|
||||
pmdst->wFlags = pmsrc->wFlags;
|
||||
pmdst->vtReturn = pmsrc->vtReturn;
|
||||
|
||||
if ( pmsrc->cArgs <= 0 ) continue;
|
||||
pmdst->ppdata = (PARAMDATA*)HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(PARAMDATA)*pmsrc->cArgs);
|
||||
if ( pmdst->ppdata == NULL ) return E_OUTOFMEMORY;
|
||||
|
||||
for ( k = 0; k < pmsrc->cArgs; k++ )
|
||||
{
|
||||
pPdst = &pmdst->ppdata[k];
|
||||
pPsrc = &pmsrc->ppdata[k];
|
||||
pPdst->szName = olestrdup(pPsrc->szName);
|
||||
if ( pPdst->szName == NULL ) return E_OUTOFMEMORY;
|
||||
pPdst->vt = pPsrc->vt;
|
||||
}
|
||||
}
|
||||
|
||||
This->lcid = lcid;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static void CTypeInfo2Impl_Destruct(CTypeInfo2Impl* This)
|
||||
{
|
||||
DWORD n,k;
|
||||
METHODDATA* pm;
|
||||
PARAMDATA* pP;
|
||||
|
||||
if ( This->ifd.pmethdata != NULL )
|
||||
{
|
||||
for ( n = 0; n < This->ifd.cMembers; n++ )
|
||||
{
|
||||
pm = &This->ifd.pmethdata[n];
|
||||
if ( pm->szName != NULL )
|
||||
HeapFree(GetProcessHeap(),0,pm->szName);
|
||||
if ( pm->ppdata == NULL ) continue;
|
||||
|
||||
for ( k = 0; k < pm->cArgs; k++ )
|
||||
{
|
||||
pP = &pm->ppdata[k];
|
||||
if ( pP->szName != NULL )
|
||||
HeapFree(GetProcessHeap(),0,pP->szName);
|
||||
}
|
||||
HeapFree(GetProcessHeap(),0,pm->ppdata);
|
||||
}
|
||||
HeapFree(GetProcessHeap(),0,This->ifd.pmethdata);
|
||||
This->ifd.pmethdata = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
static const METHODDATA* CTypeInfo2Impl_SearchMethodByName(
|
||||
CTypeInfo2Impl* This,const OLECHAR* pName)
|
||||
{
|
||||
DWORD n;
|
||||
METHODDATA* pm;
|
||||
|
||||
for ( n = 0; n < This->ifd.cMembers; n++ )
|
||||
{
|
||||
pm = &This->ifd.pmethdata[n];
|
||||
if ( !lstrcmpiW(pm->szName,pName) )
|
||||
return pm;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static const METHODDATA* CTypeInfo2Impl_SearchMethodByDispIDAndFlags(
|
||||
CTypeInfo2Impl* This,DISPID dispid,UINT16 wFlags)
|
||||
{
|
||||
DWORD n;
|
||||
METHODDATA* pm;
|
||||
|
||||
for ( n = 0; n < This->ifd.cMembers; n++ )
|
||||
{
|
||||
pm = &This->ifd.pmethdata[n];
|
||||
if ( (pm->dispid == dispid) && (pm->wFlags & wFlags) )
|
||||
return pm;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
static int CTypeInfo2Impl_SearchParamByName(
|
||||
const METHODDATA* pm,const OLECHAR* pName)
|
||||
{
|
||||
PARAMDATA* pP;
|
||||
DWORD k;
|
||||
|
||||
for ( k = 0; k < pm->cArgs; k++ )
|
||||
{
|
||||
pP = &pm->ppdata[k];
|
||||
if ( !lstrcmpiW(pP->szName,pName) )
|
||||
return (int)k;
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
static HRESULT WINAPI CTypeInfo2Impl_fnQueryInterface(
|
||||
ITypeInfo2* iface,REFIID riid,void** ppvobj)
|
||||
{
|
||||
ICOM_THIS(CTypeInfo2Impl,iface);
|
||||
|
||||
TRACE("(%p)->(IID: %s)\n",This,debugstr_guid(riid));
|
||||
|
||||
*ppvobj = NULL;
|
||||
if ( IsEqualIID(riid, &IID_IUnknown) ||
|
||||
IsEqualIID(riid, &IID_ITypeInfo) ||
|
||||
IsEqualIID(riid, &IID_ITypeInfo2) )
|
||||
{
|
||||
*ppvobj = (void*)iface;
|
||||
ITypeInfo2_AddRef(iface);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
return E_NOINTERFACE;
|
||||
}
|
||||
|
||||
static ULONG WINAPI CTypeInfo2Impl_fnAddRef(ITypeInfo2* iface)
|
||||
{
|
||||
ICOM_THIS(CTypeInfo2Impl,iface);
|
||||
|
||||
return ++ This->ref;
|
||||
}
|
||||
|
||||
static ULONG WINAPI CTypeInfo2Impl_fnRelease(ITypeInfo2* iface)
|
||||
{
|
||||
ICOM_THIS(CTypeInfo2Impl,iface);
|
||||
|
||||
if ( -- This->ref > 0 ) return This->ref;
|
||||
|
||||
++ This->ref;
|
||||
CTypeInfo2Impl_Destruct(This);
|
||||
HeapFree(GetProcessHeap(),0,This);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI CTypeInfo2Impl_fnGetTypeAttr(
|
||||
ITypeInfo2* iface,LPTYPEATTR* ppTypeAttr)
|
||||
{
|
||||
ICOM_THIS(CTypeInfo2Impl,iface);
|
||||
TYPEATTR* pta;
|
||||
|
||||
FIXME("(%p)\n",This);
|
||||
|
||||
if ( ppTypeAttr == NULL )
|
||||
return E_POINTER;
|
||||
pta = (TYPEATTR*)HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(TYPEATTR));
|
||||
if ( pta == NULL ) return E_OUTOFMEMORY;
|
||||
|
||||
/* FIXME!!! */
|
||||
pta->lcid = This->lcid;
|
||||
pta->memidConstructor = MEMBERID_NIL;
|
||||
pta->memidDestructor = MEMBERID_NIL;
|
||||
pta->lpstrSchema = NULL;
|
||||
pta->cbSizeInstance = 0;
|
||||
pta->typekind = 0;
|
||||
pta->cFuncs = This->ifd.cMembers;
|
||||
pta->cVars = 0;
|
||||
pta->cImplTypes = 1;
|
||||
pta->cbSizeVft = sizeof(DWORD)*This->ifd.cMembers;
|
||||
pta->cbAlignment = sizeof(DWORD);
|
||||
pta->wTypeFlags = 0;
|
||||
pta->wMajorVerNum = 1;
|
||||
pta->wMinorVerNum = 0;
|
||||
ZeroMemory( &pta->idldescType, sizeof(pta->idldescType) );
|
||||
|
||||
*ppTypeAttr = pta;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI CTypeInfo2Impl_fnGetTypeComp(
|
||||
ITypeInfo2* iface,ITypeComp** ppTComp)
|
||||
{
|
||||
ICOM_THIS(CTypeInfo2Impl,iface);
|
||||
|
||||
FIXME("(%p) stub!\n",This);
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI CTypeInfo2Impl_fnGetFuncDesc(
|
||||
ITypeInfo2* iface,UINT index,LPFUNCDESC* ppFuncDesc)
|
||||
{
|
||||
ICOM_THIS(CTypeInfo2Impl,iface);
|
||||
|
||||
FIXME("(%p) stub!\n",This);
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI CTypeInfo2Impl_fnGetVarDesc(
|
||||
ITypeInfo2* iface,UINT index,LPVARDESC* ppVarDesc)
|
||||
{
|
||||
ICOM_THIS(CTypeInfo2Impl,iface);
|
||||
|
||||
FIXME("(%p) stub!\n",This);
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI CTypeInfo2Impl_fnGetNames(
|
||||
ITypeInfo2* iface, MEMBERID memid,BSTR* rgBstrNames,
|
||||
UINT cMaxNames, UINT* pcNames)
|
||||
{
|
||||
ICOM_THIS(CTypeInfo2Impl,iface);
|
||||
|
||||
FIXME("(%p) stub!\n",This);
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI CTypeInfo2Impl_fnGetRefTypeOfImplType(
|
||||
ITypeInfo2* iface,UINT index,HREFTYPE* pRefType)
|
||||
{
|
||||
ICOM_THIS(CTypeInfo2Impl,iface);
|
||||
|
||||
FIXME("(%p) stub!\n",This);
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI CTypeInfo2Impl_fnGetImplTypeFlags(
|
||||
ITypeInfo2* iface,UINT index,INT* pImplTypeFlags)
|
||||
{
|
||||
ICOM_THIS(CTypeInfo2Impl,iface);
|
||||
|
||||
FIXME("(%p) stub!\n",This);
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI CTypeInfo2Impl_fnGetIDsOfNames(
|
||||
ITypeInfo2* iface,LPOLESTR* rgszNames,UINT cNames,MEMBERID* pMemId)
|
||||
{
|
||||
ICOM_THIS(CTypeInfo2Impl,iface);
|
||||
const METHODDATA* pm;
|
||||
DWORD n;
|
||||
int index;
|
||||
|
||||
TRACE("(%p,%s,%u,%p)\n",This,debugstr_w(*rgszNames),cNames,pMemId);
|
||||
|
||||
if ( rgszNames == NULL || pMemId == NULL ) return E_POINTER;
|
||||
if ( cNames <= 0 ) return E_INVALIDARG;
|
||||
for ( n = 0; n < cNames; n++ )
|
||||
{
|
||||
if ( rgszNames[n] == NULL ) return E_POINTER;
|
||||
}
|
||||
|
||||
pm = CTypeInfo2Impl_SearchMethodByName(This,rgszNames[0]);
|
||||
if ( pm == NULL ) return DISP_E_UNKNOWNNAME;
|
||||
pMemId[0] = (MEMBERID)pm->dispid;
|
||||
|
||||
for ( n = 1; n < cNames; n++ )
|
||||
{
|
||||
index = CTypeInfo2Impl_SearchParamByName(pm,rgszNames[n]);
|
||||
if ( index < 0 ) return DISP_E_UNKNOWNNAME;
|
||||
pMemId[n] = (MEMBERID)index;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI CTypeInfo2Impl_fnInvoke(
|
||||
ITypeInfo2* iface,VOID* punk,MEMBERID memid,
|
||||
UINT16 wFlags,DISPPARAMS* pDispParams,VARIANT* pVarResult,
|
||||
EXCEPINFO* pExcepInfo,UINT* pArgErr)
|
||||
{
|
||||
ICOM_THIS(CTypeInfo2Impl,iface);
|
||||
const METHODDATA* pm;
|
||||
DWORD res;
|
||||
HRESULT hr;
|
||||
int n;
|
||||
DWORD cargs;
|
||||
DWORD* pargs = NULL;
|
||||
VARIANT varError;
|
||||
VARIANT varRet;
|
||||
|
||||
FIXME("(%p,%p,%ld,%08x,%p,%p,%p,%p)\n",
|
||||
This,punk,(long)memid,(int)wFlags,
|
||||
pDispParams,pVarResult,pExcepInfo,pArgErr);
|
||||
|
||||
if ( punk == NULL || pArgErr == NULL )
|
||||
return E_POINTER;
|
||||
|
||||
pm = CTypeInfo2Impl_SearchMethodByDispIDAndFlags(
|
||||
This,memid,wFlags);
|
||||
if ( pm == NULL )
|
||||
{
|
||||
ERR("did not find member id %ld, flags %d!\n", (long)memid, (int)wFlags);
|
||||
return DISP_E_MEMBERNOTFOUND;
|
||||
}
|
||||
|
||||
cargs = pm->cArgs + 1;
|
||||
pargs = (DWORD*)HeapAlloc(GetProcessHeap(), 0, sizeof(DWORD)*(pm->cArgs+2) );
|
||||
if ( pargs == NULL ) { hr = E_OUTOFMEMORY; goto err_invoke; }
|
||||
|
||||
V_VT(&varError) = VT_ERROR;
|
||||
pargs[0] = (DWORD)punk;
|
||||
for ( n = 1; n <= (int)pm->cArgs; n++ )
|
||||
pargs[n] = (DWORD)&varError; /* FIXME? */
|
||||
|
||||
if ( (int)pDispParams->cArgs > (int)pm->cArgs )
|
||||
{
|
||||
hr = E_FAIL; /* FIXME? */
|
||||
goto err_invoke;
|
||||
}
|
||||
|
||||
for ( n = 1; n <= (int)pm->cArgs; n++ )
|
||||
{
|
||||
if ( n <= (int)pDispParams->cNamedArgs )
|
||||
{
|
||||
/* FIXME - handle named args. */
|
||||
/* FIXME - check types. */
|
||||
|
||||
/* pDispParams->rgdispidNamedArgs */
|
||||
/* pDispParams->cNamedArgs */
|
||||
FIXME("named args - %d\n",n);
|
||||
pargs[n] = V_UNION(&pDispParams->rgvarg[pDispParams->cArgs-n],lVal);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* FIXME - check types. */
|
||||
pargs[n] = V_UNION(&pDispParams->rgvarg[pDispParams->cArgs-n],lVal);
|
||||
}
|
||||
}
|
||||
|
||||
VariantInit( &varRet );
|
||||
if ( pm->vtReturn != VT_EMPTY &&
|
||||
(!(wFlags & (DISPATCH_PROPERTYPUT|DISPATCH_PROPERTYPUTREF))) )
|
||||
{
|
||||
if ( pVarResult != NULL )
|
||||
{
|
||||
pargs[cargs] = (DWORD)pVarResult;
|
||||
}
|
||||
else
|
||||
{
|
||||
pargs[cargs] = (DWORD)(&varRet);
|
||||
}
|
||||
cargs ++;
|
||||
}
|
||||
|
||||
res = _invoke(
|
||||
(*(DWORD***)punk)[pm->iMeth],
|
||||
pm->cc, cargs, pargs );
|
||||
VariantClear( &varRet );
|
||||
|
||||
if ( res == (DWORD)-1 ) /* FIXME? */
|
||||
{
|
||||
hr = E_FAIL;
|
||||
goto err_invoke;
|
||||
}
|
||||
|
||||
hr = S_OK;
|
||||
err_invoke:
|
||||
HeapFree( GetProcessHeap(), 0, pargs );
|
||||
|
||||
return hr;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI CTypeInfo2Impl_fnGetDocumentation(
|
||||
ITypeInfo2* iface,
|
||||
MEMBERID memid, BSTR* pBstrName, BSTR* pBstrDocString,
|
||||
DWORD* pdwHelpContext, BSTR* pBstrHelpFile)
|
||||
{
|
||||
ICOM_THIS(CTypeInfo2Impl,iface);
|
||||
|
||||
FIXME("(%p) stub!\n",This);
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI CTypeInfo2Impl_fnGetDllEntry(
|
||||
ITypeInfo2* iface,MEMBERID memid,
|
||||
INVOKEKIND invKind,BSTR* pBstrDllName,BSTR* pBstrName,
|
||||
WORD* pwOrdinal)
|
||||
{
|
||||
ICOM_THIS(CTypeInfo2Impl,iface);
|
||||
|
||||
FIXME("(%p) stub!\n",This);
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI CTypeInfo2Impl_fnGetRefTypeInfo(
|
||||
ITypeInfo2* iface,HREFTYPE hRefType,ITypeInfo** ppTInfo)
|
||||
{
|
||||
ICOM_THIS(CTypeInfo2Impl,iface);
|
||||
|
||||
FIXME("(%p) stub!\n",This);
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI CTypeInfo2Impl_fnAddressOfMember(
|
||||
ITypeInfo2 *iface,
|
||||
MEMBERID memid,INVOKEKIND invKind,PVOID* ppv)
|
||||
{
|
||||
ICOM_THIS(CTypeInfo2Impl,iface);
|
||||
|
||||
FIXME("(%p) stub!\n",This);
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI CTypeInfo2Impl_fnCreateInstance(
|
||||
ITypeInfo2* iface,
|
||||
IUnknown* punk,REFIID riid,VOID** ppvObj)
|
||||
{
|
||||
ICOM_THIS(CTypeInfo2Impl,iface);
|
||||
|
||||
FIXME("(%p) stub!\n",This);
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI CTypeInfo2Impl_fnGetMops(
|
||||
ITypeInfo2* iface,MEMBERID memid,BSTR* pBstrMops)
|
||||
{
|
||||
ICOM_THIS(CTypeInfo2Impl,iface);
|
||||
|
||||
FIXME("(%p) stub!\n",This);
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI CTypeInfo2Impl_fnGetContainingTypeLib(
|
||||
ITypeInfo2* iface,ITypeLib** ppTLib,UINT* pIndex)
|
||||
{
|
||||
ICOM_THIS(CTypeInfo2Impl,iface);
|
||||
|
||||
FIXME("(%p) stub!\n",This);
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI CTypeInfo2Impl_fnReleaseTypeAttr(
|
||||
ITypeInfo2* iface,TYPEATTR* pTypeAttr)
|
||||
{
|
||||
ICOM_THIS(CTypeInfo2Impl,iface);
|
||||
|
||||
FIXME("(%p)\n",This);
|
||||
|
||||
if ( pTypeAttr != NULL )
|
||||
HeapFree(GetProcessHeap(),0,pTypeAttr);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI CTypeInfo2Impl_fnReleaseFuncDesc(
|
||||
ITypeInfo2* iface,FUNCDESC* pFuncDesc)
|
||||
{
|
||||
ICOM_THIS(CTypeInfo2Impl,iface);
|
||||
|
||||
FIXME("(%p) stub!\n",This);
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI CTypeInfo2Impl_fnReleaseVarDesc(
|
||||
ITypeInfo2* iface,VARDESC* pVarDesc)
|
||||
{
|
||||
ICOM_THIS(CTypeInfo2Impl,iface);
|
||||
|
||||
FIXME("(%p) stub!\n",This);
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI CTypeInfo2Impl_fnGetTypeKind(
|
||||
ITypeInfo2* iface,TYPEKIND* pTypeKind)
|
||||
{
|
||||
ICOM_THIS(CTypeInfo2Impl,iface);
|
||||
|
||||
FIXME("(%p) stub!\n",This);
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI CTypeInfo2Impl_fnGetTypeFlags(
|
||||
ITypeInfo2* iface,UINT* pTypeFlags)
|
||||
{
|
||||
ICOM_THIS(CTypeInfo2Impl,iface);
|
||||
|
||||
FIXME("(%p) stub!\n",This);
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI CTypeInfo2Impl_fnGetFuncIndexOfMemId(
|
||||
ITypeInfo2* iface,
|
||||
MEMBERID memid,INVOKEKIND invKind,UINT* pFuncIndex)
|
||||
{
|
||||
ICOM_THIS(CTypeInfo2Impl,iface);
|
||||
|
||||
FIXME("(%p) stub!\n",This);
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI CTypeInfo2Impl_fnGetVarIndexOfMemId(
|
||||
ITypeInfo2* iface,
|
||||
MEMBERID memid,UINT* pVarIndex)
|
||||
{
|
||||
ICOM_THIS(CTypeInfo2Impl,iface);
|
||||
|
||||
FIXME("(%p) stub!\n",This);
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI CTypeInfo2Impl_fnGetCustData(
|
||||
ITypeInfo2* iface,REFGUID guid,VARIANT* pVarVal)
|
||||
{
|
||||
ICOM_THIS(CTypeInfo2Impl,iface);
|
||||
|
||||
FIXME("(%p) stub!\n",This);
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI CTypeInfo2Impl_fnGetFuncCustData(
|
||||
ITypeInfo2* iface,UINT index,REFGUID guid,VARIANT* pVarVal)
|
||||
{
|
||||
ICOM_THIS(CTypeInfo2Impl,iface);
|
||||
|
||||
FIXME("(%p) stub!\n",This);
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI CTypeInfo2Impl_fnGetParamCustData(
|
||||
ITypeInfo2* iface,UINT indexFunc,UINT indexParam,
|
||||
REFGUID guid,VARIANT* pVarVal)
|
||||
{
|
||||
ICOM_THIS(CTypeInfo2Impl,iface);
|
||||
|
||||
FIXME("(%p) stub!\n",This);
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI CTypeInfo2Impl_fnGetVarCustData(
|
||||
ITypeInfo2* iface,UINT index,REFGUID guid,VARIANT* pVarVal)
|
||||
{
|
||||
ICOM_THIS(CTypeInfo2Impl,iface);
|
||||
|
||||
FIXME("(%p) stub!\n",This);
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI CTypeInfo2Impl_fnGetImplTypeCustData(
|
||||
ITypeInfo2 * iface,UINT index,REFGUID guid,VARIANT* pVarVal)
|
||||
{
|
||||
ICOM_THIS(CTypeInfo2Impl,iface);
|
||||
|
||||
FIXME("(%p) stub!\n",This);
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI CTypeInfo2Impl_fnGetDocumentation2(
|
||||
ITypeInfo2* iface,MEMBERID memid,LCID lcid,
|
||||
BSTR* pbstrHelpString,DWORD* pdwHelpStringContext,BSTR* pbstrHelpStringDll)
|
||||
{
|
||||
ICOM_THIS(CTypeInfo2Impl,iface);
|
||||
|
||||
FIXME("(%p) stub!\n",This);
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI CTypeInfo2Impl_fnGetAllCustData(
|
||||
ITypeInfo2* iface,CUSTDATA* pCustData)
|
||||
{
|
||||
ICOM_THIS(CTypeInfo2Impl,iface);
|
||||
|
||||
FIXME("(%p) stub!\n",This);
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI CTypeInfo2Impl_fnGetAllFuncCustData(
|
||||
ITypeInfo2* iface,UINT index,CUSTDATA* pCustData)
|
||||
{
|
||||
ICOM_THIS(CTypeInfo2Impl,iface);
|
||||
|
||||
FIXME("(%p) stub!\n",This);
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI CTypeInfo2Impl_fnGetAllParamCustData(
|
||||
ITypeInfo2* iface,UINT indexFunc,UINT indexParam,CUSTDATA* pCustData)
|
||||
{
|
||||
ICOM_THIS(CTypeInfo2Impl,iface);
|
||||
|
||||
FIXME("(%p) stub!\n",This);
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI CTypeInfo2Impl_fnGetAllVarCustData(
|
||||
ITypeInfo2* iface,UINT index,CUSTDATA* pCustData)
|
||||
{
|
||||
ICOM_THIS(CTypeInfo2Impl,iface);
|
||||
|
||||
FIXME("(%p) stub!\n",This);
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI CTypeInfo2Impl_fnGetAllImplTypeCustData(
|
||||
ITypeInfo2* iface,UINT index,CUSTDATA* pCustData)
|
||||
{
|
||||
ICOM_THIS(CTypeInfo2Impl,iface);
|
||||
|
||||
FIXME("(%p) stub!\n",This);
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static ICOM_VTABLE(ITypeInfo2) itypeinfo2 =
|
||||
{
|
||||
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
|
||||
|
||||
/* IUnknown */
|
||||
CTypeInfo2Impl_fnQueryInterface,
|
||||
CTypeInfo2Impl_fnAddRef,
|
||||
CTypeInfo2Impl_fnRelease,
|
||||
/* ITypeInfo */
|
||||
CTypeInfo2Impl_fnGetTypeAttr,
|
||||
CTypeInfo2Impl_fnGetTypeComp,
|
||||
CTypeInfo2Impl_fnGetFuncDesc,
|
||||
CTypeInfo2Impl_fnGetVarDesc,
|
||||
CTypeInfo2Impl_fnGetNames,
|
||||
CTypeInfo2Impl_fnGetRefTypeOfImplType,
|
||||
CTypeInfo2Impl_fnGetImplTypeFlags,
|
||||
CTypeInfo2Impl_fnGetIDsOfNames,
|
||||
CTypeInfo2Impl_fnInvoke,
|
||||
CTypeInfo2Impl_fnGetDocumentation,
|
||||
CTypeInfo2Impl_fnGetDllEntry,
|
||||
CTypeInfo2Impl_fnGetRefTypeInfo,
|
||||
CTypeInfo2Impl_fnAddressOfMember,
|
||||
CTypeInfo2Impl_fnCreateInstance,
|
||||
CTypeInfo2Impl_fnGetMops,
|
||||
CTypeInfo2Impl_fnGetContainingTypeLib,
|
||||
CTypeInfo2Impl_fnReleaseTypeAttr,
|
||||
CTypeInfo2Impl_fnReleaseFuncDesc,
|
||||
CTypeInfo2Impl_fnReleaseVarDesc,
|
||||
/* ITypeInfo2 */
|
||||
CTypeInfo2Impl_fnGetTypeKind,
|
||||
CTypeInfo2Impl_fnGetTypeFlags,
|
||||
CTypeInfo2Impl_fnGetFuncIndexOfMemId,
|
||||
CTypeInfo2Impl_fnGetVarIndexOfMemId,
|
||||
CTypeInfo2Impl_fnGetCustData,
|
||||
CTypeInfo2Impl_fnGetFuncCustData,
|
||||
CTypeInfo2Impl_fnGetParamCustData,
|
||||
CTypeInfo2Impl_fnGetVarCustData,
|
||||
CTypeInfo2Impl_fnGetImplTypeCustData,
|
||||
CTypeInfo2Impl_fnGetDocumentation2,
|
||||
CTypeInfo2Impl_fnGetAllCustData,
|
||||
CTypeInfo2Impl_fnGetAllFuncCustData,
|
||||
CTypeInfo2Impl_fnGetAllParamCustData,
|
||||
CTypeInfo2Impl_fnGetAllVarCustData,
|
||||
CTypeInfo2Impl_fnGetAllImplTypeCustData,
|
||||
};
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
* CreateDispTypeInfo (OLEAUT32.31)
|
||||
*/
|
||||
HRESULT WINAPI CreateDispTypeInfo(
|
||||
INTERFACEDATA* pifd,
|
||||
LCID lcid,
|
||||
ITypeInfo** ppinfo )
|
||||
{
|
||||
HRESULT hr;
|
||||
CTypeInfo2Impl* This;
|
||||
|
||||
if ( ppinfo == NULL )
|
||||
return E_POINTER;
|
||||
|
||||
This = (CTypeInfo2Impl*)HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(CTypeInfo2Impl));
|
||||
if ( This == NULL ) return E_OUTOFMEMORY;
|
||||
ICOM_VTBL(This) = &itypeinfo2;
|
||||
This->ref = 1;
|
||||
|
||||
hr = CTypeInfo2Impl_Construct(This,pifd,lcid);
|
||||
if ( FAILED(hr) )
|
||||
{
|
||||
IUnknown_Release((IUnknown*)This);
|
||||
return hr;
|
||||
}
|
||||
*ppinfo = (ITypeInfo*)This;
|
||||
|
||||
return S_OK;
|
||||
}
|
|
@ -351,6 +351,18 @@ int WINAPI SysStringByteLen(BSTR str)
|
|||
return (int)(*bufferPointer);
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* CreateDispTypeInfo [OLEAUT32.31]
|
||||
*/
|
||||
HRESULT WINAPI CreateDispTypeInfo(
|
||||
INTERFACEDATA *pidata,
|
||||
LCID lcid,
|
||||
ITypeInfo **pptinfo)
|
||||
{
|
||||
FIXME("(%p,%ld,%p),stub\n",pidata,lcid,pptinfo);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* CreateDispTypeInfo [OLE2DISP.31]
|
||||
*/
|
||||
|
@ -371,6 +383,20 @@ HRESULT WINAPI CreateStdDispatch16(
|
|||
void* pvThis,
|
||||
ITypeInfo* ptinfo,
|
||||
IUnknown** ppunkStdDisp)
|
||||
{
|
||||
FIXME("(%p,%p,%p,%p),stub\n",punkOuter, pvThis, ptinfo,
|
||||
ppunkStdDisp);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* CreateStdDispatch [OLEAUT32.32]
|
||||
*/
|
||||
HRESULT WINAPI CreateStdDispatch(
|
||||
IUnknown* punkOuter,
|
||||
void* pvThis,
|
||||
ITypeInfo* ptinfo,
|
||||
IUnknown** ppunkStdDisp)
|
||||
{
|
||||
FIXME("(%p,%p,%p,%p),stub\n",punkOuter, pvThis, ptinfo,
|
||||
ppunkStdDisp);
|
||||
|
|
|
@ -1,593 +0,0 @@
|
|||
/*
|
||||
* Copyright 2001 TAKESHIMA Hidenori <hidenori@a2.ctktv.ne.jp>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
* FIXME - use PropertySheetW.
|
||||
* FIXME - not tested.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "wingdi.h"
|
||||
#include "winuser.h"
|
||||
#include "wine/debug.h"
|
||||
#include "ole2.h"
|
||||
#include "olectl.h"
|
||||
#include "oleauto.h"
|
||||
#include "commctrl.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(ole);
|
||||
|
||||
typedef struct CPropertyPageContainerImpl CPropertyPageContainerImpl;
|
||||
|
||||
static const struct
|
||||
{
|
||||
DLGTEMPLATE templ;
|
||||
WORD wMenuName;
|
||||
WORD wClassName;
|
||||
WCHAR wDummyCaption;
|
||||
BYTE padding[4];
|
||||
} propsite_dlg =
|
||||
{
|
||||
{
|
||||
WS_VISIBLE | WS_CHILD, /* style */
|
||||
0, /* dwExtendedStyle */
|
||||
0, /* cdit */
|
||||
0, /* x */
|
||||
0, /* y */
|
||||
0, /* cx */
|
||||
0, /* cy */
|
||||
},
|
||||
0, 0, 0,
|
||||
};
|
||||
|
||||
typedef struct CPropertyPageSiteImpl
|
||||
{
|
||||
ICOM_VFIELD(IPropertyPageSite);
|
||||
/* IUnknown fields */
|
||||
ULONG ref;
|
||||
|
||||
/* IPropertyPageSite fields */
|
||||
CPropertyPageContainerImpl* pContainer;
|
||||
IPropertyPage* pPage;
|
||||
HWND hwnd;
|
||||
BYTE templ[sizeof(propsite_dlg)];
|
||||
PROPPAGEINFO info;
|
||||
BOOL bActivate;
|
||||
} CPropertyPageSiteImpl;
|
||||
|
||||
struct CPropertyPageContainerImpl
|
||||
{
|
||||
ULONG ref; /* for IUnknown(not used now) */
|
||||
LCID lcid;
|
||||
DWORD m_cSites;
|
||||
CPropertyPageSiteImpl** m_ppSites;
|
||||
PROPSHEETPAGEA* m_pPsp;
|
||||
HRESULT m_hr;
|
||||
};
|
||||
|
||||
/* for future use. */
|
||||
#define CPropertyPageContainerImpl_AddRef(pContainer) (++((pContainer)->ref))
|
||||
#define CPropertyPageContainerImpl_Release(pContainer) (--((pContainer)->ref))
|
||||
|
||||
|
||||
/***************************************************************************/
|
||||
|
||||
#define PropSiteDlg_Return(a) do{SetWindowLongA(hwnd,DWL_MSGRESULT,(LONG)a);return TRUE;}while(1)
|
||||
static BOOL CALLBACK PropSiteDlgProc(
|
||||
HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam )
|
||||
{
|
||||
CPropertyPageSiteImpl* This = (CPropertyPageSiteImpl*)GetWindowLongA( hwnd, DWL_USER );
|
||||
HRESULT hr;
|
||||
RECT rc;
|
||||
NMHDR* pnmh;
|
||||
|
||||
switch ( msg )
|
||||
{
|
||||
case WM_INITDIALOG:
|
||||
This = (CPropertyPageSiteImpl*)(((PROPSHEETPAGEA*)lParam)->lParam);
|
||||
SetWindowLongA( hwnd, DWL_USER, (LONG)This );
|
||||
TRACE("WM_INITDIALOG (%p) hwnd = %08x\n", This, hwnd );
|
||||
|
||||
This->hwnd = hwnd;
|
||||
ZeroMemory( &rc, sizeof(rc) );
|
||||
GetClientRect( hwnd, &rc );
|
||||
hr = IPropertyPage_Activate(This->pPage,hwnd,&rc,TRUE);
|
||||
if ( SUCCEEDED(hr) )
|
||||
{
|
||||
This->bActivate = TRUE;
|
||||
hr = IPropertyPage_Show(This->pPage,SW_SHOW);
|
||||
}
|
||||
if ( FAILED(hr) )
|
||||
This->pContainer->m_hr = hr;
|
||||
break;
|
||||
case WM_DESTROY:
|
||||
TRACE("WM_DESTROY (%p)\n",This);
|
||||
if ( This != NULL )
|
||||
{
|
||||
if ( This->bActivate )
|
||||
{
|
||||
IPropertyPage_Show(This->pPage,SW_HIDE);
|
||||
IPropertyPage_Deactivate(This->pPage);
|
||||
This->bActivate = FALSE;
|
||||
}
|
||||
This->hwnd = (HWND)NULL;
|
||||
}
|
||||
SetWindowLongA( hwnd, DWL_USER, (LONG)0 );
|
||||
break;
|
||||
case WM_NOTIFY:
|
||||
pnmh = (NMHDR*)lParam;
|
||||
switch ( pnmh->code )
|
||||
{
|
||||
case PSN_APPLY:
|
||||
TRACE("PSN_APPLY (%p)\n",This);
|
||||
hr = IPropertyPage_Apply(This->pPage);
|
||||
if ( FAILED(hr) )
|
||||
PropSiteDlg_Return(PSNRET_INVALID_NOCHANGEPAGE);
|
||||
PropSiteDlg_Return(PSNRET_NOERROR);
|
||||
case PSN_QUERYCANCEL:
|
||||
FIXME("PSN_QUERYCANCEL (%p)\n",This);
|
||||
PropSiteDlg_Return(FALSE);
|
||||
case PSN_RESET:
|
||||
FIXME("PSN_RESET (%p)\n",This);
|
||||
PropSiteDlg_Return(0);
|
||||
case PSN_SETACTIVE:
|
||||
TRACE("PSN_SETACTIVE (%p)\n",This);
|
||||
PropSiteDlg_Return(0);
|
||||
case PSN_KILLACTIVE:
|
||||
TRACE("PSN_KILLACTIVE (%p)\n",This);
|
||||
PropSiteDlg_Return(FALSE);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/***************************************************************************/
|
||||
|
||||
static HRESULT WINAPI
|
||||
CPropertyPageSiteImpl_fnQueryInterface(IPropertyPageSite* iface,REFIID riid,LPVOID *ppobj)
|
||||
{
|
||||
ICOM_THIS(CPropertyPageSiteImpl,iface);
|
||||
|
||||
TRACE("(%p)->(%s,%p)\n",This,debugstr_guid(riid),ppobj);
|
||||
|
||||
if ( ppobj == NULL )
|
||||
return E_POINTER;
|
||||
*ppobj = NULL;
|
||||
|
||||
if ( IsEqualGUID(riid,&IID_IUnknown) ||
|
||||
IsEqualGUID(riid,&IID_IPropertyPageSite) )
|
||||
{
|
||||
*ppobj = (LPVOID)This;
|
||||
IUnknown_AddRef((IUnknown*)(*ppobj));
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
return E_NOINTERFACE;
|
||||
}
|
||||
|
||||
static ULONG WINAPI
|
||||
CPropertyPageSiteImpl_fnAddRef(IPropertyPageSite* iface)
|
||||
{
|
||||
ICOM_THIS(CPropertyPageSiteImpl,iface);
|
||||
|
||||
TRACE("(%p)->()\n",This);
|
||||
|
||||
return InterlockedExchangeAdd(&(This->ref),1) + 1;
|
||||
}
|
||||
|
||||
static ULONG WINAPI
|
||||
CPropertyPageSiteImpl_fnRelease(IPropertyPageSite* iface)
|
||||
{
|
||||
ICOM_THIS(CPropertyPageSiteImpl,iface);
|
||||
LONG ref;
|
||||
|
||||
TRACE("(%p)->()\n",This);
|
||||
ref = InterlockedExchangeAdd(&(This->ref),-1) - 1;
|
||||
if ( ref > 0 )
|
||||
return (ULONG)ref;
|
||||
|
||||
if ( This->pContainer != NULL )
|
||||
CPropertyPageContainerImpl_Release(This->pContainer);
|
||||
if ( This->pPage != NULL )
|
||||
IPropertyPage_Release(This->pPage);
|
||||
if ( This->info.pszTitle != NULL )
|
||||
CoTaskMemFree( This->info.pszTitle );
|
||||
if ( This->info.pszDocString != NULL )
|
||||
CoTaskMemFree( This->info.pszDocString );
|
||||
if ( This->info.pszHelpFile != NULL )
|
||||
CoTaskMemFree( This->info.pszHelpFile );
|
||||
|
||||
HeapFree(GetProcessHeap(),0,This);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI
|
||||
CPropertyPageSiteImpl_fnOnStatusChange(IPropertyPageSite* iface,DWORD dwFlags)
|
||||
{
|
||||
ICOM_THIS(CPropertyPageSiteImpl,iface);
|
||||
|
||||
TRACE("(%p,%08lx)\n",This,dwFlags);
|
||||
|
||||
if ( This->hwnd == (HWND)NULL )
|
||||
return E_UNEXPECTED;
|
||||
|
||||
switch ( dwFlags )
|
||||
{
|
||||
case PROPPAGESTATUS_DIRTY:
|
||||
/* dirty */
|
||||
SendMessageA(GetParent(This->hwnd),PSM_CHANGED,(WPARAM)(This->hwnd),0);
|
||||
break;
|
||||
case PROPPAGESTATUS_VALIDATE:
|
||||
/* validate */
|
||||
SendMessageA(GetParent(This->hwnd),PSM_UNCHANGED,(WPARAM)(This->hwnd),0);
|
||||
break;
|
||||
default:
|
||||
FIXME("(%p,%08lx) unknown flags\n",This,dwFlags);
|
||||
return E_INVALIDARG;
|
||||
}
|
||||
|
||||
return NOERROR;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI
|
||||
CPropertyPageSiteImpl_fnGetLocaleID(IPropertyPageSite* iface,LCID* pLocaleID)
|
||||
{
|
||||
ICOM_THIS(CPropertyPageSiteImpl,iface);
|
||||
|
||||
TRACE("(%p,%p)\n",This,pLocaleID);
|
||||
|
||||
if ( pLocaleID == NULL )
|
||||
return E_POINTER;
|
||||
|
||||
*pLocaleID = This->pContainer->lcid;
|
||||
|
||||
return NOERROR;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI
|
||||
CPropertyPageSiteImpl_fnGetPageContainer(IPropertyPageSite* iface,IUnknown** ppUnk)
|
||||
{
|
||||
ICOM_THIS(CPropertyPageSiteImpl,iface);
|
||||
|
||||
FIXME("(%p,%p) - Win95 returns E_NOTIMPL\n",This,ppUnk);
|
||||
|
||||
if ( ppUnk == NULL )
|
||||
return E_POINTER;
|
||||
|
||||
*ppUnk = NULL;
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI
|
||||
CPropertyPageSiteImpl_fnTranslateAccelerator(IPropertyPageSite* iface,MSG* pMsg)
|
||||
{
|
||||
ICOM_THIS(CPropertyPageSiteImpl,iface);
|
||||
|
||||
FIXME("(%p,%p) - Win95 returns E_NOTIMPL\n",This,pMsg);
|
||||
|
||||
if ( pMsg == NULL )
|
||||
return E_POINTER;
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static ICOM_VTABLE(IPropertyPageSite) iproppagesite =
|
||||
{
|
||||
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
|
||||
/* IUnknown fields */
|
||||
CPropertyPageSiteImpl_fnQueryInterface,
|
||||
CPropertyPageSiteImpl_fnAddRef,
|
||||
CPropertyPageSiteImpl_fnRelease,
|
||||
/* IPropertyPageSite fields */
|
||||
CPropertyPageSiteImpl_fnOnStatusChange,
|
||||
CPropertyPageSiteImpl_fnGetLocaleID,
|
||||
CPropertyPageSiteImpl_fnGetPageContainer,
|
||||
CPropertyPageSiteImpl_fnTranslateAccelerator,
|
||||
};
|
||||
|
||||
/***************************************************************************/
|
||||
|
||||
static
|
||||
HRESULT OLEPRO32_CreatePropertyPageSite(
|
||||
CPropertyPageContainerImpl* pContainer,
|
||||
IPropertyPage* pPage,
|
||||
CPropertyPageSiteImpl** ppSite,
|
||||
PROPSHEETPAGEA* pPspReturned )
|
||||
{
|
||||
CPropertyPageSiteImpl* This = NULL;
|
||||
HRESULT hr;
|
||||
DLGTEMPLATE* ptempl;
|
||||
|
||||
*ppSite = NULL;
|
||||
ZeroMemory( pPspReturned, sizeof(PROPSHEETPAGEA) );
|
||||
|
||||
This = (CPropertyPageSiteImpl*)HeapAlloc( GetProcessHeap(), 0,
|
||||
sizeof(CPropertyPageSiteImpl) );
|
||||
if ( This == NULL )
|
||||
return E_OUTOFMEMORY;
|
||||
ZeroMemory( This, sizeof(CPropertyPageSiteImpl) );
|
||||
|
||||
ICOM_VTBL(This) = &iproppagesite;
|
||||
This->ref = 1;
|
||||
This->pContainer = pContainer; CPropertyPageContainerImpl_AddRef(pContainer);
|
||||
This->pPage = pPage; IPropertyPage_AddRef(pPage);
|
||||
This->hwnd = (HWND)NULL;
|
||||
memcpy( &This->templ, &propsite_dlg, sizeof(propsite_dlg) );
|
||||
This->info.cb = sizeof(PROPPAGEINFO);
|
||||
This->bActivate = FALSE;
|
||||
ptempl = (DLGTEMPLATE*)&This->templ;
|
||||
|
||||
/* construct */
|
||||
hr = IPropertyPage_SetPageSite(pPage,(IPropertyPageSite*)This);
|
||||
if ( FAILED(hr) )
|
||||
goto end;
|
||||
|
||||
hr = IPropertyPage_GetPageInfo(pPage,&This->info);
|
||||
if ( FAILED(hr) )
|
||||
goto end;
|
||||
|
||||
ptempl->cx = This->info.size.cx;
|
||||
ptempl->cy = This->info.size.cy;
|
||||
|
||||
pPspReturned->dwSize = sizeof(PROPSHEETPAGEA);
|
||||
pPspReturned->dwFlags = PSP_DLGINDIRECT;
|
||||
pPspReturned->u.pResource = ptempl;
|
||||
if ( This->info.pszTitle != NULL );
|
||||
{
|
||||
pPspReturned->dwFlags |= PSP_USETITLE;
|
||||
pPspReturned->pszTitle = "Title";/*FIXME - This->info.pszTitle;*/
|
||||
}
|
||||
pPspReturned->pfnDlgProc = PropSiteDlgProc;
|
||||
pPspReturned->lParam = (LONG)This;
|
||||
|
||||
end:
|
||||
if ( FAILED(hr) )
|
||||
{
|
||||
IUnknown_Release((IUnknown*)This);
|
||||
return hr;
|
||||
}
|
||||
|
||||
*ppSite = This;
|
||||
return NOERROR;
|
||||
}
|
||||
|
||||
/***************************************************************************/
|
||||
|
||||
static
|
||||
void OLEPRO32_DestroyPropertyPageContainer(
|
||||
CPropertyPageContainerImpl* This )
|
||||
{
|
||||
DWORD nIndex;
|
||||
|
||||
if ( This->m_ppSites != NULL )
|
||||
{
|
||||
for ( nIndex = 0; nIndex < This->m_cSites; nIndex++ )
|
||||
{
|
||||
if ( This->m_ppSites[nIndex] != NULL )
|
||||
{
|
||||
IPropertyPage_SetPageSite(This->m_ppSites[nIndex]->pPage,NULL);
|
||||
IUnknown_Release((IUnknown*)This->m_ppSites[nIndex]);
|
||||
}
|
||||
}
|
||||
HeapFree( GetProcessHeap(), 0, This->m_ppSites );
|
||||
This->m_ppSites = NULL;
|
||||
}
|
||||
if ( This->m_pPsp != NULL )
|
||||
{
|
||||
HeapFree( GetProcessHeap(), 0, This->m_pPsp );
|
||||
This->m_pPsp = NULL;
|
||||
}
|
||||
HeapFree( GetProcessHeap(), 0, This );
|
||||
}
|
||||
|
||||
static
|
||||
HRESULT OLEPRO32_CreatePropertyPageContainer(
|
||||
CPropertyPageContainerImpl** ppContainer,
|
||||
ULONG cPages, const CLSID* pclsidPages,
|
||||
LCID lcid )
|
||||
{
|
||||
CPropertyPageContainerImpl* This = NULL;
|
||||
DWORD nIndex;
|
||||
IPropertyPage* pPage;
|
||||
HRESULT hr;
|
||||
|
||||
This = (CPropertyPageContainerImpl*)HeapAlloc( GetProcessHeap(), 0,
|
||||
sizeof(CPropertyPageContainerImpl) );
|
||||
if ( This == NULL )
|
||||
return E_OUTOFMEMORY;
|
||||
ZeroMemory( This, sizeof(CPropertyPageContainerImpl) );
|
||||
This->ref = 1;
|
||||
This->lcid = lcid;
|
||||
This->m_cSites = cPages;
|
||||
This->m_ppSites = NULL;
|
||||
This->m_pPsp = NULL;
|
||||
This->m_hr = S_OK;
|
||||
|
||||
This->m_ppSites = (CPropertyPageSiteImpl**)HeapAlloc( GetProcessHeap(), 0, sizeof(CPropertyPageSiteImpl*) * cPages );
|
||||
if ( This->m_ppSites == NULL )
|
||||
{
|
||||
hr = E_OUTOFMEMORY;
|
||||
goto end;
|
||||
}
|
||||
ZeroMemory( This->m_ppSites, sizeof(CPropertyPageSiteImpl*) * cPages );
|
||||
|
||||
This->m_pPsp = (PROPSHEETPAGEA*)HeapAlloc( GetProcessHeap(), 0, sizeof(PROPSHEETPAGEA) * cPages );
|
||||
if ( This->m_pPsp == NULL )
|
||||
{
|
||||
hr = E_OUTOFMEMORY;
|
||||
goto end;
|
||||
}
|
||||
ZeroMemory( This->m_pPsp, sizeof(PROPSHEETPAGEA) * cPages );
|
||||
|
||||
for ( nIndex = 0; nIndex < cPages; nIndex ++ )
|
||||
{
|
||||
hr = CoCreateInstance(
|
||||
&pclsidPages[nIndex], NULL, CLSCTX_SERVER,
|
||||
&IID_IPropertyPage, (void**)&pPage );
|
||||
if ( FAILED(hr) )
|
||||
goto end;
|
||||
hr = OLEPRO32_CreatePropertyPageSite(
|
||||
This, pPage, &This->m_ppSites[nIndex], &This->m_pPsp[nIndex] );
|
||||
IPropertyPage_Release(pPage);
|
||||
if ( FAILED(hr) )
|
||||
goto end;
|
||||
}
|
||||
|
||||
hr = NOERROR;
|
||||
end:
|
||||
if ( FAILED(hr) )
|
||||
{
|
||||
OLEPRO32_DestroyPropertyPageContainer( This );
|
||||
return hr;
|
||||
}
|
||||
|
||||
*ppContainer = This;
|
||||
return NOERROR;
|
||||
}
|
||||
|
||||
static
|
||||
HRESULT OLEPRO32_SetObjectsToPropertyPages(
|
||||
CPropertyPageContainerImpl* This,
|
||||
ULONG cObjects, IUnknown** ppunk )
|
||||
{
|
||||
DWORD nIndex;
|
||||
HRESULT hr;
|
||||
|
||||
for ( nIndex = 0; nIndex < This->m_cSites; nIndex ++ )
|
||||
{
|
||||
if ( This->m_ppSites[nIndex] == NULL )
|
||||
return E_UNEXPECTED;
|
||||
hr = IPropertyPage_SetObjects(This->m_ppSites[nIndex]->pPage,cObjects,ppunk);
|
||||
if ( FAILED(hr) )
|
||||
return hr;
|
||||
}
|
||||
|
||||
return NOERROR;
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* OleCreatePropertyFrameIndirect (OLEAUT32.416)(OLEPRO32.249)
|
||||
*
|
||||
*/
|
||||
|
||||
HRESULT WINAPI OleCreatePropertyFrameIndirect( LPOCPFIPARAMS lpParams )
|
||||
{
|
||||
CPropertyPageContainerImpl* pContainer = NULL;
|
||||
HRESULT hr;
|
||||
PROPSHEETHEADERA psh;
|
||||
int ret;
|
||||
|
||||
TRACE("(%p)\n",lpParams);
|
||||
|
||||
if ( lpParams == NULL )
|
||||
return E_POINTER;
|
||||
if ( lpParams->cbStructSize != sizeof(OCPFIPARAMS) )
|
||||
{
|
||||
FIXME("lpParams->cbStructSize(%lu) != sizeof(OCPFIPARAMS)(%lu)\n",lpParams->cbStructSize,(unsigned long)sizeof(OCPFIPARAMS));
|
||||
return E_INVALIDARG;
|
||||
}
|
||||
|
||||
hr = OLEPRO32_CreatePropertyPageContainer(
|
||||
&pContainer,
|
||||
lpParams->cPages, lpParams->lpPages,
|
||||
lpParams->lcid );
|
||||
if ( FAILED(hr) )
|
||||
{
|
||||
TRACE( "OLEPRO32_CreatePropertyPageContainer returns %08lx\n",hr);
|
||||
return hr;
|
||||
}
|
||||
|
||||
hr = OLEPRO32_SetObjectsToPropertyPages(
|
||||
pContainer,
|
||||
lpParams->cObjects, lpParams->lplpUnk );
|
||||
if ( FAILED(hr) )
|
||||
{
|
||||
TRACE("OLEPRO32_SetObjectsToPropertyPages returns %08lx\n",hr);
|
||||
OLEPRO32_DestroyPropertyPageContainer(pContainer);
|
||||
return hr;
|
||||
}
|
||||
|
||||
/* FIXME - use lpParams.x / lpParams.y */
|
||||
|
||||
ZeroMemory( &psh, sizeof(psh) );
|
||||
psh.dwSize = sizeof(PROPSHEETHEADERA);
|
||||
psh.dwFlags = PSH_PROPSHEETPAGE;
|
||||
psh.hwndParent = lpParams->hWndOwner;
|
||||
psh.pszCaption = "Caption"; /* FIXME - lpParams->lpszCaption; */
|
||||
psh.nPages = pContainer->m_cSites;
|
||||
psh.u2.nStartPage = lpParams->dispidInitialProperty;
|
||||
psh.u3.ppsp = pContainer->m_pPsp;
|
||||
|
||||
ret = PropertySheetA( &psh );
|
||||
OLEPRO32_DestroyPropertyPageContainer(pContainer);
|
||||
|
||||
if ( ret == -1 )
|
||||
return E_FAIL;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* OleCreatePropertyFrame (OLEAUT32.417)(OLEPRO32.250)
|
||||
*
|
||||
*/
|
||||
|
||||
HRESULT WINAPI OleCreatePropertyFrame(
|
||||
HWND hwndOwner, UINT x, UINT y, LPCOLESTR lpszCaption,ULONG cObjects,
|
||||
LPUNKNOWN* lplpUnk, ULONG cPages, LPCLSID pPageClsID, LCID lcid,
|
||||
DWORD dwReserved, LPVOID pvReserved )
|
||||
{
|
||||
OCPFIPARAMS params;
|
||||
|
||||
TRACE("(%x,%d,%d,%s,%ld,%p,%ld,%p,%x,%ld,%p)\n",
|
||||
hwndOwner,x,y,debugstr_w(lpszCaption),cObjects,lplpUnk,cPages,
|
||||
pPageClsID, (int)lcid,dwReserved,pvReserved);
|
||||
|
||||
if ( dwReserved != 0 || pvReserved != NULL )
|
||||
{
|
||||
FIXME("(%x,%d,%d,%s,%ld,%p,%ld,%p,%x,%ld,%p) - E_INVALIDARG\n",
|
||||
hwndOwner,x,y,debugstr_w(lpszCaption),cObjects,lplpUnk,cPages,
|
||||
pPageClsID, (int)lcid,dwReserved,pvReserved);
|
||||
return E_INVALIDARG;
|
||||
}
|
||||
|
||||
ZeroMemory( ¶ms, sizeof(params) );
|
||||
params.cbStructSize = sizeof(OCPFIPARAMS);
|
||||
params.hWndOwner = hwndOwner;
|
||||
params.x = x;
|
||||
params.y = y;
|
||||
params.lpszCaption = lpszCaption;
|
||||
params.cObjects = cObjects;
|
||||
params.lplpUnk = lplpUnk;
|
||||
params.cPages = cPages;
|
||||
params.lpPages = pPageClsID;
|
||||
params.lcid = lcid;
|
||||
params.dispidInitialProperty = 0;
|
||||
|
||||
return OleCreatePropertyFrameIndirect( ¶ms );
|
||||
}
|
||||
|
|
@ -35,17 +35,30 @@ WINE_DEFAULT_DEBUG_CHANNEL(ole);
|
|||
*/
|
||||
HCURSOR WINAPI OleIconToCursor( HINSTANCE hinstExe, HICON hicon)
|
||||
{
|
||||
ICONINFO ii;
|
||||
|
||||
TRACE("(%x,%x)\n",hinstExe,hicon);
|
||||
|
||||
ZeroMemory( &ii, sizeof(ii) );
|
||||
|
||||
if ( !GetIconInfo( hicon, &ii ) )
|
||||
return (HCURSOR)NULL;
|
||||
|
||||
ii.fIcon = FALSE;
|
||||
return CreateIconIndirect( &ii );
|
||||
FIXME("(%x,%x), not implemented (olepro32.dll)\n",hinstExe,hicon);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* OleCreatePropertyFrameIndirect (OLEAUT32.416)
|
||||
*/
|
||||
HRESULT WINAPI OleCreatePropertyFrameIndirect( LPOCPFIPARAMS lpParams)
|
||||
{
|
||||
FIXME("(%p), not implemented (olepro32.dll)\n",lpParams);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* OleCreatePropertyFrame (OLEAUT32.417)
|
||||
*/
|
||||
HRESULT WINAPI OleCreatePropertyFrame(
|
||||
HWND hwndOwner, UINT x, UINT y, LPCOLESTR lpszCaption,ULONG cObjects,
|
||||
LPUNKNOWN* ppUnk, ULONG cPages, LPCLSID pPageClsID, LCID lcid,
|
||||
DWORD dwReserved, LPVOID pvReserved )
|
||||
{
|
||||
FIXME("(%x,%d,%d,%s,%ld,%p,%ld,%p,%x,%ld,%p), not implemented (olepro32.dll)\n",
|
||||
hwndOwner,x,y,debugstr_w(lpszCaption),cObjects,ppUnk,cPages,
|
||||
pPageClsID, (int)lcid,dwReserved,pvReserved);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
|
|
@ -4,17 +4,19 @@ TOPOBJDIR = ../..
|
|||
SRCDIR = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
MODULE = shdocvw.dll
|
||||
EXTRALIBS = $(LIBUUID)
|
||||
|
||||
LDDLLFLAGS = @LDDLLFLAGS@
|
||||
SYMBOLFILE = $(MODULE).tmp.o
|
||||
|
||||
C_SRCS = \
|
||||
api.c \
|
||||
browser.c \
|
||||
comimpl.c \
|
||||
connect.c \
|
||||
shdocvw.c
|
||||
classinfo.c \
|
||||
events.c \
|
||||
factory.c \
|
||||
misc.c \
|
||||
oleobject.c \
|
||||
persist.c \
|
||||
shdocvw_main.c \
|
||||
webbrowser.c
|
||||
|
||||
@MAKE_DLL_RULES@
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,168 @@
|
|||
/*
|
||||
* Implementation of IProvideClassInfo interfaces for IE Web Browser control
|
||||
*
|
||||
* Copyright 2001 John R. Sheets (for CodeWeavers)
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include <string.h>
|
||||
#include "wine/debug.h"
|
||||
#include "shdocvw.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(shdocvw);
|
||||
|
||||
/**********************************************************************
|
||||
* Implement the IProvideClassInfo interface
|
||||
*
|
||||
* FIXME: Should we just pass in the IProvideClassInfo2 methods rather
|
||||
* reimplementing them here?
|
||||
*/
|
||||
|
||||
static HRESULT WINAPI WBPCI_QueryInterface(LPPROVIDECLASSINFO iface,
|
||||
REFIID riid, LPVOID *ppobj)
|
||||
{
|
||||
ICOM_THIS(IProvideClassInfoImpl, iface);
|
||||
|
||||
FIXME("(%p)->(%s,%p),stub!\n", This, debugstr_guid(riid), ppobj);
|
||||
return E_NOINTERFACE;
|
||||
}
|
||||
|
||||
static ULONG WINAPI WBPCI_AddRef(LPPROVIDECLASSINFO iface)
|
||||
{
|
||||
ICOM_THIS(IProvideClassInfoImpl, iface);
|
||||
|
||||
TRACE("\n");
|
||||
return ++(This->ref);
|
||||
}
|
||||
|
||||
static ULONG WINAPI WBPCI_Release(LPPROVIDECLASSINFO iface)
|
||||
{
|
||||
ICOM_THIS(IProvideClassInfoImpl, iface);
|
||||
|
||||
/* static class, won't be freed */
|
||||
TRACE("\n");
|
||||
return --(This->ref);
|
||||
}
|
||||
|
||||
/* Return an ITypeInfo interface to retrieve type library info about
|
||||
* this control.
|
||||
*/
|
||||
static HRESULT WINAPI WBPCI_GetClassInfo(LPPROVIDECLASSINFO iface, LPTYPEINFO *ppTI)
|
||||
{
|
||||
FIXME("stub: LPTYPEINFO = %p\n", *ppTI);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
/**********************************************************************
|
||||
* IProvideClassInfo virtual function table for IE Web Browser component
|
||||
*/
|
||||
|
||||
static ICOM_VTABLE(IProvideClassInfo) WBPCI_Vtbl =
|
||||
{
|
||||
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
|
||||
WBPCI_QueryInterface,
|
||||
WBPCI_AddRef,
|
||||
WBPCI_Release,
|
||||
WBPCI_GetClassInfo
|
||||
};
|
||||
|
||||
IProvideClassInfoImpl SHDOCVW_ProvideClassInfo = { &WBPCI_Vtbl, 1 };
|
||||
|
||||
|
||||
/**********************************************************************
|
||||
* Implement the IProvideClassInfo2 interface (inherits from
|
||||
* IProvideClassInfo).
|
||||
*/
|
||||
|
||||
static HRESULT WINAPI WBPCI2_QueryInterface(LPPROVIDECLASSINFO2 iface,
|
||||
REFIID riid, LPVOID *ppobj)
|
||||
{
|
||||
ICOM_THIS(IProvideClassInfo2Impl, iface);
|
||||
|
||||
FIXME("(%p)->(%s,%p),stub!\n", This, debugstr_guid(riid), ppobj);
|
||||
return E_NOINTERFACE;
|
||||
}
|
||||
|
||||
static ULONG WINAPI WBPCI2_AddRef(LPPROVIDECLASSINFO2 iface)
|
||||
{
|
||||
ICOM_THIS(IProvideClassInfo2Impl, iface);
|
||||
|
||||
TRACE("\n");
|
||||
return ++(This->ref);
|
||||
}
|
||||
|
||||
static ULONG WINAPI WBPCI2_Release(LPPROVIDECLASSINFO2 iface)
|
||||
{
|
||||
ICOM_THIS(IProvideClassInfo2Impl, iface);
|
||||
|
||||
/* static class, won't be freed */
|
||||
TRACE("\n");
|
||||
return --(This->ref);
|
||||
}
|
||||
|
||||
/* Return an ITypeInfo interface to retrieve type library info about
|
||||
* this control.
|
||||
*/
|
||||
static HRESULT WINAPI WBPCI2_GetClassInfo(LPPROVIDECLASSINFO2 iface, LPTYPEINFO *ppTI)
|
||||
{
|
||||
FIXME("stub: LPTYPEINFO = %p\n", *ppTI);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
/* Get the IID for generic default event callbacks. This IID will
|
||||
* in theory be used to later query for an IConnectionPoint to connect
|
||||
* an event sink (callback implmentation in the OLE control site)
|
||||
* to this control.
|
||||
*/
|
||||
static HRESULT WINAPI WBPCI2_GetGUID(LPPROVIDECLASSINFO2 iface,
|
||||
DWORD dwGuidKind, GUID *pGUID)
|
||||
{
|
||||
FIXME("stub: dwGuidKind = %ld, pGUID = %s\n", dwGuidKind, debugstr_guid(pGUID));
|
||||
|
||||
if (dwGuidKind != GUIDKIND_DEFAULT_SOURCE_DISP_IID)
|
||||
{
|
||||
FIXME ("Requested unsupported GUID type: %ld\n", dwGuidKind);
|
||||
return E_FAIL; /* Is there a better return type here? */
|
||||
}
|
||||
|
||||
/* FIXME: Returning IPropertyNotifySink interface, but should really
|
||||
* return a more generic event set (???) dispinterface.
|
||||
* However, this hack, allows a control site to return with success
|
||||
* (MFC's COleControlSite falls back to older IProvideClassInfo interface
|
||||
* if GetGUID() fails to return a non-NULL GUID).
|
||||
*/
|
||||
memcpy(pGUID, &IID_IPropertyNotifySink, sizeof(GUID));
|
||||
FIXME("Wrongly returning IPropertyNotifySink interface %s\n",
|
||||
debugstr_guid(pGUID));
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
/**********************************************************************
|
||||
* IProvideClassInfo virtual function table for IE Web Browser component
|
||||
*/
|
||||
|
||||
static ICOM_VTABLE(IProvideClassInfo2) WBPCI2_Vtbl =
|
||||
{
|
||||
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
|
||||
WBPCI2_QueryInterface,
|
||||
WBPCI2_AddRef,
|
||||
WBPCI2_Release,
|
||||
WBPCI2_GetClassInfo,
|
||||
WBPCI2_GetGUID
|
||||
};
|
||||
|
||||
IProvideClassInfo2Impl SHDOCVW_ProvideClassInfo2 = { &WBPCI2_Vtbl, 1 };
|
|
@ -1,445 +0,0 @@
|
|||
/*
|
||||
* A basic implementation for COM DLL implementor.
|
||||
*
|
||||
* Copyright (C) Hidenori TAKESHIMA <hidenori@a2.ctktv.ne.jp>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "wine/port.h"
|
||||
|
||||
#include "windef.h"
|
||||
#include "winerror.h"
|
||||
#include "winbase.h"
|
||||
#include "wingdi.h"
|
||||
#include "winuser.h"
|
||||
#include "winnls.h"
|
||||
#include "ole2.h"
|
||||
|
||||
#include "wine/debug.h"
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(comimpl);
|
||||
|
||||
#include "comimpl.h"
|
||||
|
||||
/*
|
||||
- All threading model including Apartment and Both are supported.
|
||||
- Aggregation is supported.
|
||||
- CoFreeUnusedLibraries() is supported.
|
||||
- DisableThreadLibraryCalls() is supported.
|
||||
*/
|
||||
|
||||
static CRITICAL_SECTION csComImpl;
|
||||
static DWORD dwComImplRef;
|
||||
|
||||
|
||||
static HRESULT WINAPI
|
||||
IUnknown_fnQueryInterface(IUnknown* iface,REFIID riid,LPVOID *ppobj)
|
||||
{
|
||||
ICOM_THIS(COMIMPL_IUnkImpl,iface);
|
||||
size_t ofs;
|
||||
DWORD dwIndex;
|
||||
COMIMPL_IFDelegation* pDelegation;
|
||||
HRESULT hr;
|
||||
|
||||
TRACE("(%p)->(%s,%p)\n",This,debugstr_guid(riid),ppobj);
|
||||
|
||||
if ( ppobj == NULL )
|
||||
return E_POINTER;
|
||||
*ppobj = NULL;
|
||||
|
||||
ofs = 0;
|
||||
|
||||
if ( IsEqualGUID( &IID_IUnknown, riid ) )
|
||||
{
|
||||
TRACE("IID_IUnknown - returns inner object.\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
for ( dwIndex = 0; dwIndex < This->dwEntries; dwIndex++ )
|
||||
{
|
||||
if ( IsEqualGUID( This->pEntries[dwIndex].piid, riid ) )
|
||||
{
|
||||
ofs = This->pEntries[dwIndex].ofsVTPtr;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if ( dwIndex == This->dwEntries )
|
||||
{
|
||||
hr = E_NOINTERFACE;
|
||||
|
||||
/* delegation */
|
||||
pDelegation = This->pDelegationFirst;
|
||||
while ( pDelegation != NULL )
|
||||
{
|
||||
hr = (*pDelegation->pOnQueryInterface)( iface, riid, ppobj );
|
||||
if ( hr != E_NOINTERFACE )
|
||||
break;
|
||||
pDelegation = pDelegation->pNext;
|
||||
}
|
||||
|
||||
if ( hr == E_NOINTERFACE )
|
||||
{
|
||||
FIXME("(%p) unknown interface: %s\n",This,debugstr_guid(riid));
|
||||
}
|
||||
|
||||
return hr;
|
||||
}
|
||||
}
|
||||
|
||||
*ppobj = (LPVOID)(((char*)This) + ofs);
|
||||
IUnknown_AddRef((IUnknown*)(*ppobj));
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static ULONG WINAPI
|
||||
IUnknown_fnAddRef(IUnknown* iface)
|
||||
{
|
||||
ICOM_THIS(COMIMPL_IUnkImpl,iface);
|
||||
|
||||
TRACE("(%p)->()\n",This);
|
||||
|
||||
return InterlockedExchangeAdd(&(This->ref),1) + 1;
|
||||
}
|
||||
|
||||
static ULONG WINAPI
|
||||
IUnknown_fnRelease(IUnknown* iface)
|
||||
{
|
||||
ICOM_THIS(COMIMPL_IUnkImpl,iface);
|
||||
LONG ref;
|
||||
|
||||
TRACE("(%p)->()\n",This);
|
||||
ref = InterlockedExchangeAdd(&(This->ref),-1) - 1;
|
||||
if ( ref > 0 )
|
||||
return (ULONG)ref;
|
||||
|
||||
This->ref ++;
|
||||
if ( This->pOnFinalRelease != NULL )
|
||||
(*(This->pOnFinalRelease))(iface);
|
||||
This->ref --;
|
||||
|
||||
COMIMPL_FreeObj(This);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static ICOM_VTABLE(IUnknown) iunknown =
|
||||
{
|
||||
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
|
||||
/* IUnknown fields */
|
||||
IUnknown_fnQueryInterface,
|
||||
IUnknown_fnAddRef,
|
||||
IUnknown_fnRelease,
|
||||
};
|
||||
|
||||
|
||||
void COMIMPL_IUnkInit( COMIMPL_IUnkImpl* pImpl, IUnknown* punkOuter )
|
||||
{
|
||||
TRACE("(%p)\n",pImpl);
|
||||
|
||||
ICOM_VTBL(pImpl) = &iunknown;
|
||||
pImpl->pEntries = NULL;
|
||||
pImpl->dwEntries = 0;
|
||||
pImpl->pDelegationFirst = NULL;
|
||||
pImpl->pOnFinalRelease = NULL;
|
||||
pImpl->ref = 1;
|
||||
pImpl->punkControl = (IUnknown*)pImpl;
|
||||
|
||||
/* for implementing aggregation. */
|
||||
if ( punkOuter != NULL )
|
||||
pImpl->punkControl = punkOuter;
|
||||
}
|
||||
|
||||
void COMIMPL_IUnkAddDelegationHandler(
|
||||
COMIMPL_IUnkImpl* pImpl, COMIMPL_IFDelegation* pDelegation )
|
||||
{
|
||||
pDelegation->pNext = pImpl->pDelegationFirst;
|
||||
pImpl->pDelegationFirst = pDelegation;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
|
||||
|
||||
static HRESULT WINAPI
|
||||
IClassFactory_fnQueryInterface(LPCLASSFACTORY iface,REFIID riid,LPVOID *ppobj);
|
||||
static ULONG WINAPI IClassFactory_fnAddRef(LPCLASSFACTORY iface);
|
||||
static ULONG WINAPI IClassFactory_fnRelease(LPCLASSFACTORY iface);
|
||||
static HRESULT WINAPI IClassFactory_fnCreateInstance(LPCLASSFACTORY iface,LPUNKNOWN pOuter,REFIID riid,LPVOID *ppobj);
|
||||
static HRESULT WINAPI IClassFactory_fnLockServer(LPCLASSFACTORY iface,BOOL dolock);
|
||||
|
||||
static ICOM_VTABLE(IClassFactory) iclassfact =
|
||||
{
|
||||
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
|
||||
IClassFactory_fnQueryInterface,
|
||||
IClassFactory_fnAddRef,
|
||||
IClassFactory_fnRelease,
|
||||
IClassFactory_fnCreateInstance,
|
||||
IClassFactory_fnLockServer
|
||||
};
|
||||
|
||||
typedef struct
|
||||
{
|
||||
/* IUnknown fields */
|
||||
ICOM_VFIELD(IClassFactory);
|
||||
LONG ref;
|
||||
/* IClassFactory fields */
|
||||
const COMIMPL_CLASSENTRY* pEntry;
|
||||
} IClassFactoryImpl;
|
||||
|
||||
|
||||
static HRESULT WINAPI
|
||||
IClassFactory_fnQueryInterface(LPCLASSFACTORY iface,REFIID riid,LPVOID *ppobj)
|
||||
{
|
||||
ICOM_THIS(IClassFactoryImpl,iface);
|
||||
|
||||
TRACE("(%p)->(%p,%p)\n",This,riid,ppobj);
|
||||
if ( ( IsEqualGUID( &IID_IUnknown, riid ) ) ||
|
||||
( IsEqualGUID( &IID_IClassFactory, riid ) ) )
|
||||
{
|
||||
*ppobj = iface;
|
||||
IClassFactory_AddRef(iface);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
return E_NOINTERFACE;
|
||||
}
|
||||
|
||||
static ULONG WINAPI IClassFactory_fnAddRef(LPCLASSFACTORY iface)
|
||||
{
|
||||
ICOM_THIS(IClassFactoryImpl,iface);
|
||||
|
||||
TRACE("(%p)->()\n",This);
|
||||
|
||||
return InterlockedExchangeAdd(&(This->ref),1) + 1;
|
||||
}
|
||||
|
||||
static ULONG WINAPI IClassFactory_fnRelease(LPCLASSFACTORY iface)
|
||||
{
|
||||
ICOM_THIS(IClassFactoryImpl,iface);
|
||||
LONG ref;
|
||||
|
||||
TRACE("(%p)->()\n",This);
|
||||
ref = InterlockedExchangeAdd(&(This->ref),-1) - 1;
|
||||
if ( ref > 0 )
|
||||
return (ULONG)ref;
|
||||
|
||||
COMIMPL_FreeObj(This);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IClassFactory_fnCreateInstance(LPCLASSFACTORY iface,LPUNKNOWN pOuter,REFIID riid,LPVOID *ppobj)
|
||||
{
|
||||
ICOM_THIS(IClassFactoryImpl,iface);
|
||||
HRESULT hr;
|
||||
IUnknown* punk;
|
||||
|
||||
TRACE("(%p)->(%p,%s,%p)\n",This,pOuter,debugstr_guid(riid),ppobj);
|
||||
|
||||
if ( ppobj == NULL )
|
||||
return E_POINTER;
|
||||
if ( pOuter != NULL && !IsEqualGUID( riid, &IID_IUnknown ) )
|
||||
return CLASS_E_NOAGGREGATION;
|
||||
|
||||
*ppobj = NULL;
|
||||
|
||||
hr = (*This->pEntry->pCreateIUnk)(pOuter,(void**)&punk);
|
||||
if ( hr != S_OK )
|
||||
return hr;
|
||||
|
||||
hr = IUnknown_QueryInterface(punk,riid,ppobj);
|
||||
IUnknown_Release(punk);
|
||||
|
||||
return hr;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IClassFactory_fnLockServer(LPCLASSFACTORY iface,BOOL dolock)
|
||||
{
|
||||
ICOM_THIS(IClassFactoryImpl,iface);
|
||||
HRESULT hr;
|
||||
|
||||
TRACE("(%p)->(%d)\n",This,dolock);
|
||||
if (dolock)
|
||||
hr = IClassFactory_AddRef(iface);
|
||||
else
|
||||
hr = IClassFactory_Release(iface);
|
||||
|
||||
return hr;
|
||||
}
|
||||
|
||||
|
||||
|
||||
static HRESULT IClassFactory_Alloc( const CLSID* pclsid, void** ppobj )
|
||||
{
|
||||
const COMIMPL_CLASSENTRY* pEntry;
|
||||
IClassFactoryImpl* pImpl;
|
||||
|
||||
TRACE( "(%s,%p)\n", debugstr_guid(pclsid), ppobj );
|
||||
|
||||
pEntry = COMIMPL_ClassList;
|
||||
while ( pEntry->pclsid != NULL )
|
||||
{
|
||||
if ( IsEqualGUID( pclsid, pEntry->pclsid ) )
|
||||
goto found;
|
||||
pEntry ++;
|
||||
}
|
||||
|
||||
return CLASS_E_CLASSNOTAVAILABLE;
|
||||
found:
|
||||
pImpl = (IClassFactoryImpl*)COMIMPL_AllocObj( sizeof(IClassFactoryImpl) );
|
||||
if ( pImpl == NULL )
|
||||
return E_OUTOFMEMORY;
|
||||
|
||||
TRACE( "allocated successfully.\n" );
|
||||
|
||||
ICOM_VTBL(pImpl) = &iclassfact;
|
||||
pImpl->ref = 1;
|
||||
pImpl->pEntry = pEntry;
|
||||
|
||||
*ppobj = (void*)pImpl;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* COMIMPL_InitProcess (internal)
|
||||
*/
|
||||
static BOOL COMIMPL_InitProcess( HINSTANCE hInstDLL )
|
||||
{
|
||||
TRACE("()\n");
|
||||
|
||||
dwComImplRef = 0;
|
||||
InitializeCriticalSection( &csComImpl );
|
||||
|
||||
#ifndef COMIMPL_PERTHREAD_INIT
|
||||
DisableThreadLibraryCalls((HMODULE)hInstDLL);
|
||||
#endif /* COMIMPL_PERTHREAD_INIT */
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* COMIMPL_UninitProcess (internal)
|
||||
*/
|
||||
static void COMIMPL_UninitProcess( HINSTANCE hInstDLL )
|
||||
{
|
||||
CHAR szThisDLL[ MAX_PATH ];
|
||||
|
||||
TRACE("()\n");
|
||||
|
||||
if ( dwComImplRef != 0 )
|
||||
{
|
||||
szThisDLL[0] = '\0';
|
||||
if ( !GetModuleFileNameA( (HMODULE)hInstDLL, szThisDLL, MAX_PATH ) )
|
||||
szThisDLL[0] = '\0';
|
||||
ERR( "you must release some objects allocated from %s.\n", szThisDLL );
|
||||
}
|
||||
DeleteCriticalSection( &csComImpl );
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* SHDOCVW_DllMain
|
||||
*/
|
||||
BOOL WINAPI SHDOCVW_DllMain(
|
||||
HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpvReserved )
|
||||
{
|
||||
TRACE("(%08x,%08lx,%p)\n",hInstDLL,fdwReason,lpvReserved);
|
||||
|
||||
switch ( fdwReason )
|
||||
{
|
||||
case DLL_PROCESS_ATTACH:
|
||||
if ( !COMIMPL_InitProcess( hInstDLL ) )
|
||||
return FALSE;
|
||||
break;
|
||||
case DLL_PROCESS_DETACH:
|
||||
COMIMPL_UninitProcess( hInstDLL );
|
||||
break;
|
||||
case DLL_THREAD_ATTACH:
|
||||
break;
|
||||
case DLL_THREAD_DETACH:
|
||||
break;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* DllGetClassObject (SHDOCVW.@)
|
||||
*/
|
||||
HRESULT WINAPI SHDOCVW_DllGetClassObject(
|
||||
const CLSID* pclsid,const IID* piid,void** ppv)
|
||||
{
|
||||
*ppv = NULL;
|
||||
if ( IsEqualGUID( &IID_IUnknown, piid ) ||
|
||||
IsEqualGUID( &IID_IClassFactory, piid ) )
|
||||
{
|
||||
return IClassFactory_Alloc( pclsid, ppv );
|
||||
}
|
||||
|
||||
return CLASS_E_CLASSNOTAVAILABLE;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* DllCanUnloadNow (SHDOCVW.@)
|
||||
*
|
||||
* RETURNS
|
||||
* Success: S_OK
|
||||
* Failure: S_FALSE
|
||||
*/
|
||||
HRESULT WINAPI SHDOCVW_DllCanUnloadNow(void)
|
||||
{
|
||||
HRESULT hr;
|
||||
|
||||
EnterCriticalSection( &csComImpl );
|
||||
hr = ( dwComImplRef == 0 ) ? S_OK : S_FALSE;
|
||||
LeaveCriticalSection( &csComImpl );
|
||||
|
||||
return hr;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* COMIMPL_AllocObj
|
||||
*/
|
||||
void* COMIMPL_AllocObj( DWORD dwSize )
|
||||
{
|
||||
void* pv;
|
||||
|
||||
EnterCriticalSection( &csComImpl );
|
||||
dwComImplRef ++;
|
||||
pv = HeapAlloc( COMIMPL_hHeap, 0, dwSize );
|
||||
if ( pv == NULL )
|
||||
dwComImplRef --;
|
||||
LeaveCriticalSection( &csComImpl );
|
||||
|
||||
return pv;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* COMIMPL_FreeObj
|
||||
*/
|
||||
void COMIMPL_FreeObj( void* pobj )
|
||||
{
|
||||
EnterCriticalSection( &csComImpl );
|
||||
HeapFree( COMIMPL_hHeap, 0, pobj );
|
||||
dwComImplRef --;
|
||||
LeaveCriticalSection( &csComImpl );
|
||||
}
|
||||
|
|
@ -1,171 +0,0 @@
|
|||
/*
|
||||
* A basic implementation for COM DLL implementor.
|
||||
*
|
||||
* Copyright (C) Hidenori TAKESHIMA <hidenori@a2.ctktv.ne.jp>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#ifndef WINE_COMIMPL_H
|
||||
#define WINE_COMIMPL_H
|
||||
|
||||
/*
|
||||
This code provides a basic thread-safe COM implementation
|
||||
including aggregation(and an IClassFactory implementation).
|
||||
This code is based on my quartz code.
|
||||
|
||||
The usage of this library is:
|
||||
|
||||
1) copy comimpl.h and comimpl.c.
|
||||
2) implement the global class entries 'COMIMPL_ClassList'.
|
||||
3) export COMIMPL_DllMain, COMIMPL_DllGetClassObject and
|
||||
COMIMPL_DllCanUnloadNow.
|
||||
4) add 'comimpl' to your debug channels.
|
||||
5) implement your IUnknown as a thunk to call
|
||||
COMIMPL_IUnkImpl.punk methods.
|
||||
6) provide pointers of vtables in constructor.
|
||||
7) optionally, you can edit comimpl.h and/or comimpl.c.
|
||||
|
||||
A sample allocator of class COne that supports
|
||||
two interface IOne and ITwo is:
|
||||
|
||||
const COMIMPL_CLASSENTRY COMIMPL_ClassList[] =
|
||||
{
|
||||
{ &CLSID_COne, &COne_AllocObj },
|
||||
{ NULL, NULL } << the last entry must be NULL >>
|
||||
};
|
||||
|
||||
typedef struct COne
|
||||
{
|
||||
COMIMPL_IUnkImpl vfunk; << must be the first member of this struct >>
|
||||
struct { ICOM_VFIELD(IOne); } vfone;
|
||||
struct { ICOM_VFIELD(ITwo); } vftwo;
|
||||
<< ... >>
|
||||
} COne;
|
||||
#define COne_THIS(iface,member) COne* This = ((COne*)(((char*)iface)-offsetof(COne,member)))
|
||||
|
||||
static COMIMPL_IFEntry IFEntries[] =
|
||||
{
|
||||
<< all supported interfaces >>
|
||||
{ &IID_IOne, offsetof(COne,vfone)-offsetof(COne,vfunk) },
|
||||
{ &IID_ITwo, offsetof(COne,vftwo)-offsetof(COne,vfunk) },
|
||||
};
|
||||
|
||||
static void COne_Destructor(IUnknown* iface)
|
||||
{
|
||||
COne_THIS(iface,vfunk);
|
||||
|
||||
<< ... implement destructor ... >>
|
||||
}
|
||||
|
||||
HRESULT COne_AllocObj(IUnknown* punkOuter,void** ppobj)
|
||||
{
|
||||
COne* This;
|
||||
|
||||
This = (COne*)COMIMPL_AllocObj( sizeof(COne) );
|
||||
if ( This == NULL ) return E_OUTOFMEMORY;
|
||||
COMIMPL_IUnkInit( &This->vfunk, punkOuter );
|
||||
This->vfunk.pEntries = IFEntries;
|
||||
This->vfunk.dwEntries = sizeof(IFEntries)/sizeof(IFEntries[0]);
|
||||
This->vfunk.pOnFinalRelease = COne_Destructor;
|
||||
|
||||
ICOM_VTBL(&This->vfone) = &ione;
|
||||
ICOM_VTBL(&This->vftwo) = &itwo;
|
||||
|
||||
<< ... implement constructor ... >>
|
||||
<< if error occurs in constructing, you can call simply
|
||||
punk::Release() and return HRESULT. >>
|
||||
|
||||
*ppobj = (void*)(&This->vfunk);
|
||||
|
||||
return S_OK; << return S_OK if succeeded >>
|
||||
}
|
||||
*/
|
||||
|
||||
/* if per-thread initialization is needed, uncomment the following line */
|
||||
/*#define COMIMPL_PERTHREAD_INIT*/
|
||||
/* If an own heap is needed, customize the following line */
|
||||
#define COMIMPL_hHeap GetProcessHeap()
|
||||
|
||||
|
||||
typedef HRESULT (*COMIMPL_pCreateIUnknown)(IUnknown* punkOuter,void** ppobj);
|
||||
typedef void (*COMIMPL_pOnFinalRelease)(IUnknown* punkInner);
|
||||
|
||||
typedef struct COMIMPL_IFEntry COMIMPL_IFEntry;
|
||||
typedef struct COMIMPL_IFDelegation COMIMPL_IFDelegation;
|
||||
typedef struct COMIMPL_IUnkImpl COMIMPL_IUnkImpl;
|
||||
|
||||
struct COMIMPL_IFEntry
|
||||
{
|
||||
const IID* piid; /* interface ID. */
|
||||
size_t ofsVTPtr; /* offset from IUnknown. */
|
||||
};
|
||||
|
||||
struct COMIMPL_IFDelegation
|
||||
{
|
||||
struct COMIMPL_IFDelegation* pNext;
|
||||
HRESULT (*pOnQueryInterface)(
|
||||
IUnknown* punk, const IID* piid, void** ppobj );
|
||||
};
|
||||
|
||||
/* COMIMPL_IUnkimpl must be aligned for InterlockedExchangeAdd. */
|
||||
#include <pshpack4.h>
|
||||
|
||||
struct COMIMPL_IUnkImpl
|
||||
{
|
||||
/* pointer of IUnknown interface. */
|
||||
ICOM_VFIELD(IUnknown);
|
||||
|
||||
/* array of supported IIDs and offsets. */
|
||||
const COMIMPL_IFEntry* pEntries;
|
||||
DWORD dwEntries;
|
||||
/* list of delegation handlers. */
|
||||
COMIMPL_IFDelegation* pDelegationFirst;
|
||||
/* called on final release. */
|
||||
COMIMPL_pOnFinalRelease pOnFinalRelease;
|
||||
|
||||
/* IUnknown fields. */
|
||||
LONG ref;
|
||||
IUnknown* punkControl;
|
||||
};
|
||||
|
||||
#include <poppack.h>
|
||||
|
||||
typedef struct COMIMPL_CLASSENTRY
|
||||
{
|
||||
const CLSID* pclsid;
|
||||
COMIMPL_pCreateIUnknown pCreateIUnk;
|
||||
} COMIMPL_CLASSENTRY;
|
||||
|
||||
|
||||
extern const COMIMPL_CLASSENTRY COMIMPL_ClassList[]; /* must be provided */
|
||||
|
||||
void COMIMPL_IUnkInit( COMIMPL_IUnkImpl* pImpl, IUnknown* punkOuter );
|
||||
void COMIMPL_IUnkAddDelegationHandler(
|
||||
COMIMPL_IUnkImpl* pImpl, COMIMPL_IFDelegation* pDelegation );
|
||||
|
||||
BOOL WINAPI COMIMPL_DllMain(
|
||||
HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpvReserved );
|
||||
HRESULT WINAPI COMIMPL_DllGetClassObject(
|
||||
const CLSID* pclsid,const IID* piid,void** ppv);
|
||||
HRESULT WINAPI COMIMPL_DllCanUnloadNow(void);
|
||||
|
||||
void* COMIMPL_AllocObj( DWORD dwSize );
|
||||
void COMIMPL_FreeObj( void* pobj ); /* for internal use only. */
|
||||
|
||||
|
||||
|
||||
|
||||
#endif /* WINE_COMIMPL_H */
|
|
@ -1,9 +1,10 @@
|
|||
/*
|
||||
* CConnectionPointImpl
|
||||
* FIXME - stub
|
||||
* Implementation of event-related interfaces for IE Web Browser control:
|
||||
*
|
||||
* - IConnectionPointContainer
|
||||
* - IConnectionPoint
|
||||
*
|
||||
* Copyright 2001 John R. Sheets (for CodeWeavers)
|
||||
* Copyright 2002 Hidenori Takeshima
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
|
@ -20,58 +21,97 @@
|
|||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <string.h>
|
||||
#include "winbase.h"
|
||||
#include "winuser.h"
|
||||
#include "wingdi.h"
|
||||
#include "ole2.h"
|
||||
|
||||
#include "wine/obj_base.h"
|
||||
#include "wine/obj_storage.h"
|
||||
#include "wine/obj_misc.h"
|
||||
#include "wine/obj_moniker.h"
|
||||
#include "wine/obj_inplace.h"
|
||||
#include "wine/obj_dataobject.h"
|
||||
#include "wine/obj_oleobj.h"
|
||||
#include "wine/obj_oleaut.h"
|
||||
#include "wine/obj_olefont.h"
|
||||
#include "wine/obj_dragdrop.h"
|
||||
#include "wine/obj_oleview.h"
|
||||
#include "wine/obj_control.h"
|
||||
#include "wine/obj_connection.h"
|
||||
#include "wine/obj_property.h"
|
||||
#include "wine/obj_oleundo.h"
|
||||
#include "wine/obj_webbrowser.h"
|
||||
|
||||
#include "wine/debug.h"
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(shdocvw);
|
||||
|
||||
#include "shdocvw.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(shdocvw);
|
||||
|
||||
typedef struct CConnectionPointImpl
|
||||
|
||||
/**********************************************************************
|
||||
* Implement the IConnectionPointContainer interface
|
||||
*/
|
||||
|
||||
static HRESULT WINAPI WBCPC_QueryInterface(LPCONNECTIONPOINTCONTAINER iface,
|
||||
REFIID riid, LPVOID *ppobj)
|
||||
{
|
||||
COMIMPL_IUnkImpl vfunk; /* must be the first member of this struct */
|
||||
struct { ICOM_VFIELD(IConnectionPoint); } vfcpoint;
|
||||
ICOM_THIS(IConnectionPointContainerImpl, iface);
|
||||
|
||||
/* CConnectionPointImpl variables */
|
||||
FIXME("(%p)->(%s,%p),stub!\n", This, debugstr_guid(riid), ppobj);
|
||||
return E_NOINTERFACE;
|
||||
}
|
||||
|
||||
} CConnectionPointImpl;
|
||||
|
||||
#define CConnectionPointImpl_THIS(iface,member) CConnectionPointImpl* This = ((CConnectionPointImpl*)(((char*)iface)-offsetof(CConnectionPointImpl,member)))
|
||||
|
||||
|
||||
static COMIMPL_IFEntry IFEntries[] =
|
||||
static ULONG WINAPI WBCPC_AddRef(LPCONNECTIONPOINTCONTAINER iface)
|
||||
{
|
||||
{ &IID_IConnectionPoint, offsetof(CConnectionPointImpl,vfcpoint)-offsetof(CConnectionPointImpl,vfunk) },
|
||||
ICOM_THIS(IConnectionPointContainerImpl, iface);
|
||||
|
||||
TRACE("\n");
|
||||
return ++(This->ref);
|
||||
}
|
||||
|
||||
static ULONG WINAPI WBCPC_Release(LPCONNECTIONPOINTCONTAINER iface)
|
||||
{
|
||||
ICOM_THIS(IConnectionPointContainerImpl, iface);
|
||||
|
||||
/* static class, won't be freed */
|
||||
TRACE("\n");
|
||||
return --(This->ref);
|
||||
}
|
||||
|
||||
/* Get a list of connection points inside this container. */
|
||||
static HRESULT WINAPI WBCPC_EnumConnectionPoints(LPCONNECTIONPOINTCONTAINER iface,
|
||||
LPENUMCONNECTIONPOINTS *ppEnum)
|
||||
{
|
||||
FIXME("stub: IEnumConnectionPoints = %p\n", *ppEnum);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
/* Retrieve the connection point in this container associated with the
|
||||
* riid interface. When events occur in the control, the control can
|
||||
* call backwards into its embedding site, through these interfaces.
|
||||
*/
|
||||
static HRESULT WINAPI WBCPC_FindConnectionPoint(LPCONNECTIONPOINTCONTAINER iface,
|
||||
REFIID riid, LPCONNECTIONPOINT *ppCP)
|
||||
{
|
||||
TRACE(": IID = %s, IConnectionPoint = %p\n", debugstr_guid(riid), *ppCP);
|
||||
|
||||
/* For now, return the same IConnectionPoint object for both
|
||||
* event interface requests.
|
||||
*/
|
||||
if (IsEqualGUID (&IID_INotifyDBEvents, riid))
|
||||
{
|
||||
TRACE("Returning connection point %p for IID_INotifyDBEvents\n",
|
||||
&SHDOCVW_ConnectionPoint);
|
||||
*ppCP = (LPCONNECTIONPOINT)&SHDOCVW_ConnectionPoint;
|
||||
return S_OK;
|
||||
}
|
||||
else if (IsEqualGUID (&IID_IPropertyNotifySink, riid))
|
||||
{
|
||||
TRACE("Returning connection point %p for IID_IPropertyNotifySink\n",
|
||||
&SHDOCVW_ConnectionPoint);
|
||||
*ppCP = (LPCONNECTIONPOINT)&SHDOCVW_ConnectionPoint;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
/**********************************************************************
|
||||
* IConnectionPointContainer virtual function table for IE Web Browser component
|
||||
*/
|
||||
|
||||
static ICOM_VTABLE(IConnectionPointContainer) WBCPC_Vtbl =
|
||||
{
|
||||
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
|
||||
WBCPC_QueryInterface,
|
||||
WBCPC_AddRef,
|
||||
WBCPC_Release,
|
||||
WBCPC_EnumConnectionPoints,
|
||||
WBCPC_FindConnectionPoint
|
||||
};
|
||||
|
||||
/***************************************************************************
|
||||
*
|
||||
* CConnectionPointImpl::IConnectionPoint
|
||||
*/
|
||||
IConnectionPointContainerImpl SHDOCVW_ConnectionPointContainer = { &WBCPC_Vtbl, 1 };
|
||||
|
||||
|
||||
/**********************************************************************
|
||||
* Implement the IConnectionPoint interface
|
||||
|
@ -80,35 +120,33 @@ static COMIMPL_IFEntry IFEntries[] =
|
|||
static HRESULT WINAPI WBCP_QueryInterface(LPCONNECTIONPOINT iface,
|
||||
REFIID riid, LPVOID *ppobj)
|
||||
{
|
||||
CConnectionPointImpl_THIS(iface,vfcpoint);
|
||||
ICOM_THIS(IConnectionPointImpl, iface);
|
||||
|
||||
TRACE("(%p)->()\n",This);
|
||||
|
||||
return IUnknown_QueryInterface(This->vfunk.punkControl,riid,ppobj);
|
||||
FIXME("(%p)->(%s,%p),stub!\n", This, debugstr_guid(riid), ppobj);
|
||||
return E_NOINTERFACE;
|
||||
}
|
||||
|
||||
static ULONG WINAPI WBCP_AddRef(LPCONNECTIONPOINT iface)
|
||||
{
|
||||
CConnectionPointImpl_THIS(iface,vfcpoint);
|
||||
ICOM_THIS(IConnectionPointImpl, iface);
|
||||
|
||||
TRACE("(%p)->()\n",This);
|
||||
|
||||
return IUnknown_AddRef(This->vfunk.punkControl);
|
||||
TRACE("\n");
|
||||
return ++(This->ref);
|
||||
}
|
||||
|
||||
static ULONG WINAPI WBCP_Release(LPCONNECTIONPOINT iface)
|
||||
{
|
||||
CConnectionPointImpl_THIS(iface,vfcpoint);
|
||||
ICOM_THIS(IConnectionPointImpl, iface);
|
||||
|
||||
TRACE("(%p)->()\n",This);
|
||||
|
||||
return IUnknown_Release(This->vfunk.punkControl);
|
||||
/* static class, won't be freed */
|
||||
TRACE("\n");
|
||||
return --(This->ref);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI WBCP_GetConnectionInterface(LPCONNECTIONPOINT iface, IID* pIId)
|
||||
{
|
||||
FIXME("stub: %s\n", debugstr_guid(pIId));
|
||||
return E_NOTIMPL;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
/* Get this connection point's owning container */
|
||||
|
@ -117,7 +155,7 @@ WBCP_GetConnectionPointContainer(LPCONNECTIONPOINT iface,
|
|||
LPCONNECTIONPOINTCONTAINER *ppCPC)
|
||||
{
|
||||
FIXME("stub: IConnectionPointContainer = %p\n", *ppCPC);
|
||||
return E_NOTIMPL;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
/* Connect the pUnkSink event-handling implementation (in the control site)
|
||||
|
@ -127,16 +165,14 @@ WBCP_GetConnectionPointContainer(LPCONNECTIONPOINT iface,
|
|||
static HRESULT WINAPI WBCP_Advise(LPCONNECTIONPOINT iface,
|
||||
LPUNKNOWN pUnkSink, DWORD *pdwCookie)
|
||||
{
|
||||
FIXME("stub: IUnknown = %p, connection cookie = %ld\n", pUnkSink, *pdwCookie);
|
||||
#if 0
|
||||
static int new_cookie;
|
||||
|
||||
FIXME("stub: IUnknown = %p, connection cookie = %ld\n", pUnkSink, *pdwCookie);
|
||||
|
||||
*pdwCookie = ++new_cookie;
|
||||
TRACE ("Returning cookie = %ld\n", *pdwCookie);
|
||||
#endif
|
||||
|
||||
return E_NOTIMPL;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
/* Disconnect this implementation from the connection point. */
|
||||
|
@ -144,7 +180,7 @@ static HRESULT WINAPI WBCP_Unadvise(LPCONNECTIONPOINT iface,
|
|||
DWORD dwCookie)
|
||||
{
|
||||
FIXME("stub: cookie to disconnect = %ld\n", dwCookie);
|
||||
return E_NOTIMPL;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
/* Get a list of connections in this connection point. */
|
||||
|
@ -152,7 +188,7 @@ static HRESULT WINAPI WBCP_EnumConnections(LPCONNECTIONPOINT iface,
|
|||
LPENUMCONNECTIONS *ppEnum)
|
||||
{
|
||||
FIXME("stub: IEnumConnections = %p\n", *ppEnum);
|
||||
return E_NOTIMPL;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
/**********************************************************************
|
||||
|
@ -172,38 +208,4 @@ static ICOM_VTABLE(IConnectionPoint) WBCP_Vtbl =
|
|||
WBCP_EnumConnections
|
||||
};
|
||||
|
||||
/***************************************************************************
|
||||
*
|
||||
* new/delete CConnectionPointImpl
|
||||
*
|
||||
*/
|
||||
|
||||
static void CConnectionPointImpl_Destructor(IUnknown* iface)
|
||||
{
|
||||
CConnectionPointImpl_THIS(iface,vfunk);
|
||||
|
||||
FIXME("(%p)\n",This);
|
||||
|
||||
/* destructor */
|
||||
}
|
||||
|
||||
HRESULT CConnectionPointImpl_AllocObj(IUnknown* punkOuter,void** ppobj)
|
||||
{
|
||||
CConnectionPointImpl* This;
|
||||
|
||||
This = (CConnectionPointImpl*)COMIMPL_AllocObj( sizeof(CConnectionPointImpl) );
|
||||
if ( This == NULL ) return E_OUTOFMEMORY;
|
||||
COMIMPL_IUnkInit( &This->vfunk, punkOuter );
|
||||
This->vfunk.pEntries = IFEntries;
|
||||
This->vfunk.dwEntries = sizeof(IFEntries)/sizeof(IFEntries[0]);
|
||||
This->vfunk.pOnFinalRelease = CConnectionPointImpl_Destructor;
|
||||
|
||||
ICOM_VTBL(&This->vfcpoint) = &WBCP_Vtbl;
|
||||
|
||||
/* constructor */
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
|
||||
IConnectionPointImpl SHDOCVW_ConnectionPoint = { &WBCP_Vtbl, 1 };
|
|
@ -0,0 +1,122 @@
|
|||
/*
|
||||
* Implementation of class factory for IE Web Browser
|
||||
*
|
||||
* Copyright 2001 John R. Sheets (for CodeWeavers)
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include <string.h>
|
||||
#include "wine/debug.h"
|
||||
#include "shdocvw.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(shdocvw);
|
||||
|
||||
/**********************************************************************
|
||||
* Implement the IWebBrowser class factory
|
||||
*
|
||||
* (Based on implementation in ddraw/main.c)
|
||||
*/
|
||||
|
||||
/**********************************************************************
|
||||
* WBCF_QueryInterface (IUnknown)
|
||||
*/
|
||||
static HRESULT WINAPI WBCF_QueryInterface(LPCLASSFACTORY iface,
|
||||
REFIID riid, LPVOID *ppobj)
|
||||
{
|
||||
ICOM_THIS(IClassFactoryImpl, iface);
|
||||
|
||||
TRACE ("\n");
|
||||
|
||||
/*
|
||||
* Perform a sanity check on the parameters.
|
||||
*/
|
||||
if ((This == NULL) || (ppobj == NULL) )
|
||||
return E_INVALIDARG;
|
||||
|
||||
return E_NOINTERFACE;
|
||||
}
|
||||
|
||||
/************************************************************************
|
||||
* WBCF_AddRef (IUnknown)
|
||||
*/
|
||||
static ULONG WINAPI WBCF_AddRef(LPCLASSFACTORY iface)
|
||||
{
|
||||
ICOM_THIS(IClassFactoryImpl, iface);
|
||||
|
||||
TRACE("\n");
|
||||
return ++(This->ref);
|
||||
}
|
||||
|
||||
/************************************************************************
|
||||
* WBCF_Release (IUnknown)
|
||||
*/
|
||||
static ULONG WINAPI WBCF_Release(LPCLASSFACTORY iface)
|
||||
{
|
||||
ICOM_THIS(IClassFactoryImpl, iface);
|
||||
|
||||
/* static class, won't be freed */
|
||||
TRACE("\n");
|
||||
return --(This->ref);
|
||||
}
|
||||
|
||||
/************************************************************************
|
||||
* WBCF_CreateInstance (IClassFactory)
|
||||
*/
|
||||
static HRESULT WINAPI WBCF_CreateInstance(LPCLASSFACTORY iface, LPUNKNOWN pOuter,
|
||||
REFIID riid, LPVOID *ppobj)
|
||||
{
|
||||
ICOM_THIS(IClassFactoryImpl, iface);
|
||||
|
||||
/* Don't support aggregation (yet?) */
|
||||
if (pOuter)
|
||||
{
|
||||
TRACE ("Failed attempt to aggregate IWebBrowser\n");
|
||||
return CLASS_E_NOAGGREGATION;
|
||||
}
|
||||
|
||||
TRACE("(%p)->(%p,%s,%p)\n", This, pOuter, debugstr_guid(riid), ppobj);
|
||||
|
||||
if ((IsEqualGUID (&IID_IOleObject, riid)))
|
||||
{
|
||||
TRACE ("Instantiating IOleObject component\n");
|
||||
*ppobj = (LPVOID)&SHDOCVW_OleObject;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
return CLASS_E_CLASSNOTAVAILABLE;
|
||||
}
|
||||
|
||||
/************************************************************************
|
||||
* WBCF_LockServer (IClassFactory)
|
||||
*/
|
||||
static HRESULT WINAPI WBCF_LockServer(LPCLASSFACTORY iface, BOOL dolock)
|
||||
{
|
||||
ICOM_THIS(IClassFactoryImpl, iface);
|
||||
FIXME("(%p)->(%d),stub!\n", This, dolock);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static ICOM_VTABLE(IClassFactory) WBCF_Vtbl =
|
||||
{
|
||||
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
|
||||
WBCF_QueryInterface,
|
||||
WBCF_AddRef,
|
||||
WBCF_Release,
|
||||
WBCF_CreateInstance,
|
||||
WBCF_LockServer
|
||||
};
|
||||
|
||||
IClassFactoryImpl SHDOCVW_ClassFactory = { &WBCF_Vtbl, 1 };
|
|
@ -0,0 +1,94 @@
|
|||
/*
|
||||
* Implementation of miscellaneous interfaces for IE Web Browser control:
|
||||
*
|
||||
* - IQuickActivate
|
||||
*
|
||||
* Copyright 2001 John R. Sheets (for CodeWeavers)
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include "wine/debug.h"
|
||||
#include "shdocvw.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(shdocvw);
|
||||
|
||||
/**********************************************************************
|
||||
* Implement the IQuickActivate interface
|
||||
*/
|
||||
|
||||
static HRESULT WINAPI WBQA_QueryInterface(LPQUICKACTIVATE iface,
|
||||
REFIID riid, LPVOID *ppobj)
|
||||
{
|
||||
ICOM_THIS(IQuickActivateImpl, iface);
|
||||
|
||||
FIXME("(%p)->(%s,%p),stub!\n", This, debugstr_guid(riid), ppobj);
|
||||
return E_NOINTERFACE;
|
||||
}
|
||||
|
||||
static ULONG WINAPI WBQA_AddRef(LPQUICKACTIVATE iface)
|
||||
{
|
||||
ICOM_THIS(IQuickActivateImpl, iface);
|
||||
|
||||
TRACE("\n");
|
||||
return ++(This->ref);
|
||||
}
|
||||
|
||||
static ULONG WINAPI WBQA_Release(LPQUICKACTIVATE iface)
|
||||
{
|
||||
ICOM_THIS(IQuickActivateImpl, iface);
|
||||
|
||||
/* static class, won't be freed */
|
||||
TRACE("\n");
|
||||
return --(This->ref);
|
||||
}
|
||||
|
||||
/* Alternative interface for quicker, easier activation of a control. */
|
||||
static HRESULT WINAPI WBQA_QuickActivate(LPQUICKACTIVATE iface,
|
||||
QACONTAINER *pQaContainer,
|
||||
QACONTROL *pQaControl)
|
||||
{
|
||||
FIXME("stub: QACONTAINER = %p, QACONTROL = %p\n", pQaContainer, pQaControl);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI WBQA_SetContentExtent(LPQUICKACTIVATE iface, LPSIZEL pSizel)
|
||||
{
|
||||
FIXME("stub: LPSIZEL = %p\n", pSizel);
|
||||
return E_NOINTERFACE;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI WBQA_GetContentExtent(LPQUICKACTIVATE iface, LPSIZEL pSizel)
|
||||
{
|
||||
FIXME("stub: LPSIZEL = %p\n", pSizel);
|
||||
return E_NOINTERFACE;
|
||||
}
|
||||
|
||||
/**********************************************************************
|
||||
* IQuickActivate virtual function table for IE Web Browser component
|
||||
*/
|
||||
|
||||
static ICOM_VTABLE(IQuickActivate) WBQA_Vtbl =
|
||||
{
|
||||
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
|
||||
WBQA_QueryInterface,
|
||||
WBQA_AddRef,
|
||||
WBQA_Release,
|
||||
WBQA_QuickActivate,
|
||||
WBQA_SetContentExtent,
|
||||
WBQA_GetContentExtent
|
||||
};
|
||||
|
||||
IQuickActivateImpl SHDOCVW_QuickActivate = { &WBQA_Vtbl, 1 };
|
|
@ -0,0 +1,618 @@
|
|||
/*
|
||||
* Implementation of IOleObject interfaces for IE Web Browser
|
||||
*
|
||||
* - IOleObject
|
||||
* - IOleInPlaceObject
|
||||
* - IOleControl
|
||||
*
|
||||
* Copyright 2001 John R. Sheets (for CodeWeavers)
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include <string.h>
|
||||
#include "wine/debug.h"
|
||||
#include "shdocvw.h"
|
||||
#include "ole2.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(shdocvw);
|
||||
|
||||
/**********************************************************************
|
||||
* Implement the IOleObject interface for the web browser component
|
||||
*
|
||||
* Based on DefaultHandler code in dlls/ole32/defaulthandler.c.
|
||||
*/
|
||||
|
||||
static ULONG WINAPI WBOOBJ_AddRef(LPOLEOBJECT iface);
|
||||
static ULONG WINAPI WBOOBJ_Release(LPOLEOBJECT iface);
|
||||
|
||||
/************************************************************************
|
||||
* WBOOBJ_QueryInterface (IUnknown)
|
||||
*
|
||||
* Interfaces we need to (at least pretend to) retrieve:
|
||||
*
|
||||
* a6bc3ac0-dbaa-11ce-9de3-00aa004bb851 IID_IProvideClassInfo2
|
||||
* b196b283-bab4-101a-b69c-00aa00341d07 IID_IProvideClassInfo
|
||||
* cf51ed10-62fe-11cf-bf86-00a0c9034836 IID_IQuickActivate
|
||||
* 7fd52380-4e07-101b-ae2d-08002b2ec713 IID_IPersistStreamInit
|
||||
* 0000010a-0000-0000-c000-000000000046 IID_IPersistStorage
|
||||
* b196b284-bab4-101a-b69c-00aa00341d07 IID_IConnectionPointContainer
|
||||
*/
|
||||
static HRESULT WINAPI WBOOBJ_QueryInterface(LPOLEOBJECT iface,
|
||||
REFIID riid, void** ppobj)
|
||||
{
|
||||
ICOM_THIS(IOleObjectImpl, iface);
|
||||
|
||||
/*
|
||||
* Perform a sanity check on the parameters.
|
||||
*/
|
||||
if ((This == NULL) || (ppobj == NULL) )
|
||||
return E_INVALIDARG;
|
||||
|
||||
if (IsEqualGUID (&IID_IPersistStorage, riid))
|
||||
{
|
||||
TRACE("Returning IID_IPersistStorage interface\n");
|
||||
*ppobj = (LPVOID)&SHDOCVW_PersistStorage;
|
||||
WBOOBJ_AddRef (iface);
|
||||
return S_OK;
|
||||
}
|
||||
else if (IsEqualGUID (&IID_IPersistStreamInit, riid))
|
||||
{
|
||||
TRACE("Returning IID_IPersistStreamInit interface\n");
|
||||
*ppobj = (LPVOID)&SHDOCVW_PersistStreamInit;
|
||||
WBOOBJ_AddRef (iface);
|
||||
return S_OK;
|
||||
}
|
||||
else if (IsEqualGUID (&IID_IProvideClassInfo, riid))
|
||||
{
|
||||
TRACE("Returning IID_IProvideClassInfo interface\n");
|
||||
*ppobj = (LPVOID)&SHDOCVW_ProvideClassInfo;
|
||||
WBOOBJ_AddRef (iface);
|
||||
return S_OK;
|
||||
}
|
||||
else if (IsEqualGUID (&IID_IProvideClassInfo2, riid))
|
||||
{
|
||||
TRACE("Returning IID_IProvideClassInfo2 interface %p\n",
|
||||
&SHDOCVW_ProvideClassInfo2);
|
||||
*ppobj = (LPVOID)&SHDOCVW_ProvideClassInfo2;
|
||||
WBOOBJ_AddRef (iface);
|
||||
return S_OK;
|
||||
}
|
||||
else if (IsEqualGUID (&IID_IQuickActivate, riid))
|
||||
{
|
||||
TRACE("Returning IID_IQuickActivate interface\n");
|
||||
*ppobj = (LPVOID)&SHDOCVW_QuickActivate;
|
||||
WBOOBJ_AddRef (iface);
|
||||
return S_OK;
|
||||
}
|
||||
else if (IsEqualGUID (&IID_IConnectionPointContainer, riid))
|
||||
{
|
||||
TRACE("Returning IID_IConnectionPointContainer interface\n");
|
||||
*ppobj = (LPVOID)&SHDOCVW_ConnectionPointContainer;
|
||||
WBOOBJ_AddRef (iface);
|
||||
return S_OK;
|
||||
}
|
||||
else if (IsEqualGUID (&IID_IOleInPlaceObject, riid))
|
||||
{
|
||||
TRACE("Returning IID_IOleInPlaceObject interface\n");
|
||||
*ppobj = (LPVOID)&SHDOCVW_OleInPlaceObject;
|
||||
WBOOBJ_AddRef (iface);
|
||||
return S_OK;
|
||||
}
|
||||
else if (IsEqualGUID (&IID_IOleControl, riid))
|
||||
{
|
||||
TRACE("Returning IID_IOleControl interface\n");
|
||||
*ppobj = (LPVOID)&SHDOCVW_OleControl;
|
||||
WBOOBJ_AddRef (iface);
|
||||
return S_OK;
|
||||
}
|
||||
else if (IsEqualGUID (&IID_IWebBrowser, riid))
|
||||
{
|
||||
TRACE("Returning IID_IWebBrowser interface\n");
|
||||
*ppobj = (LPVOID)&SHDOCVW_WebBrowser;
|
||||
WBOOBJ_AddRef (iface);
|
||||
return S_OK;
|
||||
}
|
||||
else if (IsEqualGUID (&IID_IDispatch, riid))
|
||||
{
|
||||
TRACE("Returning IID_IDispatch interface\n");
|
||||
*ppobj = (LPVOID)&SHDOCVW_WebBrowser;
|
||||
WBOOBJ_AddRef (iface);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
TRACE ("Failed to find iid = %s\n", debugstr_guid(riid));
|
||||
|
||||
return E_NOINTERFACE;
|
||||
}
|
||||
|
||||
/************************************************************************
|
||||
* WBOOBJ_AddRef (IUnknown)
|
||||
*/
|
||||
static ULONG WINAPI WBOOBJ_AddRef(LPOLEOBJECT iface)
|
||||
{
|
||||
ICOM_THIS(IOleObjectImpl, iface);
|
||||
|
||||
TRACE("\n");
|
||||
return ++(This->ref);
|
||||
}
|
||||
|
||||
/************************************************************************
|
||||
* WBOOBJ_Release (IUnknown)
|
||||
*/
|
||||
static ULONG WINAPI WBOOBJ_Release(LPOLEOBJECT iface)
|
||||
{
|
||||
ICOM_THIS(IOleObjectImpl, iface);
|
||||
|
||||
/* static class, won't be freed */
|
||||
TRACE("\n");
|
||||
return --(This->ref);
|
||||
}
|
||||
|
||||
/************************************************************************
|
||||
* WBOOBJ_SetClientSite (IOleObject)
|
||||
*/
|
||||
static HRESULT WINAPI WBOOBJ_SetClientSite(LPOLEOBJECT iface,
|
||||
LPOLECLIENTSITE pClientSite)
|
||||
{
|
||||
FIXME("stub: (%p, %p)\n", iface, pClientSite);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
/************************************************************************
|
||||
* WBOOBJ_GetClientSite (IOleObject)
|
||||
*/
|
||||
static HRESULT WINAPI WBOOBJ_GetClientSite(LPOLEOBJECT iface,
|
||||
LPOLECLIENTSITE* ppClientSite)
|
||||
{
|
||||
FIXME("stub: (%p)\n", *ppClientSite);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
/************************************************************************
|
||||
* WBOOBJ_SetHostNames (IOleObject)
|
||||
*/
|
||||
static HRESULT WINAPI WBOOBJ_SetHostNames(LPOLEOBJECT iface, LPCOLESTR szContainerApp,
|
||||
LPCOLESTR szContainerObj)
|
||||
{
|
||||
FIXME("stub: (%p, %s, %s)\n", iface, debugstr_w(szContainerApp),
|
||||
debugstr_w(szContainerObj));
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
/************************************************************************
|
||||
* WBOOBJ_Close (IOleObject)
|
||||
*/
|
||||
static HRESULT WINAPI WBOOBJ_Close(LPOLEOBJECT iface, DWORD dwSaveOption)
|
||||
{
|
||||
FIXME("stub: ()\n");
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
/************************************************************************
|
||||
* WBOOBJ_SetMoniker (IOleObject)
|
||||
*/
|
||||
static HRESULT WINAPI WBOOBJ_SetMoniker(LPOLEOBJECT iface,
|
||||
DWORD dwWhichMoniker, IMoniker* pmk)
|
||||
{
|
||||
FIXME("stub: (%p, %ld, %p)\n", iface, dwWhichMoniker, pmk);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
/************************************************************************
|
||||
* WBOOBJ_GetMoniker (IOleObject)
|
||||
*
|
||||
* Delegate this request to the client site if we have one.
|
||||
*/
|
||||
static HRESULT WINAPI WBOOBJ_GetMoniker(LPOLEOBJECT iface, DWORD dwAssign,
|
||||
DWORD dwWhichMoniker, LPMONIKER *ppmk)
|
||||
{
|
||||
FIXME("stub (%p, %ld, %ld, %p)\n", iface, dwAssign, dwWhichMoniker, ppmk);
|
||||
return E_UNSPEC;
|
||||
}
|
||||
|
||||
/************************************************************************
|
||||
* WBOOBJ_InitFromData (IOleObject)
|
||||
*
|
||||
* This method is meaningless if the server is not running
|
||||
*/
|
||||
static HRESULT WINAPI WBOOBJ_InitFromData(LPOLEOBJECT iface, LPDATAOBJECT pDataObject,
|
||||
BOOL fCreation, DWORD dwReserved)
|
||||
{
|
||||
FIXME("stub: (%p, %p, %d, %ld)\n", iface, pDataObject, fCreation, dwReserved);
|
||||
return OLE_E_NOTRUNNING;
|
||||
}
|
||||
|
||||
/************************************************************************
|
||||
* WBOOBJ_GetClipboardData (IOleObject)
|
||||
*
|
||||
* This method is meaningless if the server is not running
|
||||
*/
|
||||
static HRESULT WINAPI WBOOBJ_GetClipboardData(LPOLEOBJECT iface, DWORD dwReserved,
|
||||
LPDATAOBJECT *ppDataObject)
|
||||
{
|
||||
FIXME("stub: (%p, %ld, %p)\n", iface, dwReserved, ppDataObject);
|
||||
return OLE_E_NOTRUNNING;
|
||||
}
|
||||
|
||||
/************************************************************************
|
||||
* WBOOBJ_DoVerb (IOleObject)
|
||||
*/
|
||||
static HRESULT WINAPI WBOOBJ_DoVerb(LPOLEOBJECT iface, LONG iVerb, struct tagMSG* lpmsg,
|
||||
LPOLECLIENTSITE pActiveSite, LONG lindex,
|
||||
HWND hwndParent, LPCRECT lprcPosRect)
|
||||
{
|
||||
FIXME(": stub iVerb = %ld\n", iVerb);
|
||||
switch (iVerb)
|
||||
{
|
||||
case OLEIVERB_INPLACEACTIVATE:
|
||||
FIXME ("stub for OLEIVERB_INPLACEACTIVATE\n");
|
||||
break;
|
||||
case OLEIVERB_HIDE:
|
||||
FIXME ("stub for OLEIVERB_HIDE\n");
|
||||
break;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
/************************************************************************
|
||||
* WBOOBJ_EnumVerbs (IOleObject)
|
||||
*
|
||||
* Delegate to OleRegEnumVerbs.
|
||||
*/
|
||||
static HRESULT WINAPI WBOOBJ_EnumVerbs(LPOLEOBJECT iface,
|
||||
IEnumOLEVERB** ppEnumOleVerb)
|
||||
{
|
||||
TRACE("(%p, %p)\n", iface, ppEnumOleVerb);
|
||||
|
||||
return OleRegEnumVerbs(&CLSID_WebBrowser, ppEnumOleVerb);
|
||||
}
|
||||
|
||||
/************************************************************************
|
||||
* WBOOBJ_EnumVerbs (IOleObject)
|
||||
*/
|
||||
static HRESULT WINAPI WBOOBJ_Update(LPOLEOBJECT iface)
|
||||
{
|
||||
FIXME(": Stub\n");
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
/************************************************************************
|
||||
* WBOOBJ_IsUpToDate (IOleObject)
|
||||
*
|
||||
* This method is meaningless if the server is not running
|
||||
*/
|
||||
static HRESULT WINAPI WBOOBJ_IsUpToDate(LPOLEOBJECT iface)
|
||||
{
|
||||
FIXME("(%p)\n", iface);
|
||||
return OLE_E_NOTRUNNING;
|
||||
}
|
||||
|
||||
/************************************************************************
|
||||
* WBOOBJ_GetUserClassID (IOleObject)
|
||||
*/
|
||||
static HRESULT WINAPI WBOOBJ_GetUserClassID(LPOLEOBJECT iface, CLSID* pClsid)
|
||||
{
|
||||
FIXME("stub: (%p, %p)\n", iface, pClsid);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
/************************************************************************
|
||||
* WBOOBJ_GetUserType (IOleObject)
|
||||
*
|
||||
* Delegate to OleRegGetUserType.
|
||||
*/
|
||||
static HRESULT WINAPI WBOOBJ_GetUserType(LPOLEOBJECT iface, DWORD dwFormOfType,
|
||||
LPOLESTR* pszUserType)
|
||||
{
|
||||
TRACE("(%p, %ld, %p)\n", iface, dwFormOfType, pszUserType);
|
||||
|
||||
return OleRegGetUserType(&CLSID_WebBrowser, dwFormOfType, pszUserType);
|
||||
}
|
||||
|
||||
/************************************************************************
|
||||
* WBOOBJ_SetExtent (IOleObject)
|
||||
*
|
||||
* This method is meaningless if the server is not running
|
||||
*/
|
||||
static HRESULT WINAPI WBOOBJ_SetExtent(LPOLEOBJECT iface, DWORD dwDrawAspect,
|
||||
SIZEL* psizel)
|
||||
{
|
||||
FIXME("stub: (%p, %lx, (%ld x %ld))\n", iface, dwDrawAspect,
|
||||
psizel->cx, psizel->cy);
|
||||
return OLE_E_NOTRUNNING;
|
||||
}
|
||||
|
||||
/************************************************************************
|
||||
* WBOOBJ_GetExtent (IOleObject)
|
||||
*/
|
||||
static HRESULT WINAPI WBOOBJ_GetExtent(LPOLEOBJECT iface, DWORD dwDrawAspect,
|
||||
SIZEL* psizel)
|
||||
{
|
||||
FIXME("stub: (%p, %lx, %p)\n", iface, dwDrawAspect, psizel);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
/************************************************************************
|
||||
* WBOOBJ_Advise (IOleObject)
|
||||
*/
|
||||
static HRESULT WINAPI WBOOBJ_Advise(LPOLEOBJECT iface, IAdviseSink* pAdvSink,
|
||||
DWORD* pdwConnection)
|
||||
{
|
||||
FIXME("stub: (%p, %p, %p)\n", iface, pAdvSink, pdwConnection);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
/************************************************************************
|
||||
* WBOOBJ_Unadvise (IOleObject)
|
||||
*/
|
||||
static HRESULT WINAPI WBOOBJ_Unadvise(LPOLEOBJECT iface, DWORD dwConnection)
|
||||
{
|
||||
FIXME("stub: (%p, %ld)\n", iface, dwConnection);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
/************************************************************************
|
||||
* WBOOBJ_EnumAdvise (IOleObject)
|
||||
*/
|
||||
static HRESULT WINAPI WBOOBJ_EnumAdvise(LPOLEOBJECT iface, IEnumSTATDATA** ppenumAdvise)
|
||||
{
|
||||
FIXME("stub: (%p, %p)\n", iface, ppenumAdvise);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
/************************************************************************
|
||||
* WBOOBJ_GetMiscStatus (IOleObject)
|
||||
*
|
||||
* Delegate to OleRegGetMiscStatus.
|
||||
*/
|
||||
static HRESULT WINAPI WBOOBJ_GetMiscStatus(LPOLEOBJECT iface, DWORD dwAspect,
|
||||
DWORD* pdwStatus)
|
||||
{
|
||||
HRESULT hres;
|
||||
|
||||
TRACE("(%p, %lx, %p)\n", iface, dwAspect, pdwStatus);
|
||||
|
||||
hres = OleRegGetMiscStatus(&CLSID_WebBrowser, dwAspect, pdwStatus);
|
||||
|
||||
if (FAILED(hres))
|
||||
*pdwStatus = 0;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
/************************************************************************
|
||||
* WBOOBJ_SetColorScheme (IOleObject)
|
||||
*
|
||||
* This method is meaningless if the server is not running
|
||||
*/
|
||||
static HRESULT WINAPI WBOOBJ_SetColorScheme(LPOLEOBJECT iface,
|
||||
struct tagLOGPALETTE* pLogpal)
|
||||
{
|
||||
FIXME("stub: (%p, %p))\n", iface, pLogpal);
|
||||
return OLE_E_NOTRUNNING;
|
||||
}
|
||||
|
||||
/**********************************************************************
|
||||
* IOleObject virtual function table for IE Web Browser component
|
||||
*/
|
||||
|
||||
static ICOM_VTABLE(IOleObject) WBOOBJ_Vtbl =
|
||||
{
|
||||
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
|
||||
WBOOBJ_QueryInterface,
|
||||
WBOOBJ_AddRef,
|
||||
WBOOBJ_Release,
|
||||
WBOOBJ_SetClientSite,
|
||||
WBOOBJ_GetClientSite,
|
||||
WBOOBJ_SetHostNames,
|
||||
WBOOBJ_Close,
|
||||
WBOOBJ_SetMoniker,
|
||||
WBOOBJ_GetMoniker,
|
||||
WBOOBJ_InitFromData,
|
||||
WBOOBJ_GetClipboardData,
|
||||
WBOOBJ_DoVerb,
|
||||
WBOOBJ_EnumVerbs,
|
||||
WBOOBJ_Update,
|
||||
WBOOBJ_IsUpToDate,
|
||||
WBOOBJ_GetUserClassID,
|
||||
WBOOBJ_GetUserType,
|
||||
WBOOBJ_SetExtent,
|
||||
WBOOBJ_GetExtent,
|
||||
WBOOBJ_Advise,
|
||||
WBOOBJ_Unadvise,
|
||||
WBOOBJ_EnumAdvise,
|
||||
WBOOBJ_GetMiscStatus,
|
||||
WBOOBJ_SetColorScheme
|
||||
};
|
||||
|
||||
IOleObjectImpl SHDOCVW_OleObject = { &WBOOBJ_Vtbl, 1 };
|
||||
|
||||
|
||||
/**********************************************************************
|
||||
* Implement the IOleInPlaceObject interface
|
||||
*/
|
||||
|
||||
static HRESULT WINAPI WBOIPO_QueryInterface(LPOLEINPLACEOBJECT iface,
|
||||
REFIID riid, LPVOID *ppobj)
|
||||
{
|
||||
ICOM_THIS(IOleInPlaceObjectImpl, iface);
|
||||
|
||||
FIXME("(%p)->(%s,%p),stub!\n", This, debugstr_guid(riid), ppobj);
|
||||
return E_NOINTERFACE;
|
||||
}
|
||||
|
||||
static ULONG WINAPI WBOIPO_AddRef(LPOLEINPLACEOBJECT iface)
|
||||
{
|
||||
ICOM_THIS(IOleInPlaceObjectImpl, iface);
|
||||
|
||||
TRACE("\n");
|
||||
return ++(This->ref);
|
||||
}
|
||||
|
||||
static ULONG WINAPI WBOIPO_Release(LPOLEINPLACEOBJECT iface)
|
||||
{
|
||||
ICOM_THIS(IOleInPlaceObjectImpl, iface);
|
||||
|
||||
/* static class, won't be freed */
|
||||
TRACE("\n");
|
||||
return --(This->ref);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI WBOIPO_GetWindow(LPOLEINPLACEOBJECT iface, HWND* phwnd)
|
||||
{
|
||||
#if 0
|
||||
/* Create a fake window to fool MFC into believing that we actually
|
||||
* have an implemented browser control. Avoids the assertion.
|
||||
*/
|
||||
HWND hwnd;
|
||||
hwnd = CreateWindowA("BUTTON", "Web Control",
|
||||
WS_HSCROLL | WS_VSCROLL | WS_OVERLAPPEDWINDOW,
|
||||
CW_USEDEFAULT, CW_USEDEFAULT, 600,
|
||||
400, NULL, NULL, NULL, NULL);
|
||||
|
||||
*phwnd = hwnd;
|
||||
TRACE ("Returning hwnd = %d\n", hwnd);
|
||||
#endif
|
||||
|
||||
FIXME("stub HWND* = %p\n", phwnd);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI WBOIPO_ContextSensitiveHelp(LPOLEINPLACEOBJECT iface,
|
||||
BOOL fEnterMode)
|
||||
{
|
||||
FIXME("stub fEnterMode = %d\n", fEnterMode);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI WBOIPO_InPlaceDeactivate(LPOLEINPLACEOBJECT iface)
|
||||
{
|
||||
FIXME("stub \n");
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI WBOIPO_UIDeactivate(LPOLEINPLACEOBJECT iface)
|
||||
{
|
||||
FIXME("stub \n");
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI WBOIPO_SetObjectRects(LPOLEINPLACEOBJECT iface,
|
||||
LPCRECT lprcPosRect, LPCRECT lprcClipRect)
|
||||
{
|
||||
FIXME("stub PosRect = %p, ClipRect = %p\n", lprcPosRect, lprcClipRect);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI WBOIPO_ReactivateAndUndo(LPOLEINPLACEOBJECT iface)
|
||||
{
|
||||
FIXME("stub \n");
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
/**********************************************************************
|
||||
* IOleInPlaceObject virtual function table for IE Web Browser component
|
||||
*/
|
||||
|
||||
static ICOM_VTABLE(IOleInPlaceObject) WBOIPO_Vtbl =
|
||||
{
|
||||
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
|
||||
WBOIPO_QueryInterface,
|
||||
WBOIPO_AddRef,
|
||||
WBOIPO_Release,
|
||||
WBOIPO_GetWindow,
|
||||
WBOIPO_ContextSensitiveHelp,
|
||||
WBOIPO_InPlaceDeactivate,
|
||||
WBOIPO_UIDeactivate,
|
||||
WBOIPO_SetObjectRects,
|
||||
WBOIPO_ReactivateAndUndo
|
||||
};
|
||||
|
||||
IOleInPlaceObjectImpl SHDOCVW_OleInPlaceObject = { &WBOIPO_Vtbl, 1 };
|
||||
|
||||
|
||||
/**********************************************************************
|
||||
* Implement the IOleControl interface
|
||||
*/
|
||||
|
||||
static HRESULT WINAPI WBOC_QueryInterface(LPOLECONTROL iface,
|
||||
REFIID riid, LPVOID *ppobj)
|
||||
{
|
||||
ICOM_THIS(IOleControlImpl, iface);
|
||||
|
||||
FIXME("(%p)->(%s,%p),stub!\n", This, debugstr_guid(riid), ppobj);
|
||||
return E_NOINTERFACE;
|
||||
}
|
||||
|
||||
static ULONG WINAPI WBOC_AddRef(LPOLECONTROL iface)
|
||||
{
|
||||
ICOM_THIS(IOleControlImpl, iface);
|
||||
|
||||
TRACE("\n");
|
||||
return ++(This->ref);
|
||||
}
|
||||
|
||||
static ULONG WINAPI WBOC_Release(LPOLECONTROL iface)
|
||||
{
|
||||
ICOM_THIS(IOleControlImpl, iface);
|
||||
|
||||
/* static class, won't be freed */
|
||||
TRACE("\n");
|
||||
return --(This->ref);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI WBOC_GetControlInfo(LPOLECONTROL iface, LPCONTROLINFO pCI)
|
||||
{
|
||||
FIXME("stub: LPCONTROLINFO = %p\n", pCI);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI WBOC_OnMnemonic(LPOLECONTROL iface, struct tagMSG *pMsg)
|
||||
{
|
||||
FIXME("stub: MSG* = %p\n", pMsg);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI WBOC_OnAmbientPropertyChange(LPOLECONTROL iface, DISPID dispID)
|
||||
{
|
||||
FIXME("stub: DISPID = %ld\n", dispID);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI WBOC_FreezeEvents(LPOLECONTROL iface, BOOL bFreeze)
|
||||
{
|
||||
FIXME("stub: bFreeze = %d\n", bFreeze);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
/**********************************************************************
|
||||
* IOleControl virtual function table for IE Web Browser component
|
||||
*/
|
||||
|
||||
static ICOM_VTABLE(IOleControl) WBOC_Vtbl =
|
||||
{
|
||||
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
|
||||
WBOC_QueryInterface,
|
||||
WBOC_AddRef,
|
||||
WBOC_Release,
|
||||
WBOC_GetControlInfo,
|
||||
WBOC_OnMnemonic,
|
||||
WBOC_OnAmbientPropertyChange,
|
||||
WBOC_FreezeEvents
|
||||
};
|
||||
|
||||
IOleControlImpl SHDOCVW_OleControl = { &WBOC_Vtbl, 1 };
|
|
@ -0,0 +1,200 @@
|
|||
/*
|
||||
* Implementation of IPersist interfaces for IE Web Browser control
|
||||
*
|
||||
* Copyright 2001 John R. Sheets (for CodeWeavers)
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include "wine/debug.h"
|
||||
#include "shdocvw.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(shdocvw);
|
||||
|
||||
/**********************************************************************
|
||||
* Implement the IPersistStorage interface
|
||||
*/
|
||||
|
||||
static HRESULT WINAPI WBPS_QueryInterface(LPPERSISTSTORAGE iface,
|
||||
REFIID riid, LPVOID *ppobj)
|
||||
{
|
||||
ICOM_THIS(IPersistStorageImpl, iface);
|
||||
|
||||
FIXME("(%p)->(%s,%p),stub!\n", This, debugstr_guid(riid), ppobj);
|
||||
return E_NOINTERFACE;
|
||||
}
|
||||
|
||||
static ULONG WINAPI WBPS_AddRef(LPPERSISTSTORAGE iface)
|
||||
{
|
||||
ICOM_THIS(IPersistStorageImpl, iface);
|
||||
|
||||
TRACE("\n");
|
||||
return ++(This->ref);
|
||||
}
|
||||
|
||||
static ULONG WINAPI WBPS_Release(LPPERSISTSTORAGE iface)
|
||||
{
|
||||
ICOM_THIS(IPersistStorageImpl, iface);
|
||||
|
||||
/* static class, won't be freed */
|
||||
TRACE("\n");
|
||||
return --(This->ref);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI WBPS_GetClassID(LPPERSISTSTORAGE iface, CLSID *pClassID)
|
||||
{
|
||||
FIXME("stub: CLSID = %s\n", debugstr_guid(pClassID));
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI WBPS_IsDirty(LPPERSISTSTORAGE iface)
|
||||
{
|
||||
FIXME("stub\n");
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI WBPS_InitNew(LPPERSISTSTORAGE iface, LPSTORAGE pStg)
|
||||
{
|
||||
FIXME("stub: LPSTORAGE = %p\n", pStg);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI WBPS_Load(LPPERSISTSTORAGE iface, LPSTORAGE pStg)
|
||||
{
|
||||
FIXME("stub: LPSTORAGE = %p\n", pStg);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI WBPS_Save(LPPERSISTSTORAGE iface, LPSTORAGE pStg,
|
||||
BOOL fSameAsLoad)
|
||||
{
|
||||
FIXME("stub: LPSTORAGE = %p, fSameAsLoad = %d\n", pStg, fSameAsLoad);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI WBPS_SaveCompleted(LPPERSISTSTORAGE iface, LPSTORAGE pStgNew)
|
||||
{
|
||||
FIXME("stub: LPSTORAGE = %p\n", pStgNew);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
/**********************************************************************
|
||||
* IPersistStorage virtual function table for IE Web Browser component
|
||||
*/
|
||||
|
||||
static ICOM_VTABLE(IPersistStorage) WBPS_Vtbl =
|
||||
{
|
||||
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
|
||||
WBPS_QueryInterface,
|
||||
WBPS_AddRef,
|
||||
WBPS_Release,
|
||||
WBPS_GetClassID,
|
||||
WBPS_IsDirty,
|
||||
WBPS_InitNew,
|
||||
WBPS_Load,
|
||||
WBPS_Save,
|
||||
WBPS_SaveCompleted
|
||||
};
|
||||
|
||||
IPersistStorageImpl SHDOCVW_PersistStorage = { &WBPS_Vtbl, 1 };
|
||||
|
||||
|
||||
/**********************************************************************
|
||||
* Implement the IPersistStreamInit interface
|
||||
*/
|
||||
|
||||
static HRESULT WINAPI WBPSI_QueryInterface(LPPERSISTSTREAMINIT iface,
|
||||
REFIID riid, LPVOID *ppobj)
|
||||
{
|
||||
ICOM_THIS(IPersistStreamInitImpl, iface);
|
||||
|
||||
FIXME("(%p)->(%s,%p),stub!\n", This, debugstr_guid(riid), ppobj);
|
||||
return E_NOINTERFACE;
|
||||
}
|
||||
|
||||
static ULONG WINAPI WBPSI_AddRef(LPPERSISTSTREAMINIT iface)
|
||||
{
|
||||
ICOM_THIS(IPersistStreamInitImpl, iface);
|
||||
|
||||
TRACE("\n");
|
||||
return ++(This->ref);
|
||||
}
|
||||
|
||||
static ULONG WINAPI WBPSI_Release(LPPERSISTSTREAMINIT iface)
|
||||
{
|
||||
ICOM_THIS(IPersistStreamInitImpl, iface);
|
||||
|
||||
/* static class, won't be freed */
|
||||
TRACE("\n");
|
||||
return --(This->ref);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI WBPSI_GetClassID(LPPERSISTSTREAMINIT iface, CLSID *pClassID)
|
||||
{
|
||||
FIXME("stub: CLSID = %s\n", debugstr_guid(pClassID));
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI WBPSI_IsDirty(LPPERSISTSTREAMINIT iface)
|
||||
{
|
||||
FIXME("stub\n");
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI WBPSI_Load(LPPERSISTSTREAMINIT iface, LPSTREAM pStg)
|
||||
{
|
||||
FIXME("stub: LPSTORAGE = %p\n", pStg);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI WBPSI_Save(LPPERSISTSTREAMINIT iface, LPSTREAM pStg,
|
||||
BOOL fSameAsLoad)
|
||||
{
|
||||
FIXME("stub: LPSTORAGE = %p, fSameAsLoad = %d\n", pStg, fSameAsLoad);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI WBPSI_GetSizeMax(LPPERSISTSTREAMINIT iface,
|
||||
ULARGE_INTEGER *pcbSize)
|
||||
{
|
||||
FIXME("stub: ULARGE_INTEGER = %p\n", pcbSize);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI WBPSI_InitNew(LPPERSISTSTREAMINIT iface)
|
||||
{
|
||||
FIXME("stub\n");
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
/**********************************************************************
|
||||
* IPersistStreamInit virtual function table for IE Web Browser component
|
||||
*/
|
||||
|
||||
static ICOM_VTABLE(IPersistStreamInit) WBPSI_Vtbl =
|
||||
{
|
||||
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
|
||||
WBPSI_QueryInterface,
|
||||
WBPSI_AddRef,
|
||||
WBPSI_Release,
|
||||
WBPSI_GetClassID,
|
||||
WBPSI_IsDirty,
|
||||
WBPSI_Load,
|
||||
WBPSI_Save,
|
||||
WBPSI_GetSizeMax,
|
||||
WBPSI_InitNew
|
||||
};
|
||||
|
||||
IPersistStreamInitImpl SHDOCVW_PersistStreamInit = { &WBPSI_Vtbl, 1 };
|
|
@ -1,42 +0,0 @@
|
|||
/*
|
||||
* The list of exported class.
|
||||
*
|
||||
* Copyright 2002 Hidenori Takeshima
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include "winbase.h"
|
||||
#include "winuser.h"
|
||||
#include "wingdi.h"
|
||||
#include "ole2.h"
|
||||
#include "oleauto.h"
|
||||
|
||||
#include "wine/obj_webbrowser.h"
|
||||
|
||||
#include "wine/debug.h"
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(shdocvw);
|
||||
|
||||
#include "shdocvw.h"
|
||||
|
||||
|
||||
const COMIMPL_CLASSENTRY COMIMPL_ClassList[] =
|
||||
{
|
||||
{ &CLSID_WebBrowser, &CWebBrowserImpl_AllocObj },
|
||||
{ NULL, NULL } /* the last entry must be NULL */
|
||||
};
|
||||
|
|
@ -1,6 +1,7 @@
|
|||
/*
|
||||
* Header includes for shdocvw.dll
|
||||
*
|
||||
* Copyright 2001 John R. Sheets (for CodeWeavers)
|
||||
* Copyright 2002 Hidenori Takeshima
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
|
@ -17,18 +18,190 @@
|
|||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#ifndef WINE_SHDOCVW_H
|
||||
#define WINE_SHDOCVW_H
|
||||
#ifndef __WINE_SHDOCVW_H
|
||||
#define __WINE_SHDOCVW_H
|
||||
|
||||
#include "comimpl.h"
|
||||
/* FIXME: Is there a better way to deal with all these includes? */
|
||||
#include "wingdi.h"
|
||||
#include "winbase.h"
|
||||
#include "winuser.h"
|
||||
|
||||
HRESULT CWebBrowserImpl_AllocObj(IUnknown* punkOuter,void** ppobj);
|
||||
HRESULT CConnectionPointImpl_AllocObj(IUnknown* punkOuter,void** ppobj);
|
||||
#include "wine/obj_base.h"
|
||||
#include "wine/obj_storage.h"
|
||||
#include "wine/obj_misc.h"
|
||||
#include "wine/obj_moniker.h"
|
||||
#include "wine/obj_inplace.h"
|
||||
#include "wine/obj_dataobject.h"
|
||||
#include "wine/obj_oleobj.h"
|
||||
#include "wine/obj_oleaut.h"
|
||||
#include "wine/obj_olefont.h"
|
||||
#include "wine/obj_dragdrop.h"
|
||||
#include "wine/obj_oleview.h"
|
||||
#include "wine/obj_control.h"
|
||||
#include "wine/obj_connection.h"
|
||||
#include "wine/obj_property.h"
|
||||
#include "wine/obj_oleundo.h"
|
||||
#include "wine/obj_webbrowser.h"
|
||||
|
||||
/**********************************************************************
|
||||
* IClassFactory declaration for SHDOCVW.DLL
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
/* IUnknown fields */
|
||||
ICOM_VFIELD(IClassFactory);
|
||||
DWORD ref;
|
||||
} IClassFactoryImpl;
|
||||
|
||||
extern IClassFactoryImpl SHDOCVW_ClassFactory;
|
||||
|
||||
|
||||
/* FIXME - move to header... */
|
||||
/**********************************************************************
|
||||
* IOleObject declaration for SHDOCVW.DLL
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
/* IUnknown fields */
|
||||
ICOM_VFIELD(IOleObject);
|
||||
DWORD ref;
|
||||
} IOleObjectImpl;
|
||||
|
||||
extern IOleObjectImpl SHDOCVW_OleObject;
|
||||
|
||||
|
||||
/**********************************************************************
|
||||
* IOleInPlaceObject declaration for SHDOCVW.DLL
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
/* IUnknown fields */
|
||||
ICOM_VFIELD(IOleInPlaceObject);
|
||||
DWORD ref;
|
||||
} IOleInPlaceObjectImpl;
|
||||
|
||||
extern IOleInPlaceObjectImpl SHDOCVW_OleInPlaceObject;
|
||||
|
||||
|
||||
/**********************************************************************
|
||||
* IOleControl declaration for SHDOCVW.DLL
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
/* IUnknown fields */
|
||||
ICOM_VFIELD(IOleControl);
|
||||
DWORD ref;
|
||||
} IOleControlImpl;
|
||||
|
||||
extern IOleControlImpl SHDOCVW_OleControl;
|
||||
|
||||
|
||||
/**********************************************************************
|
||||
* IWebBrowser declaration for SHDOCVW.DLL
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
/* IUnknown fields */
|
||||
ICOM_VFIELD(IWebBrowser);
|
||||
DWORD ref;
|
||||
} IWebBrowserImpl;
|
||||
|
||||
extern IWebBrowserImpl SHDOCVW_WebBrowser;
|
||||
|
||||
|
||||
/**********************************************************************
|
||||
* IProvideClassInfo declaration for SHDOCVW.DLL
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
/* IUnknown fields */
|
||||
ICOM_VFIELD(IProvideClassInfo);
|
||||
DWORD ref;
|
||||
} IProvideClassInfoImpl;
|
||||
|
||||
extern IProvideClassInfoImpl SHDOCVW_ProvideClassInfo;
|
||||
|
||||
|
||||
/**********************************************************************
|
||||
* IProvideClassInfo2 declaration for SHDOCVW.DLL
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
/* IUnknown fields */
|
||||
ICOM_VFIELD(IProvideClassInfo2);
|
||||
DWORD ref;
|
||||
} IProvideClassInfo2Impl;
|
||||
|
||||
extern IProvideClassInfo2Impl SHDOCVW_ProvideClassInfo2;
|
||||
|
||||
|
||||
/**********************************************************************
|
||||
* IPersistStorage declaration for SHDOCVW.DLL
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
/* IUnknown fields */
|
||||
ICOM_VFIELD(IPersistStorage);
|
||||
DWORD ref;
|
||||
} IPersistStorageImpl;
|
||||
|
||||
extern IPersistStorageImpl SHDOCVW_PersistStorage;
|
||||
|
||||
|
||||
/**********************************************************************
|
||||
* IPersistStreamInit declaration for SHDOCVW.DLL
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
/* IUnknown fields */
|
||||
ICOM_VFIELD(IPersistStreamInit);
|
||||
DWORD ref;
|
||||
} IPersistStreamInitImpl;
|
||||
|
||||
extern IPersistStreamInitImpl SHDOCVW_PersistStreamInit;
|
||||
|
||||
|
||||
/**********************************************************************
|
||||
* IQuickActivate declaration for SHDOCVW.DLL
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
/* IUnknown fields */
|
||||
ICOM_VFIELD(IQuickActivate);
|
||||
DWORD ref;
|
||||
} IQuickActivateImpl;
|
||||
|
||||
extern IQuickActivateImpl SHDOCVW_QuickActivate;
|
||||
|
||||
|
||||
/**********************************************************************
|
||||
* IConnectionPointContainer declaration for SHDOCVW.DLL
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
/* IUnknown fields */
|
||||
ICOM_VFIELD(IConnectionPointContainer);
|
||||
DWORD ref;
|
||||
} IConnectionPointContainerImpl;
|
||||
|
||||
extern IConnectionPointContainerImpl SHDOCVW_ConnectionPointContainer;
|
||||
|
||||
|
||||
/**********************************************************************
|
||||
* IConnectionPoint declaration for SHDOCVW.DLL
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
/* IUnknown fields */
|
||||
ICOM_VFIELD(IConnectionPoint);
|
||||
DWORD ref;
|
||||
} IConnectionPointImpl;
|
||||
|
||||
extern IConnectionPointImpl SHDOCVW_ConnectionPoint;
|
||||
|
||||
|
||||
/* Other stuff.. */
|
||||
|
||||
DEFINE_GUID(IID_INotifyDBEvents,
|
||||
0xdb526cc0, 0xd188, 0x11cd, 0xad, 0x48, 0x0, 0xaa, 0x0, 0x3c, 0x9c, 0xb6);
|
||||
|
||||
|
||||
#endif /* WINE_SHDOCVW_H */
|
||||
#endif /* __WINE_SHDOCVW_H */
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
name shdocvw
|
||||
type win32
|
||||
init SHDOCVW_DllMain
|
||||
|
||||
import ole32.dll
|
||||
import kernel32.dll
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
/*
|
||||
* SHDOCVW - Internet Explorer Web Control
|
||||
* FIXME - stub
|
||||
* SHDOCVW - Internet Explorer Web Control
|
||||
*
|
||||
* Copyright 2001 John R. Sheets (for CodeWeavers)
|
||||
*
|
||||
|
@ -21,6 +20,7 @@
|
|||
|
||||
#include <string.h>
|
||||
#include "winreg.h"
|
||||
#include "initguid.h"
|
||||
#include "ole2.h"
|
||||
#include "shlwapi.h"
|
||||
|
||||
|
@ -30,38 +30,67 @@
|
|||
WINE_DEFAULT_DEBUG_CHANNEL(shdocvw);
|
||||
|
||||
/***********************************************************************
|
||||
* DllGetVersion (SHDOCVW.@)
|
||||
* DllCanUnloadNow (SHDOCVW.109) */
|
||||
HRESULT WINAPI SHDOCVW_DllCanUnloadNow(void)
|
||||
{
|
||||
FIXME("(void): stub\n");
|
||||
|
||||
return S_FALSE;
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* DllGetClassObject (SHDOCVW.312)
|
||||
*/
|
||||
HRESULT WINAPI SHDOCVW_DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
|
||||
{
|
||||
TRACE("\n");
|
||||
|
||||
if (IsEqualGUID(&IID_IClassFactory, riid))
|
||||
{
|
||||
/* Pass back our shdocvw class factory */
|
||||
*ppv = (LPVOID)&SHDOCVW_ClassFactory;
|
||||
IClassFactory_AddRef((IClassFactory*)&SHDOCVW_ClassFactory);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
return CLASS_E_CLASSNOTAVAILABLE;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* DllGetVersion (SHDOCVW.113)
|
||||
*/
|
||||
HRESULT WINAPI SHDOCVW_DllGetVersion (DLLVERSIONINFO *pdvi)
|
||||
{
|
||||
FIXME("(void): stub\n");
|
||||
return E_NOTIMPL;
|
||||
return S_FALSE;
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* DllInstall (SHDOCVW.@)
|
||||
* DllInstall (SHDOCVW.114)
|
||||
*/
|
||||
HRESULT WINAPI SHDOCVW_DllInstall(BOOL bInstall, LPCWSTR cmdline)
|
||||
{
|
||||
FIXME("(%s, %s): stub!\n", bInstall ? "TRUE":"FALSE", debugstr_w(cmdline));
|
||||
FIXME("(%s, %s): stub!\n", bInstall ? "TRUE":"FALSE", debugstr_w(cmdline));
|
||||
|
||||
return E_NOTIMPL;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* DllRegisterServer (SHDOCVW.@)
|
||||
* DllRegisterServer (SHDOCVW.124)
|
||||
*/
|
||||
HRESULT WINAPI SHDOCVW_DllRegisterServer(void)
|
||||
HRESULT WINAPI SHDOCVW_DllRegisterServer()
|
||||
{
|
||||
FIXME("(), stub!\n");
|
||||
return E_NOTIMPL;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* DllUnregisterServer (SHDOCVW.@)
|
||||
* DllUnregisterServer (SHDOCVW.127)
|
||||
*/
|
||||
HRESULT WINAPI SHDOCVW_DllUnregisterServer(void)
|
||||
HRESULT WINAPI SHDOCVW_DllUnregisterServer()
|
||||
{
|
||||
FIXME("(), stub!\n");
|
||||
return E_NOTIMPL;
|
||||
return S_OK;
|
||||
}
|
||||
|
|
@ -0,0 +1,281 @@
|
|||
/*
|
||||
* Implementation of IWebBrowser interface for IE Web Browser control
|
||||
*
|
||||
* Copyright 2001 John R. Sheets (for CodeWeavers)
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include "wine/debug.h"
|
||||
#include "shdocvw.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(shdocvw);
|
||||
|
||||
/**********************************************************************
|
||||
* Implement the IWebBrowser interface
|
||||
*/
|
||||
|
||||
static HRESULT WINAPI WB_QueryInterface(LPWEBBROWSER iface, REFIID riid, LPVOID *ppobj)
|
||||
{
|
||||
ICOM_THIS(IWebBrowserImpl, iface);
|
||||
|
||||
FIXME("(%p)->(%s,%p),stub!\n", This, debugstr_guid(riid), ppobj);
|
||||
return E_NOINTERFACE;
|
||||
}
|
||||
|
||||
static ULONG WINAPI WB_AddRef(LPWEBBROWSER iface)
|
||||
{
|
||||
ICOM_THIS(IWebBrowserImpl, iface);
|
||||
|
||||
TRACE("\n");
|
||||
return ++(This->ref);
|
||||
}
|
||||
|
||||
static ULONG WINAPI WB_Release(LPWEBBROWSER iface)
|
||||
{
|
||||
ICOM_THIS(IWebBrowserImpl, iface);
|
||||
|
||||
/* static class, won't be freed */
|
||||
TRACE("\n");
|
||||
return --(This->ref);
|
||||
}
|
||||
|
||||
/* IDispatch methods */
|
||||
static HRESULT WINAPI WB_GetTypeInfoCount(LPWEBBROWSER iface, UINT *pctinfo)
|
||||
{
|
||||
FIXME("stub \n");
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI WB_GetTypeInfo(LPWEBBROWSER iface, UINT iTInfo, LCID lcid,
|
||||
LPTYPEINFO *ppTInfo)
|
||||
{
|
||||
FIXME("stub \n");
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI WB_GetIDsOfNames(LPWEBBROWSER iface, REFIID riid,
|
||||
LPOLESTR *rgszNames, UINT cNames,
|
||||
LCID lcid, DISPID *rgDispId)
|
||||
{
|
||||
FIXME("stub \n");
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI WB_Invoke(LPWEBBROWSER iface, DISPID dispIdMember,
|
||||
REFIID riid, LCID lcid, WORD wFlags,
|
||||
DISPPARAMS *pDispParams, VARIANT *pVarResult,
|
||||
EXCEPINFO *pExepInfo, UINT *puArgErr)
|
||||
{
|
||||
FIXME("stub dispIdMember = %d, IID = %s\n", (int)dispIdMember, debugstr_guid(riid));
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
/* IWebBrowser methods */
|
||||
static HRESULT WINAPI WB_GoBack(LPWEBBROWSER iface)
|
||||
{
|
||||
FIXME("stub \n");
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI WB_GoForward(LPWEBBROWSER iface)
|
||||
{
|
||||
FIXME("stub \n");
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI WB_GoHome(LPWEBBROWSER iface)
|
||||
{
|
||||
FIXME("stub \n");
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI WB_GoSearch(LPWEBBROWSER iface)
|
||||
{
|
||||
FIXME("stub \n");
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI WB_Navigate(LPWEBBROWSER iface, BSTR *URL,
|
||||
VARIANT *Flags, VARIANT *TargetFrameName,
|
||||
VARIANT *PostData, VARIANT *Headers)
|
||||
{
|
||||
FIXME("stub: URL = %p (%p, %p, %p, %p)\n", URL, Flags, TargetFrameName,
|
||||
PostData, Headers);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI WB_Refresh(LPWEBBROWSER iface)
|
||||
{
|
||||
FIXME("stub \n");
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI WB_Refresh2(LPWEBBROWSER iface, VARIANT *Level)
|
||||
{
|
||||
FIXME("stub: %p\n", Level);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI WB_Stop(LPWEBBROWSER iface)
|
||||
{
|
||||
FIXME("stub \n");
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI WB_get_Application(LPWEBBROWSER iface, LPVOID *ppDisp)
|
||||
{
|
||||
FIXME("stub \n");
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI WB_get_Parent(LPWEBBROWSER iface, LPVOID *ppDisp)
|
||||
{
|
||||
FIXME("stub \n");
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI WB_get_Container(LPWEBBROWSER iface, LPVOID *ppDisp)
|
||||
{
|
||||
FIXME("stub \n");
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI WB_get_Document(LPWEBBROWSER iface, LPVOID *ppDisp)
|
||||
{
|
||||
FIXME("stub \n");
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI WB_get_TopLevelContainer(LPWEBBROWSER iface, VARIANT *pBool)
|
||||
{
|
||||
FIXME("stub \n");
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI WB_get_Type(LPWEBBROWSER iface, BSTR *Type)
|
||||
{
|
||||
FIXME("stub \n");
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI WB_get_Left(LPWEBBROWSER iface, long *pl)
|
||||
{
|
||||
FIXME("stub \n");
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI WB_put_Left(LPWEBBROWSER iface, long Left)
|
||||
{
|
||||
FIXME("stub \n");
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI WB_get_Top(LPWEBBROWSER iface, long *pl)
|
||||
{
|
||||
FIXME("stub \n");
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI WB_put_Top(LPWEBBROWSER iface, long Top)
|
||||
{
|
||||
FIXME("stub \n");
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI WB_get_Width(LPWEBBROWSER iface, long *pl)
|
||||
{
|
||||
FIXME("stub \n");
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI WB_put_Width(LPWEBBROWSER iface, long Width)
|
||||
{
|
||||
FIXME("stub \n");
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI WB_get_Height(LPWEBBROWSER iface, long *pl)
|
||||
{
|
||||
FIXME("stub \n");
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI WB_put_Height(LPWEBBROWSER iface, long Height)
|
||||
{
|
||||
FIXME("stub \n");
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI WB_get_LocationName(LPWEBBROWSER iface, BSTR *LocationName)
|
||||
{
|
||||
FIXME("stub \n");
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI WB_get_LocationURL(LPWEBBROWSER iface, BSTR *LocationURL)
|
||||
{
|
||||
FIXME("stub \n");
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI WB_get_Busy(LPWEBBROWSER iface, VARIANT *pBool)
|
||||
{
|
||||
FIXME("stub \n");
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
/**********************************************************************
|
||||
* IWebBrowser virtual function table for IE Web Browser component
|
||||
*/
|
||||
|
||||
static ICOM_VTABLE(IWebBrowser) WB_Vtbl =
|
||||
{
|
||||
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
|
||||
WB_QueryInterface,
|
||||
WB_AddRef,
|
||||
WB_Release,
|
||||
WB_GetTypeInfoCount,
|
||||
WB_GetTypeInfo,
|
||||
WB_GetIDsOfNames,
|
||||
WB_Invoke,
|
||||
WB_GoBack,
|
||||
WB_GoForward,
|
||||
WB_GoHome,
|
||||
WB_GoSearch,
|
||||
WB_Navigate,
|
||||
WB_Refresh,
|
||||
WB_Refresh2,
|
||||
WB_Stop,
|
||||
WB_get_Application,
|
||||
WB_get_Parent,
|
||||
WB_get_Container,
|
||||
WB_get_Document,
|
||||
WB_get_TopLevelContainer,
|
||||
WB_get_Type,
|
||||
WB_get_Left,
|
||||
WB_put_Left,
|
||||
WB_get_Top,
|
||||
WB_put_Top,
|
||||
WB_get_Width,
|
||||
WB_put_Width,
|
||||
WB_get_Height,
|
||||
WB_put_Height,
|
||||
WB_get_LocationName,
|
||||
WB_get_LocationURL,
|
||||
WB_get_Busy
|
||||
};
|
||||
|
||||
IWebBrowserImpl SHDOCVW_WebBrowser = { &WB_Vtbl, 1 };
|
|
@ -3,14 +3,11 @@ TOPOBJDIR = ../..
|
|||
SRCDIR = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
MODULE = urlmon.dll
|
||||
EXTRALIBS = $(LIBUUID)
|
||||
|
||||
LDDLLFLAGS = @LDDLLFLAGS@
|
||||
SYMBOLFILE = $(MODULE).tmp.o
|
||||
|
||||
C_SRCS = \
|
||||
comimpl.c \
|
||||
moniker.c \
|
||||
umon.c \
|
||||
urlmon_main.c
|
||||
|
||||
|
|
|
@ -1,445 +0,0 @@
|
|||
/*
|
||||
* A basic implementation for COM DLL implementor.
|
||||
*
|
||||
* Copyright (C) 2002 Hidenori TAKESHIMA <hidenori@a2.ctktv.ne.jp>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "wine/port.h"
|
||||
|
||||
#include "windef.h"
|
||||
#include "winerror.h"
|
||||
#include "winbase.h"
|
||||
#include "wingdi.h"
|
||||
#include "winuser.h"
|
||||
#include "winnls.h"
|
||||
#include "ole2.h"
|
||||
|
||||
#include "wine/debug.h"
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(comimpl);
|
||||
|
||||
#include "comimpl.h"
|
||||
|
||||
/*
|
||||
- All threading model including Apartment and Both are supported.
|
||||
- Aggregation is supported.
|
||||
- CoFreeUnusedLibraries() is supported.
|
||||
- DisableThreadLibraryCalls() is supported.
|
||||
*/
|
||||
|
||||
static CRITICAL_SECTION csComImpl;
|
||||
static DWORD dwComImplRef;
|
||||
|
||||
|
||||
static HRESULT WINAPI
|
||||
IUnknown_fnQueryInterface(IUnknown* iface,REFIID riid,LPVOID *ppobj)
|
||||
{
|
||||
ICOM_THIS(COMIMPL_IUnkImpl,iface);
|
||||
size_t ofs;
|
||||
DWORD dwIndex;
|
||||
COMIMPL_IFDelegation* pDelegation;
|
||||
HRESULT hr;
|
||||
|
||||
TRACE("(%p)->(%s,%p)\n",This,debugstr_guid(riid),ppobj);
|
||||
|
||||
if ( ppobj == NULL )
|
||||
return E_POINTER;
|
||||
*ppobj = NULL;
|
||||
|
||||
ofs = 0;
|
||||
|
||||
if ( IsEqualGUID( &IID_IUnknown, riid ) )
|
||||
{
|
||||
TRACE("IID_IUnknown - returns inner object.\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
for ( dwIndex = 0; dwIndex < This->dwEntries; dwIndex++ )
|
||||
{
|
||||
if ( IsEqualGUID( This->pEntries[dwIndex].piid, riid ) )
|
||||
{
|
||||
ofs = This->pEntries[dwIndex].ofsVTPtr;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if ( dwIndex == This->dwEntries )
|
||||
{
|
||||
hr = E_NOINTERFACE;
|
||||
|
||||
/* delegation */
|
||||
pDelegation = This->pDelegationFirst;
|
||||
while ( pDelegation != NULL )
|
||||
{
|
||||
hr = (*pDelegation->pOnQueryInterface)( iface, riid, ppobj );
|
||||
if ( hr != E_NOINTERFACE )
|
||||
break;
|
||||
pDelegation = pDelegation->pNext;
|
||||
}
|
||||
|
||||
if ( hr == E_NOINTERFACE )
|
||||
{
|
||||
FIXME("(%p) unknown interface: %s\n",This,debugstr_guid(riid));
|
||||
}
|
||||
|
||||
return hr;
|
||||
}
|
||||
}
|
||||
|
||||
*ppobj = (LPVOID)(((char*)This) + ofs);
|
||||
IUnknown_AddRef((IUnknown*)(*ppobj));
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static ULONG WINAPI
|
||||
IUnknown_fnAddRef(IUnknown* iface)
|
||||
{
|
||||
ICOM_THIS(COMIMPL_IUnkImpl,iface);
|
||||
|
||||
TRACE("(%p)->()\n",This);
|
||||
|
||||
return InterlockedExchangeAdd(&(This->ref),1) + 1;
|
||||
}
|
||||
|
||||
static ULONG WINAPI
|
||||
IUnknown_fnRelease(IUnknown* iface)
|
||||
{
|
||||
ICOM_THIS(COMIMPL_IUnkImpl,iface);
|
||||
LONG ref;
|
||||
|
||||
TRACE("(%p)->()\n",This);
|
||||
ref = InterlockedExchangeAdd(&(This->ref),-1) - 1;
|
||||
if ( ref > 0 )
|
||||
return (ULONG)ref;
|
||||
|
||||
This->ref ++;
|
||||
if ( This->pOnFinalRelease != NULL )
|
||||
(*(This->pOnFinalRelease))(iface);
|
||||
This->ref --;
|
||||
|
||||
COMIMPL_FreeObj(This);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static ICOM_VTABLE(IUnknown) iunknown =
|
||||
{
|
||||
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
|
||||
/* IUnknown fields */
|
||||
IUnknown_fnQueryInterface,
|
||||
IUnknown_fnAddRef,
|
||||
IUnknown_fnRelease,
|
||||
};
|
||||
|
||||
|
||||
void COMIMPL_IUnkInit( COMIMPL_IUnkImpl* pImpl, IUnknown* punkOuter )
|
||||
{
|
||||
TRACE("(%p)\n",pImpl);
|
||||
|
||||
ICOM_VTBL(pImpl) = &iunknown;
|
||||
pImpl->pEntries = NULL;
|
||||
pImpl->dwEntries = 0;
|
||||
pImpl->pDelegationFirst = NULL;
|
||||
pImpl->pOnFinalRelease = NULL;
|
||||
pImpl->ref = 1;
|
||||
pImpl->punkControl = (IUnknown*)pImpl;
|
||||
|
||||
/* for implementing aggregation. */
|
||||
if ( punkOuter != NULL )
|
||||
pImpl->punkControl = punkOuter;
|
||||
}
|
||||
|
||||
void COMIMPL_IUnkAddDelegationHandler(
|
||||
COMIMPL_IUnkImpl* pImpl, COMIMPL_IFDelegation* pDelegation )
|
||||
{
|
||||
pDelegation->pNext = pImpl->pDelegationFirst;
|
||||
pImpl->pDelegationFirst = pDelegation;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
|
||||
|
||||
static HRESULT WINAPI
|
||||
IClassFactory_fnQueryInterface(LPCLASSFACTORY iface,REFIID riid,LPVOID *ppobj);
|
||||
static ULONG WINAPI IClassFactory_fnAddRef(LPCLASSFACTORY iface);
|
||||
static ULONG WINAPI IClassFactory_fnRelease(LPCLASSFACTORY iface);
|
||||
static HRESULT WINAPI IClassFactory_fnCreateInstance(LPCLASSFACTORY iface,LPUNKNOWN pOuter,REFIID riid,LPVOID *ppobj);
|
||||
static HRESULT WINAPI IClassFactory_fnLockServer(LPCLASSFACTORY iface,BOOL dolock);
|
||||
|
||||
static ICOM_VTABLE(IClassFactory) iclassfact =
|
||||
{
|
||||
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
|
||||
IClassFactory_fnQueryInterface,
|
||||
IClassFactory_fnAddRef,
|
||||
IClassFactory_fnRelease,
|
||||
IClassFactory_fnCreateInstance,
|
||||
IClassFactory_fnLockServer
|
||||
};
|
||||
|
||||
typedef struct
|
||||
{
|
||||
/* IUnknown fields */
|
||||
ICOM_VFIELD(IClassFactory);
|
||||
LONG ref;
|
||||
/* IClassFactory fields */
|
||||
const COMIMPL_CLASSENTRY* pEntry;
|
||||
} IClassFactoryImpl;
|
||||
|
||||
|
||||
static HRESULT WINAPI
|
||||
IClassFactory_fnQueryInterface(LPCLASSFACTORY iface,REFIID riid,LPVOID *ppobj)
|
||||
{
|
||||
ICOM_THIS(IClassFactoryImpl,iface);
|
||||
|
||||
TRACE("(%p)->(%p,%p)\n",This,riid,ppobj);
|
||||
if ( ( IsEqualGUID( &IID_IUnknown, riid ) ) ||
|
||||
( IsEqualGUID( &IID_IClassFactory, riid ) ) )
|
||||
{
|
||||
*ppobj = iface;
|
||||
IClassFactory_AddRef(iface);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
return E_NOINTERFACE;
|
||||
}
|
||||
|
||||
static ULONG WINAPI IClassFactory_fnAddRef(LPCLASSFACTORY iface)
|
||||
{
|
||||
ICOM_THIS(IClassFactoryImpl,iface);
|
||||
|
||||
TRACE("(%p)->()\n",This);
|
||||
|
||||
return InterlockedExchangeAdd(&(This->ref),1) + 1;
|
||||
}
|
||||
|
||||
static ULONG WINAPI IClassFactory_fnRelease(LPCLASSFACTORY iface)
|
||||
{
|
||||
ICOM_THIS(IClassFactoryImpl,iface);
|
||||
LONG ref;
|
||||
|
||||
TRACE("(%p)->()\n",This);
|
||||
ref = InterlockedExchangeAdd(&(This->ref),-1) - 1;
|
||||
if ( ref > 0 )
|
||||
return (ULONG)ref;
|
||||
|
||||
COMIMPL_FreeObj(This);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IClassFactory_fnCreateInstance(LPCLASSFACTORY iface,LPUNKNOWN pOuter,REFIID riid,LPVOID *ppobj)
|
||||
{
|
||||
ICOM_THIS(IClassFactoryImpl,iface);
|
||||
HRESULT hr;
|
||||
IUnknown* punk;
|
||||
|
||||
TRACE("(%p)->(%p,%s,%p)\n",This,pOuter,debugstr_guid(riid),ppobj);
|
||||
|
||||
if ( ppobj == NULL )
|
||||
return E_POINTER;
|
||||
if ( pOuter != NULL && !IsEqualGUID( riid, &IID_IUnknown ) )
|
||||
return CLASS_E_NOAGGREGATION;
|
||||
|
||||
*ppobj = NULL;
|
||||
|
||||
hr = (*This->pEntry->pCreateIUnk)(pOuter,(void**)&punk);
|
||||
if ( hr != S_OK )
|
||||
return hr;
|
||||
|
||||
hr = IUnknown_QueryInterface(punk,riid,ppobj);
|
||||
IUnknown_Release(punk);
|
||||
|
||||
return hr;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IClassFactory_fnLockServer(LPCLASSFACTORY iface,BOOL dolock)
|
||||
{
|
||||
ICOM_THIS(IClassFactoryImpl,iface);
|
||||
HRESULT hr;
|
||||
|
||||
TRACE("(%p)->(%d)\n",This,dolock);
|
||||
if (dolock)
|
||||
hr = IClassFactory_AddRef(iface);
|
||||
else
|
||||
hr = IClassFactory_Release(iface);
|
||||
|
||||
return hr;
|
||||
}
|
||||
|
||||
|
||||
|
||||
static HRESULT IClassFactory_Alloc( const CLSID* pclsid, void** ppobj )
|
||||
{
|
||||
const COMIMPL_CLASSENTRY* pEntry;
|
||||
IClassFactoryImpl* pImpl;
|
||||
|
||||
TRACE( "(%s,%p)\n", debugstr_guid(pclsid), ppobj );
|
||||
|
||||
pEntry = COMIMPL_ClassList;
|
||||
while ( pEntry->pclsid != NULL )
|
||||
{
|
||||
if ( IsEqualGUID( pclsid, pEntry->pclsid ) )
|
||||
goto found;
|
||||
pEntry ++;
|
||||
}
|
||||
|
||||
return CLASS_E_CLASSNOTAVAILABLE;
|
||||
found:
|
||||
pImpl = (IClassFactoryImpl*)COMIMPL_AllocObj( sizeof(IClassFactoryImpl) );
|
||||
if ( pImpl == NULL )
|
||||
return E_OUTOFMEMORY;
|
||||
|
||||
TRACE( "allocated successfully.\n" );
|
||||
|
||||
ICOM_VTBL(pImpl) = &iclassfact;
|
||||
pImpl->ref = 1;
|
||||
pImpl->pEntry = pEntry;
|
||||
|
||||
*ppobj = (void*)pImpl;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* COMIMPL_InitProcess (internal)
|
||||
*/
|
||||
static BOOL COMIMPL_InitProcess( HINSTANCE hInstDLL )
|
||||
{
|
||||
TRACE("()\n");
|
||||
|
||||
dwComImplRef = 0;
|
||||
InitializeCriticalSection( &csComImpl );
|
||||
|
||||
#ifndef COMIMPL_PERTHREAD_INIT
|
||||
DisableThreadLibraryCalls((HMODULE)hInstDLL);
|
||||
#endif /* COMIMPL_PERTHREAD_INIT */
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* COMIMPL_UninitProcess (internal)
|
||||
*/
|
||||
static void COMIMPL_UninitProcess( HINSTANCE hInstDLL )
|
||||
{
|
||||
CHAR szThisDLL[ MAX_PATH ];
|
||||
|
||||
TRACE("()\n");
|
||||
|
||||
if ( dwComImplRef != 0 )
|
||||
{
|
||||
szThisDLL[0] = '\0';
|
||||
if ( !GetModuleFileNameA( (HMODULE)hInstDLL, szThisDLL, MAX_PATH ) )
|
||||
szThisDLL[0] = '\0';
|
||||
ERR( "you must release some objects allocated from %s.\n", szThisDLL );
|
||||
}
|
||||
DeleteCriticalSection( &csComImpl );
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* URLMON_DllMain
|
||||
*/
|
||||
BOOL WINAPI URLMON_DllMain(
|
||||
HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpvReserved )
|
||||
{
|
||||
TRACE("(%08x,%08lx,%p)\n",hInstDLL,fdwReason,lpvReserved);
|
||||
|
||||
switch ( fdwReason )
|
||||
{
|
||||
case DLL_PROCESS_ATTACH:
|
||||
if ( !COMIMPL_InitProcess( hInstDLL ) )
|
||||
return FALSE;
|
||||
break;
|
||||
case DLL_PROCESS_DETACH:
|
||||
COMIMPL_UninitProcess( hInstDLL );
|
||||
break;
|
||||
case DLL_THREAD_ATTACH:
|
||||
break;
|
||||
case DLL_THREAD_DETACH:
|
||||
break;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* DllGetClassObject (URLMON.@)
|
||||
*/
|
||||
HRESULT WINAPI URLMON_DllGetClassObject(
|
||||
const CLSID* pclsid,const IID* piid,void** ppv)
|
||||
{
|
||||
*ppv = NULL;
|
||||
if ( IsEqualGUID( &IID_IUnknown, piid ) ||
|
||||
IsEqualGUID( &IID_IClassFactory, piid ) )
|
||||
{
|
||||
return IClassFactory_Alloc( pclsid, ppv );
|
||||
}
|
||||
|
||||
return CLASS_E_CLASSNOTAVAILABLE;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* DllCanUnloadNow (URLMON.@)
|
||||
*
|
||||
* RETURNS
|
||||
* Success: S_OK
|
||||
* Failure: S_FALSE
|
||||
*/
|
||||
HRESULT WINAPI URLMON_DllCanUnloadNow(void)
|
||||
{
|
||||
HRESULT hr;
|
||||
|
||||
EnterCriticalSection( &csComImpl );
|
||||
hr = ( dwComImplRef == 0 ) ? S_OK : S_FALSE;
|
||||
LeaveCriticalSection( &csComImpl );
|
||||
|
||||
return hr;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* COMIMPL_AllocObj
|
||||
*/
|
||||
void* COMIMPL_AllocObj( DWORD dwSize )
|
||||
{
|
||||
void* pv;
|
||||
|
||||
EnterCriticalSection( &csComImpl );
|
||||
dwComImplRef ++;
|
||||
pv = HeapAlloc( COMIMPL_hHeap, 0, dwSize );
|
||||
if ( pv == NULL )
|
||||
dwComImplRef --;
|
||||
LeaveCriticalSection( &csComImpl );
|
||||
|
||||
return pv;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* COMIMPL_FreeObj
|
||||
*/
|
||||
void COMIMPL_FreeObj( void* pobj )
|
||||
{
|
||||
EnterCriticalSection( &csComImpl );
|
||||
HeapFree( COMIMPL_hHeap, 0, pobj );
|
||||
dwComImplRef --;
|
||||
LeaveCriticalSection( &csComImpl );
|
||||
}
|
||||
|
|
@ -1,171 +0,0 @@
|
|||
/*
|
||||
* A basic implementation for COM DLL implementor.
|
||||
*
|
||||
* Copyright (C) 2002 Hidenori TAKESHIMA <hidenori@a2.ctktv.ne.jp>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#ifndef WINE_COMIMPL_H
|
||||
#define WINE_COMIMPL_H
|
||||
|
||||
/*
|
||||
This code provides a basic thread-safe COM implementation
|
||||
including aggregation(and an IClassFactory implementation).
|
||||
This code is based on my quartz code.
|
||||
|
||||
The usage of this library is:
|
||||
|
||||
1) copy comimpl.h and comimpl.c.
|
||||
2) implement the global class entries 'COMIMPL_ClassList'.
|
||||
3) export COMIMPL_DllMain, COMIMPL_DllGetClassObject and
|
||||
COMIMPL_DllCanUnloadNow.
|
||||
4) add 'comimpl' to your debug channels.
|
||||
5) implement your IUnknown as a thunk to call
|
||||
COMIMPL_IUnkImpl.punk methods.
|
||||
6) provide pointers of vtables in constructor.
|
||||
7) optionally, you can edit comimpl.h and/or comimpl.c.
|
||||
|
||||
A sample allocator of class COne that supports
|
||||
two interface IOne and ITwo is:
|
||||
|
||||
const COMIMPL_CLASSENTRY COMIMPL_ClassList[] =
|
||||
{
|
||||
{ &CLSID_COne, &COne_AllocObj },
|
||||
{ NULL, NULL } << the last entry must be NULL >>
|
||||
};
|
||||
|
||||
typedef struct COne
|
||||
{
|
||||
COMIMPL_IUnkImpl vfunk; << must be the first member of this struct >>
|
||||
struct { ICOM_VFIELD(IOne); } vfone;
|
||||
struct { ICOM_VFIELD(ITwo); } vftwo;
|
||||
<< ... >>
|
||||
} COne;
|
||||
#define COne_THIS(iface,member) COne* This = ((COne*)(((char*)iface)-offsetof(COne,member)))
|
||||
|
||||
static COMIMPL_IFEntry IFEntries[] =
|
||||
{
|
||||
<< all supported interfaces >>
|
||||
{ &IID_IOne, offsetof(COne,vfone)-offsetof(COne,vfunk) },
|
||||
{ &IID_ITwo, offsetof(COne,vftwo)-offsetof(COne,vfunk) },
|
||||
};
|
||||
|
||||
static void COne_Destructor(IUnknown* iface)
|
||||
{
|
||||
COne_THIS(iface,vfunk);
|
||||
|
||||
<< ... implement destructor ... >>
|
||||
}
|
||||
|
||||
HRESULT COne_AllocObj(IUnknown* punkOuter,void** ppobj)
|
||||
{
|
||||
COne* This;
|
||||
|
||||
This = (COne*)COMIMPL_AllocObj( sizeof(COne) );
|
||||
if ( This == NULL ) return E_OUTOFMEMORY;
|
||||
COMIMPL_IUnkInit( &This->vfunk, punkOuter );
|
||||
This->vfunk.pEntries = IFEntries;
|
||||
This->vfunk.dwEntries = sizeof(IFEntries)/sizeof(IFEntries[0]);
|
||||
This->vfunk.pOnFinalRelease = COne_Destructor;
|
||||
|
||||
ICOM_VTBL(&This->vfone) = &ione;
|
||||
ICOM_VTBL(&This->vftwo) = &itwo;
|
||||
|
||||
<< ... implement constructor ... >>
|
||||
<< if error occurs in constructing, you can call simply
|
||||
punk::Release() and return HRESULT. >>
|
||||
|
||||
*ppobj = (void*)(&This->vfunk);
|
||||
|
||||
return S_OK; << return S_OK if succeeded >>
|
||||
}
|
||||
*/
|
||||
|
||||
/* if per-thread initialization is needed, uncomment the following line */
|
||||
/*#define COMIMPL_PERTHREAD_INIT*/
|
||||
/* If an own heap is needed, customize the following line */
|
||||
#define COMIMPL_hHeap GetProcessHeap()
|
||||
|
||||
|
||||
typedef HRESULT (*COMIMPL_pCreateIUnknown)(IUnknown* punkOuter,void** ppobj);
|
||||
typedef void (*COMIMPL_pOnFinalRelease)(IUnknown* punkInner);
|
||||
|
||||
typedef struct COMIMPL_IFEntry COMIMPL_IFEntry;
|
||||
typedef struct COMIMPL_IFDelegation COMIMPL_IFDelegation;
|
||||
typedef struct COMIMPL_IUnkImpl COMIMPL_IUnkImpl;
|
||||
|
||||
struct COMIMPL_IFEntry
|
||||
{
|
||||
const IID* piid; /* interface ID. */
|
||||
size_t ofsVTPtr; /* offset from IUnknown. */
|
||||
};
|
||||
|
||||
struct COMIMPL_IFDelegation
|
||||
{
|
||||
struct COMIMPL_IFDelegation* pNext;
|
||||
HRESULT (*pOnQueryInterface)(
|
||||
IUnknown* punk, const IID* piid, void** ppobj );
|
||||
};
|
||||
|
||||
/* COMIMPL_IUnkimpl must be aligned for InterlockedExchangeAdd. */
|
||||
#include <pshpack4.h>
|
||||
|
||||
struct COMIMPL_IUnkImpl
|
||||
{
|
||||
/* pointer of IUnknown interface. */
|
||||
ICOM_VFIELD(IUnknown);
|
||||
|
||||
/* array of supported IIDs and offsets. */
|
||||
const COMIMPL_IFEntry* pEntries;
|
||||
DWORD dwEntries;
|
||||
/* list of delegation handlers. */
|
||||
COMIMPL_IFDelegation* pDelegationFirst;
|
||||
/* called on final release. */
|
||||
COMIMPL_pOnFinalRelease pOnFinalRelease;
|
||||
|
||||
/* IUnknown fields. */
|
||||
LONG ref;
|
||||
IUnknown* punkControl;
|
||||
};
|
||||
|
||||
#include <poppack.h>
|
||||
|
||||
typedef struct COMIMPL_CLASSENTRY
|
||||
{
|
||||
const CLSID* pclsid;
|
||||
COMIMPL_pCreateIUnknown pCreateIUnk;
|
||||
} COMIMPL_CLASSENTRY;
|
||||
|
||||
|
||||
extern const COMIMPL_CLASSENTRY COMIMPL_ClassList[]; /* must be provided */
|
||||
|
||||
void COMIMPL_IUnkInit( COMIMPL_IUnkImpl* pImpl, IUnknown* punkOuter );
|
||||
void COMIMPL_IUnkAddDelegationHandler(
|
||||
COMIMPL_IUnkImpl* pImpl, COMIMPL_IFDelegation* pDelegation );
|
||||
|
||||
BOOL WINAPI COMIMPL_DllMain(
|
||||
HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpvReserved );
|
||||
HRESULT WINAPI COMIMPL_DllGetClassObject(
|
||||
const CLSID* pclsid,const IID* piid,void** ppv);
|
||||
HRESULT WINAPI COMIMPL_DllCanUnloadNow(void);
|
||||
|
||||
void* COMIMPL_AllocObj( DWORD dwSize );
|
||||
void COMIMPL_FreeObj( void* pobj ); /* for internal use only. */
|
||||
|
||||
|
||||
|
||||
|
||||
#endif /* WINE_COMIMPL_H */
|
|
@ -1,446 +0,0 @@
|
|||
/*
|
||||
* URL Moniker
|
||||
*
|
||||
* FIXME - stub
|
||||
*
|
||||
* Copyright (C) 2002 Hidenori TAKESHIMA <hidenori@a2.ctktv.ne.jp>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include "windef.h"
|
||||
#include "winerror.h"
|
||||
#include "winbase.h"
|
||||
#include "wingdi.h"
|
||||
#include "winuser.h"
|
||||
#include "ole2.h"
|
||||
#include "urlmon.h"
|
||||
|
||||
#include "wine/debug.h"
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(comimpl);
|
||||
|
||||
#include "comimpl.h"
|
||||
|
||||
|
||||
/*
|
||||
* NOTE:
|
||||
* URL Moniker supports the following protocols(at least):
|
||||
*
|
||||
* CLSID_HttpProtocol
|
||||
* CLSID_FtpProtocol
|
||||
* CLSID_GopherProtocol
|
||||
* CLSID_HttpSProtocol
|
||||
* CLSID_FileProtocol
|
||||
*
|
||||
*/
|
||||
|
||||
typedef struct CURLMonikerImpl
|
||||
{
|
||||
COMIMPL_IUnkImpl vfunk;
|
||||
struct { ICOM_VFIELD(IMoniker); } moniker;
|
||||
struct { ICOM_VFIELD(IROTData); } rotd;
|
||||
|
||||
/* IMoniker stuffs */
|
||||
} CURLMonikerImpl;
|
||||
|
||||
#define CURLMonikerImpl_THIS(iface,member) CURLMonikerImpl* This = ((CURLMonikerImpl*)(((char*)iface)-offsetof(CURLMonikerImpl,member)))
|
||||
|
||||
|
||||
static HRESULT WINAPI
|
||||
IMoniker_fnQueryInterface(IMoniker* iface,REFIID riid,void** ppobj)
|
||||
{
|
||||
CURLMonikerImpl_THIS(iface,moniker);
|
||||
|
||||
TRACE("(%p)->()\n",This);
|
||||
|
||||
return IUnknown_QueryInterface(This->vfunk.punkControl,riid,ppobj);
|
||||
}
|
||||
|
||||
static ULONG WINAPI
|
||||
IMoniker_fnAddRef(IMoniker* iface)
|
||||
{
|
||||
CURLMonikerImpl_THIS(iface,moniker);
|
||||
|
||||
TRACE("(%p)->()\n",This);
|
||||
|
||||
return IUnknown_AddRef(This->vfunk.punkControl);
|
||||
}
|
||||
|
||||
static ULONG WINAPI
|
||||
IMoniker_fnRelease(IMoniker* iface)
|
||||
{
|
||||
CURLMonikerImpl_THIS(iface,moniker);
|
||||
|
||||
TRACE("(%p)->()\n",This);
|
||||
|
||||
return IUnknown_Release(This->vfunk.punkControl);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IMoniker_fnGetClassID(IMoniker* iface, CLSID *pClassID)
|
||||
{
|
||||
CURLMonikerImpl_THIS(iface,moniker);
|
||||
|
||||
FIXME("(%p)->() stub\n",This);
|
||||
|
||||
return E_NOTIMPL;
|
||||
#if 0
|
||||
TRACE("(%p)->()\n",This);
|
||||
|
||||
if ( pClassID == NULL )
|
||||
return E_POINTER;
|
||||
memcpy( pClassID, &CLSID_StdURLMoniker, sizeof(CLSID) );
|
||||
|
||||
return NOERROR;
|
||||
#endif
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IMoniker_fnIsDirty(IMoniker* iface)
|
||||
{
|
||||
CURLMonikerImpl_THIS(iface,moniker);
|
||||
|
||||
FIXME("(%p)->() stub!\n",This);
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IMoniker_fnLoad(IMoniker* iface, IStream* pStm)
|
||||
{
|
||||
CURLMonikerImpl_THIS(iface,moniker);
|
||||
|
||||
FIXME("(%p)->() stub!\n",This);
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IMoniker_fnSave(IMoniker* iface, IStream* pStm, BOOL fClearDirty)
|
||||
{
|
||||
CURLMonikerImpl_THIS(iface,moniker);
|
||||
|
||||
FIXME("(%p)->() stub!\n",This);
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IMoniker_fnGetSizeMax(IMoniker* iface, ULARGE_INTEGER* pcbSize)
|
||||
{
|
||||
CURLMonikerImpl_THIS(iface,moniker);
|
||||
|
||||
FIXME("(%p)->() stub!\n",This);
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IMoniker_fnBindToObject(IMoniker* iface,IBindCtx* pbc, IMoniker* pmkToLeft, REFIID riid, VOID** ppvResult)
|
||||
{
|
||||
CURLMonikerImpl_THIS(iface,moniker);
|
||||
|
||||
FIXME("(%p)->(%p,%p,%s,%p)\n",This,
|
||||
pbc,pmkToLeft,debugstr_guid(riid),ppvResult);
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IMoniker_fnBindToStorage(IMoniker* iface,IBindCtx* pbc, IMoniker* pmkToLeft, REFIID riid, VOID** ppvResult)
|
||||
{
|
||||
CURLMonikerImpl_THIS(iface,moniker);
|
||||
|
||||
FIXME("(%p)->(%p,%p,%s,%p)\n",This,
|
||||
pbc,pmkToLeft,debugstr_guid(riid),ppvResult);
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IMoniker_fnReduce(IMoniker* iface,IBindCtx* pbc, DWORD dwReduceHowFar,IMoniker** ppmkToLeft, IMoniker** ppmkReduced)
|
||||
{
|
||||
CURLMonikerImpl_THIS(iface,moniker);
|
||||
|
||||
FIXME("(%p)->() stub!\n",This);
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IMoniker_fnComposeWith(IMoniker* iface,IMoniker* pmkRight,BOOL fOnlyIfNotGeneric, IMoniker** ppmkComposite)
|
||||
{
|
||||
CURLMonikerImpl_THIS(iface,moniker);
|
||||
|
||||
FIXME("(%p)->() stub!\n",This);
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IMoniker_fnEnum(IMoniker* iface,BOOL fForward, IEnumMoniker** ppenumMoniker)
|
||||
{
|
||||
CURLMonikerImpl_THIS(iface,moniker);
|
||||
|
||||
FIXME("(%p)->() stub!\n",This);
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IMoniker_fnIsEqual(IMoniker* iface,IMoniker* pmkOtherMoniker)
|
||||
{
|
||||
CURLMonikerImpl_THIS(iface,moniker);
|
||||
|
||||
FIXME("(%p)->() stub!\n",This);
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IMoniker_fnHash(IMoniker* iface,DWORD* pdwHash)
|
||||
{
|
||||
CURLMonikerImpl_THIS(iface,moniker);
|
||||
|
||||
FIXME("(%p)->() stub!\n",This);
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IMoniker_fnIsRunning(IMoniker* iface,IBindCtx* pbc, IMoniker* pmkToLeft, IMoniker* pmkNewlyRunning)
|
||||
{
|
||||
CURLMonikerImpl_THIS(iface,moniker);
|
||||
|
||||
FIXME("(%p)->() stub!\n",This);
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IMoniker_fnGetTimeOfLastChange(IMoniker* iface, IBindCtx* pbc, IMoniker* pmkToLeft, FILETIME* pCompositeTime)
|
||||
{
|
||||
CURLMonikerImpl_THIS(iface,moniker);
|
||||
|
||||
FIXME("(%p)->() stub!\n",This);
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IMoniker_fnInverse(IMoniker* iface,IMoniker** ppmk)
|
||||
{
|
||||
CURLMonikerImpl_THIS(iface,moniker);
|
||||
|
||||
FIXME("(%p)->() stub!\n",This);
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IMoniker_fnCommonPrefixWith(IMoniker* iface,IMoniker* pmkOther, IMoniker** ppmkPrefix)
|
||||
{
|
||||
CURLMonikerImpl_THIS(iface,moniker);
|
||||
|
||||
FIXME("(%p)->() stub!\n",This);
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IMoniker_fnRelativePathTo(IMoniker* iface,IMoniker* pmOther, IMoniker** ppmkRelPath)
|
||||
{
|
||||
CURLMonikerImpl_THIS(iface,moniker);
|
||||
|
||||
FIXME("(%p)->() stub!\n",This);
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IMoniker_fnGetDisplayName(IMoniker* iface,IBindCtx* pbc, IMoniker* pmkToLeft, LPOLESTR *ppszDisplayName)
|
||||
{
|
||||
CURLMonikerImpl_THIS(iface,moniker);
|
||||
|
||||
FIXME("(%p)->() stub!\n",This);
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IMoniker_fnParseDisplayName(IMoniker* iface,IBindCtx* pbc, IMoniker* pmkToLeft, LPOLESTR pszDisplayName, ULONG* pchEaten, IMoniker** ppmkOut)
|
||||
{
|
||||
CURLMonikerImpl_THIS(iface,moniker);
|
||||
|
||||
FIXME("(%p)->() stub!\n",This);
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IMoniker_fnIsSystemMoniker(IMoniker* iface,DWORD* pdwMksys)
|
||||
{
|
||||
CURLMonikerImpl_THIS(iface,moniker);
|
||||
|
||||
FIXME("(%p)->() stub!\n",This);
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
|
||||
static ICOM_VTABLE(IMoniker) imoniker =
|
||||
{
|
||||
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
|
||||
/* IUnknown fields */
|
||||
IMoniker_fnQueryInterface,
|
||||
IMoniker_fnAddRef,
|
||||
IMoniker_fnRelease,
|
||||
/* IPersist fields */
|
||||
IMoniker_fnGetClassID,
|
||||
/* IPersistStream fields */
|
||||
IMoniker_fnIsDirty,
|
||||
IMoniker_fnLoad,
|
||||
IMoniker_fnSave,
|
||||
IMoniker_fnGetSizeMax,
|
||||
/* IMoniker fields */
|
||||
IMoniker_fnBindToObject,
|
||||
IMoniker_fnBindToStorage,
|
||||
IMoniker_fnReduce,
|
||||
IMoniker_fnComposeWith,
|
||||
IMoniker_fnEnum,
|
||||
IMoniker_fnIsEqual,
|
||||
IMoniker_fnHash,
|
||||
IMoniker_fnIsRunning,
|
||||
IMoniker_fnGetTimeOfLastChange,
|
||||
IMoniker_fnInverse,
|
||||
IMoniker_fnCommonPrefixWith,
|
||||
IMoniker_fnRelativePathTo,
|
||||
IMoniker_fnGetDisplayName,
|
||||
IMoniker_fnParseDisplayName,
|
||||
IMoniker_fnIsSystemMoniker,
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
static HRESULT WINAPI
|
||||
IROTData_fnQueryInterface(IROTData* iface,REFIID riid,void** ppobj)
|
||||
{
|
||||
CURLMonikerImpl_THIS(iface,rotd);
|
||||
|
||||
TRACE("(%p)->()\n",This);
|
||||
|
||||
return IUnknown_QueryInterface(This->vfunk.punkControl,riid,ppobj);
|
||||
}
|
||||
|
||||
static ULONG WINAPI
|
||||
IROTData_fnAddRef(IROTData* iface)
|
||||
{
|
||||
CURLMonikerImpl_THIS(iface,rotd);
|
||||
|
||||
TRACE("(%p)->()\n",This);
|
||||
|
||||
return IUnknown_AddRef(This->vfunk.punkControl);
|
||||
}
|
||||
|
||||
static ULONG WINAPI
|
||||
IROTData_fnRelease(IROTData* iface)
|
||||
{
|
||||
CURLMonikerImpl_THIS(iface,rotd);
|
||||
|
||||
TRACE("(%p)->()\n",This);
|
||||
|
||||
return IUnknown_Release(This->vfunk.punkControl);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IROTData_fnGetComparisonData(IROTData* iface,BYTE* pbData,ULONG cbMax,ULONG* pcbData)
|
||||
{
|
||||
CURLMonikerImpl_THIS(iface,rotd);
|
||||
|
||||
FIXME("(%p)->() stub!\n",This);
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
|
||||
|
||||
static ICOM_VTABLE(IROTData) irotdata =
|
||||
{
|
||||
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
|
||||
/* IUnknown fields */
|
||||
IROTData_fnQueryInterface,
|
||||
IROTData_fnAddRef,
|
||||
IROTData_fnRelease,
|
||||
/* IROTData fields */
|
||||
IROTData_fnGetComparisonData,
|
||||
};
|
||||
|
||||
|
||||
|
||||
static COMIMPL_IFEntry IFEntries[] =
|
||||
{
|
||||
{ &IID_IPersist, offsetof(CURLMonikerImpl,moniker)-offsetof(CURLMonikerImpl,vfunk) },
|
||||
{ &IID_IPersistStream, offsetof(CURLMonikerImpl,moniker)-offsetof(CURLMonikerImpl,vfunk) },
|
||||
{ &IID_IMoniker, offsetof(CURLMonikerImpl,moniker)-offsetof(CURLMonikerImpl,vfunk) },
|
||||
{ &IID_IROTData, offsetof(CURLMonikerImpl,rotd)-offsetof(CURLMonikerImpl,vfunk) },
|
||||
};
|
||||
|
||||
static void CURLMonikerImpl_Destructor(IUnknown* iface)
|
||||
{
|
||||
CURLMonikerImpl_THIS(iface,vfunk);
|
||||
|
||||
TRACE("(%p)\n",This);
|
||||
}
|
||||
|
||||
static HRESULT CURLMonikerImpl_AllocObj(
|
||||
void** ppobj,
|
||||
IMoniker* pmonContext,
|
||||
LPCWSTR lpwszURL )
|
||||
{
|
||||
CURLMonikerImpl* This;
|
||||
|
||||
This = (CURLMonikerImpl*)COMIMPL_AllocObj( sizeof(CURLMonikerImpl) );
|
||||
if ( This == NULL ) return E_OUTOFMEMORY;
|
||||
COMIMPL_IUnkInit( &This->vfunk, NULL );
|
||||
This->vfunk.pEntries = IFEntries;
|
||||
This->vfunk.dwEntries = sizeof(IFEntries)/sizeof(IFEntries[0]);
|
||||
This->vfunk.pOnFinalRelease = CURLMonikerImpl_Destructor;
|
||||
|
||||
ICOM_VTBL(&This->moniker) = &imoniker;
|
||||
ICOM_VTBL(&This->rotd) = &irotdata;
|
||||
|
||||
*ppobj = (void*)(&This->vfunk);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* CreateURLMoniker (URLMON.@)
|
||||
*
|
||||
* S_OK success
|
||||
* E_OUTOFMEMORY out of memory
|
||||
* MK_E_SYNTAX not a valid url
|
||||
*
|
||||
*/
|
||||
|
||||
HRESULT WINAPI CreateURLMoniker(
|
||||
IMoniker* pmonContext,
|
||||
LPCWSTR lpwszURL,
|
||||
IMoniker** ppmon )
|
||||
{
|
||||
HRESULT hr;
|
||||
IUnknown* punk = NULL;
|
||||
|
||||
FIXME("(%p,%s,%p)\n",pmonContext,debugstr_w(lpwszURL),ppmon);
|
||||
|
||||
if ( ppmon == NULL )
|
||||
return E_POINTER;
|
||||
*ppmon = NULL;
|
||||
|
||||
hr = CURLMonikerImpl_AllocObj( (void**)&punk, pmonContext, lpwszURL );
|
||||
if ( FAILED(hr) )
|
||||
return hr;
|
||||
|
||||
hr = IUnknown_QueryInterface( punk, &IID_IMoniker, (void**)ppmon );
|
||||
IUnknown_Release( punk );
|
||||
|
||||
return hr;
|
||||
}
|
||||
|
|
@ -47,6 +47,27 @@ HRESULT WINAPI CreateAsyncBindCtxEx(IBindCtx *ibind, DWORD options,
|
|||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* CreateURLMoniker (URLMON.@)
|
||||
*
|
||||
* Create a url moniker
|
||||
*
|
||||
* RETURNS
|
||||
* S_OK success
|
||||
* E_OUTOFMEMORY out of memory
|
||||
* MK_E_SYNTAX not a valid url
|
||||
*
|
||||
*/
|
||||
HRESULT WINAPI CreateURLMoniker(IMoniker *pmkContext, LPCWSTR szURL, IMoniker **ppmk)
|
||||
{
|
||||
TRACE("\n");
|
||||
|
||||
if (NULL != pmkContext)
|
||||
FIXME("Non-null pmkContext not implemented\n");
|
||||
|
||||
return CreateFileMoniker(szURL, ppmk);
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* RegisterBindStatusCallback (URLMON.@)
|
||||
*
|
||||
|
@ -125,7 +146,7 @@ HRESULT WINAPI RevokeBindStatusCallback(
|
|||
*/
|
||||
HRESULT WINAPI Extract(DWORD Param1, DWORD Param2)
|
||||
{
|
||||
FIXME("%lx %lx\n", Param1, Param2);
|
||||
TRACE("%lx %lx\n", Param1, Param2);
|
||||
|
||||
return E_NOTIMPL;
|
||||
return S_OK;
|
||||
}
|
||||
|
|
|
@ -1,12 +1,10 @@
|
|||
name urlmon
|
||||
type win32
|
||||
init URLMON_DllMain
|
||||
|
||||
import ole32.dll
|
||||
import kernel32.dll
|
||||
import ntdll.dll
|
||||
|
||||
debug_channels (comimpl urlmon)
|
||||
debug_channels (urlmon win32)
|
||||
|
||||
1 stub CDLGetLongPathNameA
|
||||
2 stub CDLGetLongPathNameW
|
||||
|
@ -28,7 +26,7 @@ debug_channels (comimpl urlmon)
|
|||
@ stub CopyStgMedium
|
||||
@ stub CreateAsyncBindCtx
|
||||
@ stdcall CreateAsyncBindCtxEx(ptr long ptr ptr ptr long) CreateAsyncBindCtxEx
|
||||
@ stdcall CreateFormatEnumerator(long ptr ptr) CreateFormatEnumerator
|
||||
@ stub CreateFormatEnumerator
|
||||
@ stdcall CreateURLMoniker(ptr str ptr) CreateURLMoniker
|
||||
@ stdcall DllCanUnloadNow() URLMON_DllCanUnloadNow
|
||||
@ stdcall DllGetClassObject(ptr ptr ptr) URLMON_DllGetClassObject
|
||||
|
@ -38,50 +36,50 @@ debug_channels (comimpl urlmon)
|
|||
@ stdcall DllUnregisterServer() URLMON_DllUnregisterServer
|
||||
@ stdcall Extract(long long) Extract
|
||||
@ stub FaultInIEFeature
|
||||
@ stdcall FindMediaType(str ptr) FindMediaType
|
||||
@ stdcall FindMediaTypeClass(ptr str ptr long) FindMediaTypeClass
|
||||
@ stdcall FindMimeFromData(ptr wstr ptr long wstr long ptr long) FindMimeFromData
|
||||
@ stdcall GetClassFileOrMime(ptr wstr ptr long wstr long ptr) GetClassFileOrMime
|
||||
@ stdcall GetClassURL(wstr ptr) GetClassURL
|
||||
@ stub FindMediaType
|
||||
@ stub FindMediaTypeClass
|
||||
@ stub FindMimeFromData
|
||||
@ stub GetClassFileOrMime
|
||||
@ stub GetClassURL
|
||||
@ stub GetComponentIDFromCLSSPEC
|
||||
@ stub GetMarkOfTheWeb
|
||||
@ stdcall GetSoftwareUpdateInfo(wstr ptr) GetSoftwareUpdateInfo
|
||||
@ stdcall HlinkGoBack(ptr) HlinkGoBack
|
||||
@ stdcall HlinkGoForward(ptr) HlinkGoForward
|
||||
@ stdcall HlinkNavigateMoniker(ptr ptr) HlinkNavigateMoniker
|
||||
@ stdcall HlinkNavigateString(ptr wstr) HlinkNavigateString
|
||||
@ stdcall HlinkSimpleNavigateToMoniker(ptr wstr wstr ptr ptr ptr long long) HlinkSimpleNavigateToMoniker
|
||||
@ stdcall HlinkSimpleNavigateToString(wstr wstr wstr ptr ptr ptr long long) HlinkSimpleNavigateToString
|
||||
@ stdcall IsAsyncMoniker(ptr) IsAsyncMoniker
|
||||
@ stdcall IsLoggingEnabledA(str) IsLoggingEnabledA
|
||||
@ stdcall IsLoggingEnabledW(wstr) IsLoggingEnabledW
|
||||
@ stdcall IsValidURL(ptr wstr long) IsValidURL
|
||||
@ stdcall MkParseDisplayNameEx(ptr wstr ptr ptr) MkParseDisplayNameEx
|
||||
@ stub GetSoftwareUpdateInfo
|
||||
@ stub HlinkGoBack
|
||||
@ stub HlinkGoForward
|
||||
@ stub HlinkNavigateMoniker
|
||||
@ stub HlinkNavigateString
|
||||
@ stub HlinkSimpleNavigateToMoniker
|
||||
@ stub HlinkSimpleNavigateToString
|
||||
@ stub IsAsyncMoniker
|
||||
@ stub IsLoggingEnabledA
|
||||
@ stub IsLoggingEnabledW
|
||||
@ stub IsValidURL
|
||||
@ stub MkParseDisplayNameEx
|
||||
@ stdcall ObtainUserAgentString(long str ptr) ObtainUserAgentString
|
||||
@ stub PrivateCoInstall
|
||||
@ stdcall RegisterBindStatusCallback(ptr ptr ptr long) RegisterBindStatusCallback
|
||||
@ stdcall RegisterFormatEnumerator(ptr ptr long) RegisterFormatEnumerator
|
||||
@ stdcall RegisterMediaTypeClass(ptr long ptr ptr long) RegisterMediaTypeClass
|
||||
@ stdcall RegisterMediaTypes(long ptr ptr) RegisterMediaTypes
|
||||
@ stdcall ReleaseBindInfo(ptr) ReleaseBindInfo
|
||||
@ stub RegisterFormatEnumerator
|
||||
@ stub RegisterMediaTypeClass
|
||||
@ stub RegisterMediaTypes
|
||||
@ stub ReleaseBindInfo
|
||||
@ stdcall RevokeBindStatusCallback(ptr ptr) RevokeBindStatusCallback
|
||||
@ stdcall RevokeFormatEnumerator(ptr ptr) RevokeFormatEnumerator
|
||||
@ stdcall SetSoftwareUpdateAdvertisementState(wstr long long long) SetSoftwareUpdateAdvertisementState
|
||||
@ stub RevokeFormatEnumerator
|
||||
@ stub SetSoftwareUpdateAdvertisementState
|
||||
@ stub URLDownloadA
|
||||
@ stdcall URLDownloadToCacheFileA(ptr str ptr long long ptr) URLDownloadToCacheFileA
|
||||
@ stdcall URLDownloadToCacheFileW(ptr wstr ptr long long ptr) URLDownloadToCacheFileW
|
||||
@ stdcall URLDownloadToFileA(ptr str str long ptr) URLDownloadToFileA
|
||||
@ stdcall URLDownloadToFileW(ptr wstr wstr long ptr) URLDownloadToFileW
|
||||
@ stub URLDownloadToCacheFileA
|
||||
@ stub URLDownloadToCacheFileW
|
||||
@ stub URLDownloadToFileA
|
||||
@ stub URLDownloadToFileW
|
||||
@ stub URLDownloadW
|
||||
@ stdcall URLOpenBlockingStreamA(ptr str ptr long ptr) URLOpenBlockingStreamA
|
||||
@ stdcall URLOpenBlockingStreamW(ptr wstr ptr long ptr) URLOpenBlockingStreamW
|
||||
@ stdcall URLOpenPullStreamA(ptr str long ptr) URLOpenPullStreamA
|
||||
@ stdcall URLOpenPullStreamW(ptr wstr long ptr) URLOpenPullStreamW
|
||||
@ stdcall URLOpenStreamA(ptr str long ptr) URLOpenStreamA
|
||||
@ stdcall URLOpenStreamW(ptr wstr long ptr) URLOpenStreamW
|
||||
@ stub URLOpenBlockingStreamA
|
||||
@ stub URLOpenBlockingStreamW
|
||||
@ stub URLOpenPullStreamA
|
||||
@ stub URLOpenPullStreamW
|
||||
@ stub URLOpenStreamA
|
||||
@ stub URLOpenStreamW
|
||||
@ stub UrlMkBuildVersion
|
||||
@ stdcall UrlMkGetSessionOption(long ptr long ptr long) UrlMkGetSessionOption
|
||||
@ stub UrlMkGetSessionOption
|
||||
@ stdcall UrlMkSetSessionOption(long ptr long long) UrlMkSetSessionOption
|
||||
@ stdcall WriteHitLogging(ptr) WriteHitLogging
|
||||
@ stub WriteHitLogging
|
||||
@ stub ZonesReInit
|
||||
|
||||
|
|
|
@ -21,22 +21,10 @@
|
|||
#include "windef.h"
|
||||
#include "winerror.h"
|
||||
#include "wtypes.h"
|
||||
#include "ole2.h"
|
||||
#include "urlmon.h"
|
||||
|
||||
#include "comimpl.h"
|
||||
|
||||
#include "wine/debug.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(urlmon);
|
||||
|
||||
|
||||
const COMIMPL_CLASSENTRY COMIMPL_ClassList[] =
|
||||
{
|
||||
/* list of exported classes */
|
||||
{ NULL, NULL }
|
||||
};
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(win32);
|
||||
|
||||
/***********************************************************************
|
||||
* DllInstall (URLMON.@)
|
||||
|
@ -49,6 +37,28 @@ HRESULT WINAPI URLMON_DllInstall(BOOL bInstall, LPCWSTR cmdline)
|
|||
return S_OK;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* DllCanUnloadNow (URLMON.@)
|
||||
*/
|
||||
HRESULT WINAPI URLMON_DllCanUnloadNow(void)
|
||||
{
|
||||
FIXME("(void): stub\n");
|
||||
|
||||
return S_FALSE;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* DllGetClassObject (URLMON.@)
|
||||
*/
|
||||
HRESULT WINAPI URLMON_DllGetClassObject(REFCLSID rclsid, REFIID riid,
|
||||
LPVOID *ppv)
|
||||
{
|
||||
FIXME("(%p, %p, %p): stub\n", debugstr_guid(rclsid),
|
||||
debugstr_guid(riid), ppv);
|
||||
|
||||
return CLASS_E_CLASSNOTAVAILABLE;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* DllRegisterServer (URLMON.@)
|
||||
*/
|
||||
|
@ -108,7 +118,7 @@ HRESULT WINAPI CoInternetGetSession(DWORD dwSessionMode,
|
|||
ERR("dwReserved: %ld, must be zero\n", dwReserved);
|
||||
}
|
||||
|
||||
return E_NOTIMPL;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
|
@ -123,260 +133,5 @@ HRESULT WINAPI ObtainUserAgentString(DWORD dwOption, LPCSTR pcszUAOut, DWORD *cb
|
|||
ERR("dwOption: %ld, must be zero\n", dwOption);
|
||||
}
|
||||
|
||||
return E_NOTIMPL;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
/*****************************************************************************
|
||||
* stubs
|
||||
*/
|
||||
|
||||
typedef struct
|
||||
{
|
||||
DWORD dwStructSize;
|
||||
LPSTR lpszLoggedUrlName;
|
||||
SYSTEMTIME StartTime;
|
||||
SYSTEMTIME EndTime;
|
||||
LPSTR lpszExtendedInfo;
|
||||
} HIT_LOGGING_INFO;
|
||||
|
||||
|
||||
typedef struct
|
||||
{
|
||||
ULONG cbSize;
|
||||
DWORD dwFlags;
|
||||
DWORD dwAdState;
|
||||
LPWSTR szTitle;
|
||||
LPWSTR szAbstract;
|
||||
LPWSTR szHREF;
|
||||
DWORD dwInstalledVersionMS;
|
||||
DWORD dwInstalledVersionLS;
|
||||
DWORD dwUpdateVersionMS;
|
||||
DWORD dwUpdateVersionLS;
|
||||
DWORD dwAdvertisedVersionMS;
|
||||
DWORD dwAdvertisedVersionLS;
|
||||
DWORD dwReserved;
|
||||
} SOFTDISTINFO;
|
||||
|
||||
|
||||
HRESULT WINAPI CreateFormatEnumerator(UINT cFormatEtcs,FORMATETC* pFormatEtcs,IEnumFORMATETC** ppenum)
|
||||
{
|
||||
FIXME("() stub\n");
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT WINAPI FindMediaType(LPCSTR pszTypes,CLIPFORMAT* pcfTypes)
|
||||
{
|
||||
FIXME("() stub\n");
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT WINAPI FindMediaTypeClass(IBindCtx* pbc,LPCSTR pszType,CLSID* pclsid,DWORD dwReserved)
|
||||
{
|
||||
FIXME("() stub\n");
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT WINAPI FindMimeFromData(IBindCtx* pbc,LPCWSTR pwszURL,void* pbuf,DWORD cb,LPCWSTR pwszMimeProposed,DWORD dwMimeFlags,LPWSTR* ppwszMimeOut,DWORD dwReserved)
|
||||
{
|
||||
FIXME("() stub\n");
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT WINAPI GetClassFileOrMime(IBindCtx* pbc,LPCWSTR pwszFilename,void* pbuf,DWORD cb,LPCWSTR pwszMime,DWORD dwReserved,CLSID* pclsid)
|
||||
{
|
||||
FIXME("() stub\n");
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT WINAPI GetClassURL(LPCWSTR pwszURL,CLSID* pclsid)
|
||||
{
|
||||
FIXME("() stub\n");
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT WINAPI GetSoftwareUpdateInfo(LPCWSTR pwszDistUnit,SOFTDISTINFO* psdi)
|
||||
{
|
||||
FIXME("() stub\n");
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT WINAPI HlinkGoBack(IUnknown* punk)
|
||||
{
|
||||
FIXME("() stub\n");
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT WINAPI HlinkGoForward(IUnknown* punk)
|
||||
{
|
||||
FIXME("() stub\n");
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT WINAPI HlinkNavigateMoniker(IUnknown* punk,IMoniker* pmonTarget)
|
||||
{
|
||||
FIXME("() stub\n");
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT WINAPI HlinkNavigateString(IUnknown* punk,LPCWSTR szTarget)
|
||||
{
|
||||
FIXME("() stub\n");
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT WINAPI HlinkSimpleNavigateToMoniker(
|
||||
IMoniker* pmonTarget,LPCWSTR pwszLocation,LPCWSTR pwszTargetFrame,
|
||||
IUnknown* punk,IBindCtx* pbc,IBindStatusCallback* pbscb,
|
||||
DWORD dwHLNF,DWORD dwReserved)
|
||||
{
|
||||
FIXME("() stub\n");
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT WINAPI HlinkSimpleNavigateToString(
|
||||
LPCWSTR pwszTarget,LPCWSTR pwszLocation,LPCWSTR pwszTargetFrame,
|
||||
IUnknown* punk,IBindCtx* pbc,IBindStatusCallback* pbscb,
|
||||
DWORD dwHLNF,DWORD dwReserved)
|
||||
{
|
||||
FIXME("() stub\n");
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT WINAPI IsAsyncMoniker(IMoniker* pmon)
|
||||
{
|
||||
FIXME("() stub\n");
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
BOOL WINAPI IsLoggingEnabledA(LPCSTR pszURL)
|
||||
{
|
||||
FIXME("() stub\n");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL WINAPI IsLoggingEnabledW(LPCWSTR pwszURL)
|
||||
{
|
||||
FIXME("() stub\n");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
HRESULT WINAPI IsValidURL(IBindCtx* pbc,LPCWSTR pwszURL,DWORD dwReserved)
|
||||
{
|
||||
FIXME("() stub\n");
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT WINAPI MkParseDisplayNameEx(IBindCtx* pbc,LPCWSTR pwszDisplayName,ULONG* pulCharEaten,IMoniker** ppmon)
|
||||
{
|
||||
FIXME("() stub\n");
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT WINAPI RegisterFormatEnumerator(IBindCtx* pbc,IEnumFORMATETC* penum,DWORD dwReserved)
|
||||
{
|
||||
FIXME("() stub\n");
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT WINAPI RegisterMediaTypeClass(IBindCtx* pbc,UINT cTypes,const LPCSTR* pszTypes,CLSID* pclsid,DWORD dwReserved)
|
||||
{
|
||||
FIXME("() stub\n");
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT WINAPI RegisterMediaTypes(UINT cTypes,const LPCSTR* pszTypes,CLIPFORMAT* pcfTypes)
|
||||
{
|
||||
FIXME("() stub\n");
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
void WINAPI ReleaseBindInfo(BINDINFO* pbi)
|
||||
{
|
||||
FIXME("() stub\n");
|
||||
}
|
||||
|
||||
HRESULT WINAPI RevokeFormatEnumerator(IBindCtx* pbc,IEnumFORMATETC* penum)
|
||||
{
|
||||
FIXME("() stub\n");
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT WINAPI SetSoftwareUpdateAdvertisementState(LPCWSTR pwszDistUnit,DWORD dwAdvState,DWORD dwAdvVerMS,DWORD dwAdvVerLS)
|
||||
{
|
||||
FIXME("() stub\n");
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT WINAPI URLDownloadToCacheFileA(IUnknown* punk,LPCSTR pszURL,LPSTR pszNameBuf,DWORD dwNameBufLen,DWORD dwReserved,IBindStatusCallback* pbscb)
|
||||
{
|
||||
FIXME("() stub\n");
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT WINAPI URLDownloadToCacheFileW(IUnknown* punk,LPCWSTR pwszURL,LPWSTR pwszNameBuf,DWORD dwNameBufLen,DWORD dwReserved,IBindStatusCallback* pbscb)
|
||||
{
|
||||
FIXME("() stub\n");
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT WINAPI URLDownloadToFileA(IUnknown* punk,LPCSTR pszURL,LPCSTR pszFileName,DWORD dwReserved,IBindStatusCallback* pbscb)
|
||||
{
|
||||
FIXME("() stub\n");
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT WINAPI URLDownloadToFileW(IUnknown* punk,LPCWSTR pwszURL,LPCWSTR pwszFileName,DWORD dwReserved,IBindStatusCallback* pbscb)
|
||||
{
|
||||
FIXME("() stub\n");
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT WINAPI URLOpenBlockingStreamA(IUnknown* punk,LPCSTR pszURL,IStream** ppstream,DWORD dwReserved,IBindStatusCallback* pbscb)
|
||||
{
|
||||
FIXME("() stub\n");
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT WINAPI URLOpenBlockingStreamW(IUnknown* punk,LPCWSTR pwszURL,IStream** ppstream,DWORD dwReserved,IBindStatusCallback* pbscb)
|
||||
{
|
||||
FIXME("() stub\n");
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT WINAPI URLOpenPullStreamA(IUnknown* punk,LPCSTR pszURL,DWORD dwReserved,IBindStatusCallback* pbscb)
|
||||
{
|
||||
FIXME("() stub\n");
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT WINAPI URLOpenPullStreamW(IUnknown* punk,LPCWSTR pwszURL,DWORD dwReserved,IBindStatusCallback* pbscb)
|
||||
{
|
||||
FIXME("() stub\n");
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT WINAPI URLOpenStreamA(IUnknown* punk,LPCSTR pszURL,DWORD dwReserved,IBindStatusCallback* pbscb)
|
||||
{
|
||||
FIXME("() stub\n");
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT WINAPI URLOpenStreamW(IUnknown* punk,LPCWSTR pwszURL,DWORD dwReserved,IBindStatusCallback* pbscb)
|
||||
{
|
||||
FIXME("() stub\n");
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT WINAPI UrlMkGetSessionOption(DWORD dwOpt,void* pvBuf,DWORD dwBufLen,DWORD* pdwLen,DWORD dwReserved)
|
||||
{
|
||||
FIXME("() stub\n");
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
BOOL WINAPI WriteHitLogging(HIT_LOGGING_INFO* pli)
|
||||
{
|
||||
FIXME("() stub\n");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1,124 +0,0 @@
|
|||
/*
|
||||
* Copyright 2002 Hidenori Takeshima
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
STRINGTABLE LANGUAGE LANG_JAPANESE, SUBLANG_NEUTRAL
|
||||
BEGIN
|
||||
|
||||
MMSYSERR_NOERROR, "MMSYSERR_NOERROR: 指定されたコマンドは正常に実行されました."
|
||||
MMSYSERR_ERROR, "MMSYSERR_ERROR: 不明な外部エラーです."
|
||||
MMSYSERR_BADDEVICEID, "MMSYSERR_BADDEVICEID: 不正なデバイスIDです."
|
||||
MMSYSERR_NOTENABLED, "MMSYSERR_NOTENABLED: ドライバが enabled 状態ではありません."
|
||||
MMSYSERR_ALLOCATED, "MMSYSERR_ALLOCATED: ドライバがすでに使用中です. 解放されるまで待ってください."
|
||||
MMSYSERR_INVALHANDLE, "MMSYSERR_INVALHANDLE: 指定されたデバイスハンドルは不正です."
|
||||
MMSYSERR_NODRIVER, "MMSYSERR_NODRIVER: 指定されたドライバが見つかりません."
|
||||
MMSYSERR_NOMEM, "MMSYSERR_NOMEM: メモリが不足しています. いくつかのアプリケーションを終了してください."
|
||||
MMSYSERR_NOTSUPPORTED, "MMSYSERR_NOTSUPPORTED: 要求された機能は実装されていません. ドライバが対応している機能を確認してみてください."
|
||||
MMSYSERR_BADERRNUM, "MMSYSERR_BADERRNUM: 未定義のエラー番号が返されました."
|
||||
MMSYSERR_INVALFLAG, "MMSYSERR_INVALFLAG: 不正なフラグが指定されました."
|
||||
MMSYSERR_INVALPARAM, "MMSYSERR_INVALPARAM: 不正なパラメータが指定されました."
|
||||
|
||||
WAVERR_BADFORMAT, "WAVERR_BADFORMAT: 指定された WAVE フォーマットには対応できません."
|
||||
WAVERR_STILLPLAYING, "WAVERR_STILLPLAYING: 再生中に実行することができない機能が呼び出されました."
|
||||
WAVERR_UNPREPARED, "WAVERR_UNPREPARED: WAVE ヘッダは Prepare されていません."
|
||||
WAVERR_SYNC, "WAVERR_SYNC: WAVE_ALLOWSYNC 指定のない状態で同期操作が実行されようとしました."
|
||||
|
||||
/* MIDI errors */
|
||||
MIDIERR_UNPREPARED, "MIDIERR_UNPREPARED: MIDI ヘッダは Prepare されていません."
|
||||
MIDIERR_STILLPLAYING, "MIDIERR_STILLPLAYING: 再生中に実行することができない機能が呼び出されました."
|
||||
MIDIERR_NOMAP, "MIDIERR_NOMAP: MIDIマッパーが動作しません. ドライバのエラーか、MIDIMAP.CFGが壊れています."
|
||||
MIDIERR_NOTREADY, "MIDIERR_NOTREADY: データ転送中です. データ転送が終了してから、操作を行ってください."
|
||||
MIDIERR_NODEVICE, "MIDIERR_NODEVICE: MIDIマッパーが参照しているデバイスが見つかりません."
|
||||
MIDIERR_INVALIDSETUP, "MIDIERR_INVALIDSETUP: MIDIドライバの設定ファイルが壊れています. MIDIMAP.CFGファイルを SYSTEM ディレクトリにコピーしたうえで、やりなおしてください."
|
||||
|
||||
/* MCI errors */
|
||||
MCIERR_INVALID_DEVICE_ID, "MCIERR_INVALID_DEVICE_ID: 不正な MCI デバイス ID が指定されました."
|
||||
MCIERR_UNRECOGNIZED_KEYWORD, "MCIERR_UNRECOGNIZED_KEYWORD: 認識できない MCI コマンドキーワードです."
|
||||
MCIERR_UNRECOGNIZED_COMMAND, "MCIERR_UNRECOGNIZED_COMMAND: 認識できない MCI コマンドです."
|
||||
MCIERR_HARDWARE, "MCIERR_HARDWARE: メディアデバイスに何らかのハードウェア障害が発生したか、ハードウェアドライバのエラーです. 正しく動作しているか確認してみてください."
|
||||
MCIERR_INVALID_DEVICE_NAME, "MCIERR_INVALID_DEVICE_NAME: 指定されたデバイスは open されていないか、MCI が認識できないデバイスです."
|
||||
MCIERR_OUT_OF_MEMORY, "MCIERR_OUT_OF_MEMORY: メモリが不足しています. いくつかのアプリケーションを終了してください."
|
||||
MCIERR_DEVICE_OPEN, "MCIERR_DEVICE_OPEN: 指定されたデバイス名はすでに使用されています. MCI を使用するプログラムは一意のエイリアス名を指定してください."
|
||||
MCIERR_CANNOT_LOAD_DRIVER, "MCIERR_CANNOT_LOAD_DRIVER: ドライバの読み込み中にエラーが発生しました."
|
||||
MCIERR_MISSING_COMMAND_STRING, "MCIERR_MISSING_COMMAND_STRING: MCI コマンドが指定されていません."
|
||||
MCIERR_PARAM_OVERFLOW, "MCIERR_PARAM_OVERFLOW: 返される文字列のサイズがバッファサイズを超えました. MCI を使用するプログラムはより多くのバッファを与えてください."
|
||||
MCIERR_MISSING_STRING_ARGUMENT, "MCIERR_MISSING_STRING_ARGUMENT: 指定されたコマンドはパラメータ文字列を指定する必要があります. MCI を使用するプログラムはパラメータ文字列を与えてください."
|
||||
MCIERR_BAD_INTEGER, "MCIERR_BAD_INTEGER: 指定された整数値は要求されたコマンドに対しては不正です."
|
||||
MCIERR_PARSER_INTERNAL, "MCIERR_PARSER_INTERNAL: デバイスドライバは不正なリターンタイプを返しました. ドライバを更新してください."
|
||||
MCIERR_DRIVER_INTERNAL, "MCIERR_DRIVER_INTERNAL: デバイスドライバの内部エラーです. ドライバを更新してください."
|
||||
MCIERR_MISSING_PARAMETER, "MCIERR_MISSING_PARAMETER: 指定されたコマンドはパラメータを必要とします. MCI を使用するプログラムはパラメータを指定してください."
|
||||
MCIERR_UNSUPPORTED_FUNCTION, "MCIERR_UNSUPPORTED_FUNCTION: 使用中の MCI デバイスは指定された MCI コマンドに対応していません."
|
||||
MCIERR_FILE_NOT_FOUND, "MCIERR_FILE_NOT_FOUND: 指定されたファイルが見つかりません. パス、ファイル名が正しいか確認してください."
|
||||
MCIERR_DEVICE_NOT_READY, "MCIERR_DEVICE_NOT_READY: デバイスドライバは ready 状態ではありません."
|
||||
MCIERR_INTERNAL, "MCIERR_INTERNAL: MCIデバイスの初期化に失敗しました. 再起動してみてください."
|
||||
MCIERR_DRIVER, "MCIERR_DRIVER: デバイスドライバのエラーが発生しました. ドライバは close されました. アクセスできません."
|
||||
MCIERR_CANNOT_USE_ALL, "MCIERR_CANNOT_USE_ALL: 'all' を MCI デバイス名として使用することはできません."
|
||||
MCIERR_MULTIPLE, "MCIERR_MULTIPLE: 複数のデバイスでエラーが発生しました. 各コマンド、デバイスを別々に指定し, エラーの原因を調べてください."
|
||||
MCIERR_EXTENSION_NOT_FOUND, "MCIERR_EXTENSION_NOT_FOUND: 拡張子からデバイスタイプを推測することができませんでした."
|
||||
MCIERR_OUTOFRANGE, "MCIERR_OUTOFRANGE: 指定されたコマンドの許容範囲外のパラメータが与えられました."
|
||||
MCIERR_FLAGS_NOT_COMPATIBLE, "MCIERR_FLAGS_NOT_COMPATIBLE: 同時に使用できないフラグ・パラメータが指定されました."
|
||||
MCIERR_FILE_NOT_SAVED, "MCIERR_FILE_NOT_SAVED: 指定ファイルを保存することができませんでした. ディスクの空き容量、ネットワーク接続などを確認してみてください."
|
||||
MCIERR_DEVICE_TYPE_REQUIRED, "MCIERR_DEVICE_TYPE_REQUIRED: 指定されたデバイスを見つけられませんでした. デバイスがインストールされているか、デバイス名が正しいか確認してみてください."
|
||||
MCIERR_DEVICE_LOCKED, "MCIERR_DEVICE_LOCKED: 指定されたデバイスは close 処理中です. しばらく待って、やり直してください."
|
||||
MCIERR_DUPLICATE_ALIAS, "MCIERR_DUPLICATE_ALIAS: 指定されたエイリアス名はすでにこのアプリケーションによって使用されています. 一意のエイリアス名を指定してください."
|
||||
MCIERR_BAD_CONSTANT, "MCIERR_BAD_CONSTANT: 指定されたパラメータはこのコマンドに対しては不正です."
|
||||
MCIERR_MUST_USE_SHAREABLE, "MCIERR_MUST_USE_SHAREABLE: デバイスドライバが使用中です. 各 'open' MCI コマンドに対し 'shareable' パラメータを与えることでデバイスドライバの共有が可能となります."
|
||||
MCIERR_MISSING_DEVICE_NAME, "MCIERR_MISSING_DEVICE_NAME: 指定されたコマンドはエイリアス名、ファイル名、ドライバ名、デバイス名のいずれかが必要です. 必要なパラメータを与えてください."
|
||||
MCIERR_BAD_TIME_FORMAT, "MCIERR_BAD_TIME_FORMAT: 指定された time format 値は不正です. MCI ドキュメントを参照し、正しい format を指定してください."
|
||||
MCIERR_NO_CLOSING_QUOTE, "MCIERR_NO_CLOSING_QUOTE: コマンドを閉じるダブルクォーテーションが指定されていません."
|
||||
MCIERR_DUPLICATE_FLAGS, "MCIERR_DUPLICATE_FLAGS: パラメータ/値が2度以上指定されています."
|
||||
MCIERR_INVALID_FILE, "MCIERR_INVALID_FILE: 指定された MCI デバイスでは指定ファイルを再生することができません. ファイルが壊れているかもしれません."
|
||||
MCIERR_NULL_PARAMETER_BLOCK, "MCIERR_NULL_PARAMETER_BLOCK: パラメータブロックとして NULL が MCI に渡されました."
|
||||
MCIERR_UNNAMED_RESOURCE, "MCIERR_UNNAMED_RESOURCE: ファイル名が指定されていません."
|
||||
MCIERR_NEW_REQUIRES_ALIAS, "MCIERR_NEW_REQUIRES_ALIAS: 'new' に対してはエイリアス名が必要です."
|
||||
MCIERR_NOTIFY_ON_AUTO_OPEN, "MCIERR_NOTIFY_ON_AUTO_OPEN: 自動的に open されたデバイスに対して 'notify' フラグを指定することはできません."
|
||||
MCIERR_NO_ELEMENT_ALLOWED, "MCIERR_NO_ELEMENT_ALLOWED: 指定されたデバイスにファイル名を指定することはできません."
|
||||
MCIERR_NONAPPLICABLE_FUNCTION, "MCIERR_NONAPPLICABLE_FUNCTION: 指定された順序ではコマンドを実行することができません."
|
||||
MCIERR_ILLEGAL_FOR_AUTO_OPEN, "MCIERR_ILLEGAL_FOR_AUTO_OPEN: 自動的に open されたデバイスに対して指定されたコマンドを実行することはできません."
|
||||
MCIERR_FILENAME_REQUIRED, "MCIERR_FILENAME_REQUIRED: ファイル名は不正です. 8.3ファイル形式であるか確認してみてください."
|
||||
MCIERR_EXTRA_CHARACTERS, "MCIERR_EXTRA_CHARACTERS: クウォーテーションマークで囲まれた文字列のあとにキャラクタがあります."
|
||||
MCIERR_DEVICE_NOT_INSTALLED, "MCIERR_DEVICE_NOT_INSTALLED: デバイスがインストールされていません. コントロールパネルを使ってインストールしてください."
|
||||
MCIERR_GET_CD, "MCIERR_GET_CD: 指定されたファイル or MCIデバイスにアクセスできません. カレントディレクトリを変更する、再起動するなどしてみてください."
|
||||
MCIERR_SET_CD, "MCIERR_SET_CD: ディレクトリを変更することができませんでした. 指定されたファイル or MCIデバイスにアクセスできません."
|
||||
MCIERR_SET_DRIVE, "MCIERR_SET_DRIVE: カレントドライブを変更することができませんでした. 指定されたファイル or MCIデバイスにアクセスできません."
|
||||
MCIERR_DEVICE_LENGTH, "MCIERR_DEVICE_LENGTH: デバイス・ドライバ名が長すぎます. 79文字(79バイト)以下です."
|
||||
MCIERR_DEVICE_ORD_LENGTH, "MCIERR_DEVICE_ORD_LENGTH: デバイス・ドライバ名が長すぎます. 69文字(69バイト)以下です."
|
||||
MCIERR_NO_INTEGER, "MCIERR_NO_INTEGER: 指定されたコマンドはint(整数値)パラメータを必要とします."
|
||||
MCIERR_WAVE_OUTPUTSINUSE, "MCIERR_WAVE_OUTPUTSINUSE: 現在のファイルを再生するための WAVE 出力はすべて使用中です. WAVE 出力デバイスが解放されてからやりなおしてください."
|
||||
MCIERR_WAVE_SETOUTPUTINUSE, "MCIERR_WAVE_SETOUTPUTINUSE: WAVE がすべて使用中です. WAVE 出力デバイスが解放されてからやりなおしてください."
|
||||
MCIERR_WAVE_INPUTSINUSE, "MCIERR_WAVE_INPUTSINUSE: 現在の形式でファイルを取り込むするための WAVE 入力はすべて使用中です. WAVE 入力デバイスが解放されてからやりなおしてください."
|
||||
MCIERR_WAVE_SETINPUTINUSE, "MCIERR_WAVE_SETINPUTINUSE: WAVE 入力はすべて使用中です. WAVE 入力デバイスが解放されてからやりなおしてください."
|
||||
MCIERR_WAVE_OUTPUTUNSPECIFIED, "MCIERR_WAVE_OUTPUTUNSPECIFIED: 出力デバイスが指定されていません. 互換性のある WAVE 再生デバイスを指定してください."
|
||||
MCIERR_WAVE_INPUTUNSPECIFIED, "MCIERR_WAVE_INPUTUNSPECIFIED: 入力デバイスが指定されていません. 互換性のある WAVE 入力デバイスを指定してください."
|
||||
MCIERR_WAVE_OUTPUTSUNSUITABLE, "MCIERR_WAVE_OUTPUTSUNSUITABLE: 現在のフォーマットを再生できる WAVE 出力デバイスが存在しません. Drivers オプションを使って WAVE デバイスをインストールしてください."
|
||||
MCIERR_WAVE_SETOUTPUTUNSUITABLE,"MCIERR_WAVE_SETOUTPUTUNSUITABLE: 再生されようとしているデバイスは指定ファイルのフォーマットを認識できません."
|
||||
MCIERR_WAVE_INPUTSUNSUITABLE, "MCIERR_WAVE_INPUTSUNSUITABLE: 現在のフォーマットを入力できる WAVE 入力デバイスが存在しません. Drivers オプションを使って WAVE デバイスをインストールしてください."
|
||||
MCIERR_WAVE_SETINPUTUNSUITABLE, "MCIERR_WAVE_SETINPUTUNSUITABLE: WAVE 入力されようとしているデバイスは指定ファイルのフォーマットを認識できません."
|
||||
MCIERR_NO_WINDOW, "MCIERR_NO_WINDOW: 表示ウィンドウがありません."
|
||||
MCIERR_CREATEWINDOW, "MCIERR_CREATEWINDOW: ウィンドウを作成・使用することができません."
|
||||
MCIERR_FILE_READ, "MCIERR_FILE_READ: 指定ファイルを読み込めません. ファイルが存在しているか、ディスク・ネットワークが正しく動作しているか確認してください."
|
||||
MCIERR_FILE_WRITE, "MCIERR_FILE_WRITE:指定ファイルを読み込めません. ディスクの空き容量は十分であるか、ネットワークが正しく動作しているか確認してください."
|
||||
MCIERR_SEQ_DIV_INCOMPATIBLE, "MCIERR_SEQ_DIV_INCOMPATIBLE: \"song pointer\" 時間形式と SMPTE 時間形式は排他的です. 同時に使用することはできません."
|
||||
MCIERR_SEQ_NOMIDIPRESENT, "MCIERR_SEQ_NOMIDIPRESENT: MIDIデバイスがインストールされていません. MIDI デバイスドライバをインストールしてください."
|
||||
MCIERR_SEQ_PORT_INUSE, "MCIERR_SEQ_PORT_INUSE: 指定された MIDI ポートは使用中です. 解放されてからやりなおしてください."
|
||||
MCIERR_SEQ_PORT_MAPNODEVICE, "MCIERR_SEQ_PORT_MAPNODEVICE: MIDIマッパーが参照しているデバイスがインストールされていません. コントロールパネルのMIDI マッパーオプションを使い、インストールしてください."
|
||||
MCIERR_SEQ_PORT_MISCERROR, "MCIERR_SEQ_PORT_MISCERROR: 指定されたポートで不明なエラーが発生しました."
|
||||
MCIERR_SEQ_PORT_NONEXISTENT, "MCIERR_SEQ_PORT_NONEXISTENT: MIDIマッパーが参照しているデバイスがインストールされていません. コントロールパネルのMIDI マッパーオプションを使い、インストールしてください."
|
||||
MCIERR_SEQ_PORTUNSPECIFIED, "MCIERR_SEQ_PORTUNSPECIFIED: 指定された MIDI ポートが存在しません."
|
||||
MCIERR_SEQ_TIMER, "MCIERR_SEQ_TIMER: すべてのマルチメディアタイマが使用中です. マルチメディアタイマを使用しているアプリケーションをいくつか終了して、やりなおしてみてください."
|
||||
|
||||
END
|
|
@ -33,7 +33,6 @@
|
|||
#include "winmm_Es.rc"
|
||||
#include "winmm_Ru.rc"
|
||||
#include "winmm_Sk.rc"
|
||||
#include "winmm_Ja.rc"
|
||||
|
||||
/* do not add NLS specific stuff below that line */
|
||||
|
||||
|
|
|
@ -8,7 +8,4 @@ vcr=mcivisca.drv
|
|||
MPEGVideo=mciqtz.drv
|
||||
|
||||
[drivers32]
|
||||
VIDC.MRLE=msrle32.dll
|
||||
msacm.msg711=msg711.drv
|
||||
msacm.imaadp32=imaadp32.acm
|
||||
|
||||
|
|
|
@ -33,7 +33,6 @@ INSTALLED_INCLUDES = \
|
|||
dplobby.h \
|
||||
dshow.h \
|
||||
dsound.h \
|
||||
dvdmedia.h \
|
||||
guiddef.h \
|
||||
imagehlp.h \
|
||||
imm.h \
|
||||
|
@ -155,7 +154,6 @@ INSTALLED_INCLUDES = \
|
|||
wine/obj_errorinfo.h \
|
||||
wine/obj_extracticon.h \
|
||||
wine/obj_inplace.h \
|
||||
wine/obj_ksproperty.h \
|
||||
wine/obj_marshal.h \
|
||||
wine/obj_misc.h \
|
||||
wine/obj_moniker.h \
|
||||
|
|
|
@ -22,7 +22,6 @@
|
|||
#include "winbase.h" /* for CRITICAL_SECTION */
|
||||
#include "mmsystem.h"
|
||||
#include "d3dtypes.h"
|
||||
#include "wine/obj_ksproperty.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
@ -56,6 +55,10 @@ typedef struct IDirectSoundCaptureBuffer IDirectSoundCaptureBuffer,*LPDIRECTSOUN
|
|||
|
||||
DEFINE_GUID(DSDEVID_WinePlayback, 0x40316A1D,0x605B,0xD611,0x87,0xC6,0x00,0x80,0xAD,0x00,0x02,0xFE);
|
||||
|
||||
DEFINE_GUID(IID_IKsPropertySet, 0x31EFAC30,0x515C,0x11D0,0xA9,0xAA,0x00,0xAA,0x00,0x61,0xBE,0x93);
|
||||
typedef struct IKsPropertySet IKsPropertySet,*LPKSPROPERTYSET;
|
||||
|
||||
|
||||
#define _FACDS 0x878
|
||||
#define MAKE_DSHRESULT(code) MAKE_HRESULT(1,_FACDS,code)
|
||||
|
||||
|
@ -570,6 +573,29 @@ ICOM_DEFINE(IDirectSound3DBuffer,IUnknown)
|
|||
#define IDirectSound3DBuffer_SetPosition(p,a,b,c,d) ICOM_CALL4(SetPosition,p,a,b,c,d)
|
||||
#define IDirectSound3DBuffer_SetVelocity(p,a,b,c,d) ICOM_CALL4(SetVelocity,p,a,b,c,d)
|
||||
|
||||
/*****************************************************************************
|
||||
* IKsPropertySet interface
|
||||
*/
|
||||
#define KSPROPERTY_SUPPORT_GET 1
|
||||
#define KSPROPERTY_SUPPORT_SET 2
|
||||
|
||||
#define ICOM_INTERFACE IKsPropertySet
|
||||
#define IKsPropertySet_METHODS \
|
||||
ICOM_METHOD7(HRESULT,Get,REFGUID,rgid,ULONG,x1,LPVOID,p1,ULONG,x2,LPVOID,p2,ULONG,x3,ULONG*,px4);\
|
||||
ICOM_METHOD6(HRESULT,Set,REFGUID,rgid,ULONG,x1,LPVOID,p1,ULONG,x2,LPVOID,p2,ULONG,x3);\
|
||||
ICOM_METHOD3(HRESULT,QuerySupport,REFGUID,rgid,ULONG,x1,ULONG*,px2);
|
||||
#define IKsPropertySet_IMETHODS \
|
||||
IUnknown_IMETHODS \
|
||||
IKsPropertySet_METHODS
|
||||
ICOM_DEFINE(IKsPropertySet,IUnknown)
|
||||
#undef ICOM_INTERFACE
|
||||
|
||||
#define IKsPropertySet_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
|
||||
#define IKsPropertySet_AddRef(p) ICOM_CALL (AddRef,p)
|
||||
#define IKsPropertySet_Release(p) ICOM_CALL (Release,p)
|
||||
#define IKsPropertySet_Get(p,a,b,c,d,e,f,g) ICOM_CALL7(Get,p,a,b,c,d,e,f,g)
|
||||
#define IKsPropertySet_Set(p,a,b,c,d,e,f) ICOM_CALL6(Set,p,a,b,c,d,e,f)
|
||||
#define IKsPropertySet_QuerySupport(p,a,b,c) ICOM_CALL3(QuerySupport,p,a,b,c)
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
|
@ -1,99 +0,0 @@
|
|||
/*
|
||||
* Copyright (C) 2002 Hidenori TAKESHIMA <hidenori@a2.ctktv.ne.jp>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#ifndef __WINE_DVDMEDIA_H_
|
||||
#define __WINE_DVDMEDIA_H_
|
||||
|
||||
|
||||
/* enums. */
|
||||
|
||||
enum AM_MPEG2Level
|
||||
{
|
||||
AM_MPEG2Level_Low = 1,
|
||||
AM_MPEG2Level_Main = 2,
|
||||
AM_MPEG2Level_High1440 = 3,
|
||||
AM_MPEG2Level_High = 4,
|
||||
};
|
||||
|
||||
enum AM_MPEG2Profile
|
||||
{
|
||||
AM_MPEG2Profile_Simple = 1,
|
||||
AM_MPEG2Profile_Main = 2,
|
||||
AM_MPEG2Profile_SNRScalable = 3,
|
||||
AM_MPEG2Profile_SpatiallyScalable = 4,
|
||||
AM_MPEG2Profile_High = 5,
|
||||
};
|
||||
|
||||
/* structs. */
|
||||
typedef struct
|
||||
{
|
||||
RECT rcSource;
|
||||
RECT rcTarget;
|
||||
DWORD dwBitRate;
|
||||
DWORD dwBitErrorRate;
|
||||
REFERENCE_TIME AvgTimePerFrame;
|
||||
DWORD dwInterlaceFlags;
|
||||
DWORD dwCopyProtectFlags;
|
||||
DWORD dwPictAspectRatioX;
|
||||
DWORD dwPictAspectRatioY;
|
||||
DWORD dwReserved1;
|
||||
DWORD dwReserved2;
|
||||
BITMAPINFOHEADER bmiHeader;
|
||||
} VIDEOINFOHEADER2;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
VIDEOINFOHEADER2 hdr;
|
||||
DWORD dwStartTimeCode;
|
||||
DWORD cbSequenceHeader;
|
||||
DWORD dwProfile;
|
||||
DWORD dwLevel;
|
||||
DWORD dwFlags;
|
||||
DWORD dwSequenceHeader[1];
|
||||
} MPEG2VIDEOINFO;
|
||||
|
||||
|
||||
/* defines. */
|
||||
#define AMINTERLACE_IsInterlaced 0x00000001
|
||||
#define AMINTERLACE_1FieldPerSample 0x00000002
|
||||
#define AMINTERLACE_Field1First 0x00000004
|
||||
|
||||
#define AMINTERLACE_FieldPatternMask 0x00000030
|
||||
#define AMINTERLACE_FieldPatField1Only 0x00000000
|
||||
#define AMINTERLACE_FieldPatField2Only 0x00000010
|
||||
#define AMINTERLACE_FieldPatBothRegular 0x00000020
|
||||
#define AMINTERLACE_FieldPatBothIrregular 0x00000030
|
||||
|
||||
#define AMINTERLACE_DisplayModeMask 0x000000C0
|
||||
#define AMINTERLACE_DisplayModeBobOnly 0x00000000
|
||||
#define AMINTERLACE_DisplayModeWeaveOnly 0x00000040
|
||||
#define AMINTERLACE_DisplayModeBobOrWeave 0x00000080
|
||||
|
||||
#define AMCOPYPROTECT_RestrictDuplication 0x1
|
||||
|
||||
#define AMMPEG2_DoPanScan 0x00000001
|
||||
#define AMMPEG2_DVDLine21Field1 0x00000002
|
||||
#define AMMPEG2_DVDLine21Field2 0x00000004
|
||||
#define AMMPEG2_SourceIsLetterboxed 0x00000008
|
||||
#define AMMPEG2_FilmCameraMode 0x00000010
|
||||
#define AMMPEG2_LetterboxAnalogOut 0x00000020
|
||||
|
||||
|
||||
|
||||
|
||||
#endif /* __WINE_DVDMEDIA_H_ */
|
|
@ -1,55 +0,0 @@
|
|||
/*
|
||||
* Copyright (C) 2001 Hidenori Takeshima
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#ifndef WINE_WINE_OBJ_KSPROPERTY_H
|
||||
#define WINE_WINE_OBJ_KSPROPERTY_H
|
||||
|
||||
/* NOTE: IKsPropertySet is declared in both dsound.h and strmif.h */
|
||||
|
||||
DEFINE_GUID(IID_IKsPropertySet, 0x31EFAC30,0x515C,0x11D0,0xA9,0xAA,0x00,0xAA,0x00,0x61,0xBE,0x93);
|
||||
typedef struct IKsPropertySet IKsPropertySet,*LPKSPROPERTYSET;
|
||||
|
||||
/*****************************************************************************
|
||||
* IKsPropertySet interface
|
||||
*/
|
||||
#define KSPROPERTY_SUPPORT_GET 1
|
||||
#define KSPROPERTY_SUPPORT_SET 2
|
||||
|
||||
#define ICOM_INTERFACE IKsPropertySet
|
||||
#define IKsPropertySet_METHODS \
|
||||
ICOM_METHOD7(HRESULT,Get,REFGUID,rgid,ULONG,x1,LPVOID,p1,ULONG,x2,LPVOID,p2,ULONG,x3,ULONG*,px4);\
|
||||
ICOM_METHOD6(HRESULT,Set,REFGUID,rgid,ULONG,x1,LPVOID,p1,ULONG,x2,LPVOID,p2,ULONG,x3);\
|
||||
ICOM_METHOD3(HRESULT,QuerySupport,REFGUID,rgid,ULONG,x1,ULONG*,px2);
|
||||
#define IKsPropertySet_IMETHODS \
|
||||
IUnknown_IMETHODS \
|
||||
IKsPropertySet_METHODS
|
||||
ICOM_DEFINE(IKsPropertySet,IUnknown)
|
||||
#undef ICOM_INTERFACE
|
||||
|
||||
#define IKsPropertySet_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
|
||||
#define IKsPropertySet_AddRef(p) ICOM_CALL (AddRef,p)
|
||||
#define IKsPropertySet_Release(p) ICOM_CALL (Release,p)
|
||||
#define IKsPropertySet_Get(p,a,b,c,d,e,f,g) ICOM_CALL7(Get,p,a,b,c,d,e,f,g)
|
||||
#define IKsPropertySet_Set(p,a,b,c,d,e,f) ICOM_CALL6(Set,p,a,b,c,d,e,f)
|
||||
#define IKsPropertySet_QuerySupport(p,a,b,c) ICOM_CALL3(QuerySupport,p,a,b,c)
|
||||
/* The real windows header declares 'QuerySupport' in dsound.h */
|
||||
/* but 'QuerySupported' in strmif.h ! */
|
||||
#define IKsPropertySet_QuerySupported(p,a,b,c) ICOM_CALL3(QuerySupport,p,a,b,c)
|
||||
|
||||
|
||||
#endif /* WINE_WINE_OBJ_KSPROPERTY_H */
|
Loading…
Reference in New Issue