ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
December 2004
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
26 participants
824 discussions
Start a n
N
ew thread
Integrated change by gvg in revision 12581
by gvg@svn.reactos.com
Tag Wine-20041201 Added: vendor/wine/dlls/oledlg/Wine-20041201/ _____ Copied: vendor/wine/dlls/oledlg/Wine-20041201 (from rev 12580, vendor/wine/dlls/oledlg/current)
19 years, 12 months
1
0
0
0
Integrated change by gvg in revision 12580
by gvg@svn.reactos.com
Wine-20041201 vendor drop Added: vendor/wine/dlls/oledlg/ Added: vendor/wine/dlls/oledlg/current/ Added: vendor/wine/dlls/oledlg/current/Makefile.in Added: vendor/wine/dlls/oledlg/current/insobjdlg.c Added: vendor/wine/dlls/oledlg/current/oledlg.spec Added: vendor/wine/dlls/oledlg/current/oledlg_Cs.rc Added: vendor/wine/dlls/oledlg/current/oledlg_De.rc Added: vendor/wine/dlls/oledlg/current/oledlg_En.rc Added: vendor/wine/dlls/oledlg/current/oledlg_Es.rc Added: vendor/wine/dlls/oledlg/current/oledlg_It.rc Added: vendor/wine/dlls/oledlg/current/oledlg_Ja.rc Added: vendor/wine/dlls/oledlg/current/oledlg_Nl.rc Added: vendor/wine/dlls/oledlg/current/oledlg_Pt.rc Added: vendor/wine/dlls/oledlg/current/oledlg_main.c Added: vendor/wine/dlls/oledlg/current/resource.h Added: vendor/wine/dlls/oledlg/current/rsrc.rc _____ Added: vendor/wine/dlls/oledlg/current/Makefile.in --- vendor/wine/dlls/oledlg/current/Makefile.in 2004-12-31 15:28:42 UTC (rev 12579) +++ vendor/wine/dlls/oledlg/current/Makefile.in 2004-12-31 15:29:49 UTC (rev 12580) @@ -0,0 +1,16 @@ +TOPSRCDIR = @top_srcdir@ +TOPOBJDIR = ../.. +SRCDIR = @srcdir@ +VPATH = @srcdir@ +MODULE = oledlg.dll +IMPORTS = ole32 comdlg32 user32 advapi32 kernel32 ntdll + +C_SRCS = \ + insobjdlg.c \ + oledlg_main.c + +RC_SRCS = rsrc.rc + +@MAKE_DLL_RULES@ + +### Dependencies: _____ Added: vendor/wine/dlls/oledlg/current/insobjdlg.c --- vendor/wine/dlls/oledlg/current/insobjdlg.c 2004-12-31 15:28:42 UTC (rev 12579) +++ vendor/wine/dlls/oledlg/current/insobjdlg.c 2004-12-31 15:29:49 UTC (rev 12580) @@ -0,0 +1,628 @@ +/* + * OLEDLG library + * + * Copyright 2003 Ulrich Czekalla 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 <stdarg.h> +#include <stdio.h> + +#include "windef.h" +#include "winbase.h" +#include "winreg.h" +#include "winternl.h" +#include "winnls.h" +#include "winerror.h" +#include "wingdi.h" +#include "winuser.h" +#include "wine/debug.h" +#include "wine/unicode.h" + +#include "oledlg.h" +#include "resource.h" + +WINE_DEFAULT_DEBUG_CHANNEL(oledlg); + +typedef struct +{ + HWND hwndSelf; + BOOL bObjListInit; /* Object list has been initialized */ + LPOLEUIINSERTOBJECTA lpOleUIInsertObject; + + HWND hwndObjTypeLBL; + HWND hwndObjTypeLB; + HWND hwndFileLBL; + HWND hwndFileTB; + HWND hwndCreateCtrlCB; + HWND hwndCreateNewCB; + HWND hwndCreateFromFileCB; + HWND hwndDisplayIconCB; + HWND hwndAddCtrlBTN; + HWND hwndBrowseBTN; + HWND hwndResultDesc; + +} InsertObjectDlgInfo; + +INT_PTR CALLBACK UIInsertObjectDlgProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam); +static LRESULT UIINSOBJDLG_OnWMCommand(HWND hwnd, WPARAM wParam, LPARAM lParam); +static void UIINSERTOBJECTDLG_InitDialog(InsertObjectDlgInfo* pdlgInfo); +static void UIINSERTOBJECTDLG_SelectCreateCtrl(InsertObjectDlgInfo* pdlgInfo); +static void UIINSERTOBJECTDLG_SelectCreateFromFile(InsertObjectDlgInfo* pdlgInfo); +static void UIINSERTOBJECTDLG_SelectCreateNew(InsertObjectDlgInfo* pdlgInfo); +static BOOL UIINSERTOBJECTDLG_PopulateObjectTypes(InsertObjectDlgInfo* pdlgInfo); +static void UIINSERTOBJECTDLG_FreeObjectTypes(InsertObjectDlgInfo* pdlgInfo); +static void UIINSERTOBJECTDLG_SelChange(InsertObjectDlgInfo* pdlgInfo); +static BOOL UIINSERTOBJECTDLG_OnOpen(InsertObjectDlgInfo* pdlgInfo); +static void UIINSERTOBJECTDLG_BrowseFile(InsertObjectDlgInfo* pdlgInfo); +static void UIINSERTOBJECTDLG_AddControl(InsertObjectDlgInfo* pdlgInfo); + +typedef HRESULT (*DLLREGISTER) (void); + +extern HINSTANCE OLEDLG_hInstance; +const char *OleUIInsertObjectInfoStr = "OleUIInsertObjectInfoStr"; + +/********************************************************************** * + * OleUIInsertObjectA (OLEDLG.3) + */ +UINT WINAPI OleUIInsertObjectA(LPOLEUIINSERTOBJECTA lpOleUIInsertObject) +{ + LRESULT lRes; + LPCVOID template; + HRSRC hRes; + InsertObjectDlgInfo dlgInfo; + HANDLE hDlgTmpl = 0; + + if (lpOleUIInsertObject->lpszTemplate || lpOleUIInsertObject->hResource) + FIXME("Customized template not supported\n"); + + /* Create the dialog from a template */ + if(!(hRes = FindResourceA(OLEDLG_hInstance,MAKEINTRESOURCEA(UIINSERTOBJECT), + (LPSTR)RT_DIALOG))) + { + return OLEUI_ERR_FINDTEMPLATEFAILURE; + } + + if (!(hDlgTmpl = LoadResource(OLEDLG_hInstance, hRes )) || + !(template = LockResource( hDlgTmpl ))) + { + return OLEUI_ERR_LOADTEMPLATEFAILURE; + } + + /* Initialize InsertObjectDlgInfo structure */ + dlgInfo.lpOleUIInsertObject = lpOleUIInsertObject; + dlgInfo.bObjListInit = FALSE; + + lRes = DialogBoxIndirectParamA(OLEDLG_hInstance, (const DLGTEMPLATE*) template, + lpOleUIInsertObject->hWndOwner, UIInsertObjectDlgProc, + (LPARAM) &dlgInfo); + + /* Unable to create the dialog */ + if( lRes == -1) + return OLEUI_ERR_DIALOGFAILURE; + + return lRes; +} + + +/********************************************************************** * + * UIInsertObjectDlgProc + * + * OLE UI Insert Object dialog procedure + */ +INT_PTR CALLBACK UIInsertObjectDlgProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) +{ + InsertObjectDlgInfo* pdlgInfo = (InsertObjectDlgInfo*) GetPropA(hwnd,OleUIInsertObjectInfoStr); + + switch(uMsg) + { + case WM_INITDIALOG: + { + InsertObjectDlgInfo* pdlgInfo = (InsertObjectDlgInfo*)lParam; + + pdlgInfo->hwndSelf = hwnd; + + SetPropA(hwnd, OleUIInsertObjectInfoStr, (HANDLE) pdlgInfo); + + UIINSERTOBJECTDLG_InitDialog(pdlgInfo); + + return 0; + } + + case WM_COMMAND: + return UIINSOBJDLG_OnWMCommand(hwnd, wParam, lParam); + + case WM_DESTROY: + if (pdlgInfo) + UIINSERTOBJECTDLG_FreeObjectTypes(pdlgInfo); + RemovePropA(hwnd, OleUIInsertObjectInfoStr); + return FALSE; + + default : + return FALSE; + } +} + + +/********************************************************************** * + * UIINSOBJDLG_OnWMCommand + * + * WM_COMMAND message handler + */ +static LRESULT UIINSOBJDLG_OnWMCommand(HWND hwnd, WPARAM wParam, LPARAM lParam) +{ + WORD wNotifyCode = HIWORD(wParam); + WORD wID = LOWORD(wParam); + InsertObjectDlgInfo* pdlgInfo = (InsertObjectDlgInfo*) GetPropA(hwnd,OleUIInsertObjectInfoStr); + + switch(wID) + { + case IDOK: + EndDialog(hwnd, UIINSERTOBJECTDLG_OnOpen(pdlgInfo)); + break; + + case IDCANCEL: + EndDialog(hwnd, FALSE); + break; + + case IDC_CREATECONTROL: + UIINSERTOBJECTDLG_SelectCreateCtrl(pdlgInfo); + break; + + case IDC_CREATENEW: + UIINSERTOBJECTDLG_SelectCreateNew(pdlgInfo); + break; + + case IDC_CREATEFROMFILE: + UIINSERTOBJECTDLG_SelectCreateFromFile(pdlgInfo); + break; + + case IDC_BROWSE: + UIINSERTOBJECTDLG_BrowseFile(pdlgInfo); + break; + + case IDC_ADDCONTROL: + UIINSERTOBJECTDLG_AddControl(pdlgInfo); + + case IDC_OBJTYPELIST: + { + if (wNotifyCode == LBN_SELCHANGE) + UIINSERTOBJECTDLG_SelChange(pdlgInfo); + break; + } + } + return 0; +} + + +/********************************************************************** * + * UIINSERTOBJECTDLG_InitDialog + * + * Initialize dialog display + */ +static void UIINSERTOBJECTDLG_InitDialog(InsertObjectDlgInfo* pdlgInfo) +{ + /* Initialize InsertObjectDlgInfo data structure */ + pdlgInfo->hwndObjTypeLB = GetDlgItem(pdlgInfo->hwndSelf, IDC_OBJTYPELIST); + pdlgInfo->hwndObjTypeLBL = GetDlgItem(pdlgInfo->hwndSelf, IDC_OBJTYPELBL); + pdlgInfo->hwndFileLBL = GetDlgItem(pdlgInfo->hwndSelf, IDC_FILELBL); + pdlgInfo->hwndFileTB = GetDlgItem(pdlgInfo->hwndSelf, IDC_FILE); + pdlgInfo->hwndCreateCtrlCB = GetDlgItem(pdlgInfo->hwndSelf, IDC_CREATECONTROL); + pdlgInfo->hwndCreateNewCB = GetDlgItem(pdlgInfo->hwndSelf, IDC_CREATENEW); + pdlgInfo->hwndCreateFromFileCB = GetDlgItem(pdlgInfo->hwndSelf, IDC_CREATEFROMFILE); + pdlgInfo->hwndDisplayIconCB = GetDlgItem(pdlgInfo->hwndSelf, IDC_ASICON); + pdlgInfo->hwndAddCtrlBTN = GetDlgItem(pdlgInfo->hwndSelf, IDC_ADDCONTROL); + pdlgInfo->hwndBrowseBTN = GetDlgItem(pdlgInfo->hwndSelf, IDC_BROWSE); + pdlgInfo->hwndResultDesc = GetDlgItem(pdlgInfo->hwndSelf, IDC_RESULTDESC); + + /* Setup dialog controls based on flags */ + if (pdlgInfo->lpOleUIInsertObject->lpszCaption) + SetWindowTextA(pdlgInfo->hwndSelf, pdlgInfo->lpOleUIInsertObject->lpszCaption); + + ShowWindow(pdlgInfo->hwndCreateCtrlCB, (pdlgInfo->lpOleUIInsertObject->dwFlags & + IOF_SHOWINSERTCONTROL) ? SW_SHOW : SW_HIDE); + ShowWindow(pdlgInfo->hwndDisplayIconCB, (pdlgInfo->lpOleUIInsertObject->dwFlags & + IOF_CHECKDISPLAYASICON) ? SW_SHOW : SW_HIDE); + EnableWindow(pdlgInfo->hwndDisplayIconCB, (pdlgInfo->lpOleUIInsertObject->dwFlags & + IOF_DISABLEDISPLAYASICON) ? FALSE : TRUE); + + if (pdlgInfo->lpOleUIInsertObject->dwFlags & IOF_SELECTCREATECONTROL) + UIINSERTOBJECTDLG_SelectCreateCtrl(pdlgInfo); + else if (pdlgInfo->lpOleUIInsertObject->dwFlags & IOF_SELECTCREATEFROMFILE) + UIINSERTOBJECTDLG_SelectCreateFromFile(pdlgInfo); + else /* (pdlgInfo->lpOleUIInsertObject->dwFlags & IOF_SELECTCREATENEW) */ + UIINSERTOBJECTDLG_SelectCreateNew(pdlgInfo); +} + + +/********************************************************************** * + * UIINSERTOBJECTDLG_SelectCreateCtrl + * + * Select Create Control Radio Button + */ +static void UIINSERTOBJECTDLG_SelectCreateCtrl(InsertObjectDlgInfo* pdlgInfo) +{ + ShowWindow(pdlgInfo->hwndDisplayIconCB, SW_HIDE); + ShowWindow(pdlgInfo->hwndFileLBL, SW_HIDE); + ShowWindow(pdlgInfo->hwndFileTB, SW_HIDE); + ShowWindow(pdlgInfo->hwndBrowseBTN, SW_HIDE); + + ShowWindow(pdlgInfo->hwndObjTypeLBL, SW_SHOW); + ShowWindow(pdlgInfo->hwndObjTypeLB, SW_SHOW); + ShowWindow(pdlgInfo->hwndAddCtrlBTN, SW_SHOW); + + SendMessageA(pdlgInfo->hwndCreateCtrlCB, BM_SETCHECK, BST_CHECKED, 0); + + /* Populate object type listbox */ + if (!pdlgInfo->bObjListInit) + UIINSERTOBJECTDLG_PopulateObjectTypes(pdlgInfo); +} + + +/********************************************************************** * + * UIINSERTOBJECTDLG_SelectCreateNew + * + * Select Create New Radio Button + */ +static void UIINSERTOBJECTDLG_SelectCreateNew(InsertObjectDlgInfo* pdlgInfo) +{ + ShowWindow(pdlgInfo->hwndFileLBL, SW_HIDE); + ShowWindow(pdlgInfo->hwndFileTB, SW_HIDE); + ShowWindow(pdlgInfo->hwndAddCtrlBTN, SW_HIDE); + ShowWindow(pdlgInfo->hwndBrowseBTN, SW_HIDE); + + if (pdlgInfo->lpOleUIInsertObject->dwFlags & IOF_CHECKDISPLAYASICON) + ShowWindow(pdlgInfo->hwndDisplayIconCB, SW_SHOW); + + ShowWindow(pdlgInfo->hwndObjTypeLBL, SW_SHOW); + ShowWindow(pdlgInfo->hwndObjTypeLB, SW_SHOW); + + SendMessageA(pdlgInfo->hwndCreateNewCB, BM_SETCHECK, BST_CHECKED, 0); + + if (!pdlgInfo->bObjListInit) + UIINSERTOBJECTDLG_PopulateObjectTypes(pdlgInfo); + + UIINSERTOBJECTDLG_SelChange(pdlgInfo); +} + + +/********************************************************************** * + * UIINSERTOBJECTDLG_SelectCreateFromFile + * + * Select Create From File Radio Button + */ +static void UIINSERTOBJECTDLG_SelectCreateFromFile(InsertObjectDlgInfo* pdlgInfo) +{ + char resstr[MAX_PATH]; + + ShowWindow(pdlgInfo->hwndAddCtrlBTN, SW_HIDE); + ShowWindow(pdlgInfo->hwndObjTypeLBL, SW_HIDE); + ShowWindow(pdlgInfo->hwndObjTypeLB, SW_HIDE); + + if (pdlgInfo->lpOleUIInsertObject->dwFlags & IOF_CHECKDISPLAYASICON) + ShowWindow(pdlgInfo->hwndDisplayIconCB, SW_SHOW); + + ShowWindow(pdlgInfo->hwndFileLBL, SW_SHOW); + ShowWindow(pdlgInfo->hwndFileTB, SW_SHOW); + ShowWindow(pdlgInfo->hwndBrowseBTN, SW_SHOW); + + SendMessageA(pdlgInfo->hwndCreateFromFileCB, BM_SETCHECK, BST_CHECKED, 0); + + if (LoadStringA(OLEDLG_hInstance, IDS_RESULTFILEOBJDESC, resstr, MAX_PATH)) + SendMessageA(pdlgInfo->hwndResultDesc, WM_SETTEXT, 0, (LPARAM)resstr); +} + + +/********************************************************************** * + * UIINSERTOBJECTDLG_PopulateObjectTypes + * + * Populate Object Type listbox + */ +static BOOL UIINSERTOBJECTDLG_PopulateObjectTypes(InsertObjectDlgInfo* pdlgInfo) +{ + DWORD i, len; + HKEY hkclsids; + HKEY hkey; + CLSID clsid; + HRESULT ret; + CHAR szclsid[128]; + CHAR keydesc[MAX_PATH]; + CHAR keyname[MAX_PATH]; + WCHAR wszclsid[128]; + DWORD index = 0; + + UIINSERTOBJECTDLG_FreeObjectTypes(pdlgInfo); + + RegOpenKeyExA(HKEY_CLASSES_ROOT, "CLSID", 0, KEY_READ, &hkclsids); + + while (ERROR_SUCCESS == (ret = RegEnumKeyA(hkclsids, index, szclsid, MAX_PATH))) + { + index++; + + RegOpenKeyExA(hkclsids, szclsid, 0, KEY_READ, &hkey); + + len = MAX_PATH; + if (ERROR_SUCCESS != RegQueryValueA(hkey, "Insertable", keyname, &len)) + continue; + + len = MAX_PATH; + if (ERROR_SUCCESS == RegQueryValueA(hkey, "NotInsertable", keyname, &len)) + continue; + + RtlMultiByteToUnicodeN(wszclsid, MAX_PATH, NULL, szclsid, MAX_PATH); + CLSIDFromString(wszclsid, &clsid); + + for (i = 0; i < pdlgInfo->lpOleUIInsertObject->cClsidExclude; i++) + if (IsEqualGUID(&pdlgInfo->lpOleUIInsertObject->lpClsidExclude[i], &clsid)) + break; + + if (i < pdlgInfo->lpOleUIInsertObject->cClsidExclude) + continue; + + len = MAX_PATH; + if (ERROR_SUCCESS == RegQueryValueA(hkey, NULL, keydesc, &len)) + { + CLSID* lpclsid = (CLSID*) HeapAlloc(GetProcessHeap(), 0, sizeof(CLSID)); + memcpy(lpclsid, &clsid, sizeof(CLSID)); + + len = SendMessageA(pdlgInfo->hwndObjTypeLB, LB_ADDSTRING, 0, (LPARAM)keydesc); + SendMessageA(pdlgInfo->hwndObjTypeLB, LB_SETITEMDATA, (WPARAM)len, (LPARAM)lpclsid); + } + } + + pdlgInfo->bObjListInit = (ret == ERROR_NO_MORE_ITEMS); + + return pdlgInfo->bObjListInit; +} + + +/********************************************************************** * + * UIINSERTOBJECTDLG_FreeObjectTypes + * + * Free Object Types listbox + */ +static void UIINSERTOBJECTDLG_FreeObjectTypes(InsertObjectDlgInfo* pdlgInfo) +{ + UINT i, count; + + count = SendMessageA(pdlgInfo->hwndObjTypeLB, LB_GETCOUNT, (WPARAM)0, (LPARAM)0); + + for (i = 0; i < count; i++) + { + CLSID* lpclsid = (CLSID*) SendMessageA(pdlgInfo->hwndObjTypeLB, + LB_GETITEMDATA, (WPARAM)i, (LPARAM)0); + HeapFree(GetProcessHeap(), 0, lpclsid); + } +} + + +/********************************************************************** * + * UIINSERTOBJECTDLG_SelChange + * + * Handle object type selection change + */ +static void UIINSERTOBJECTDLG_SelChange(InsertObjectDlgInfo* pdlgInfo) +{ + INT index; + CHAR objname[MAX_PATH]; + CHAR objdesc[MAX_PATH]; + CHAR resstr[MAX_PATH]; + + TRACE("\n"); + + if (LoadStringA(OLEDLG_hInstance, IDS_RESULTOBJDESC, resstr, MAX_PATH) && + ((index = SendMessageA(pdlgInfo->hwndObjTypeLB, LB_GETCURSEL, 0, 0)) >= 0) && + SendMessageA(pdlgInfo->hwndObjTypeLB, LB_GETTEXT, (WPARAM)index, (LPARAM)objname)) + sprintf(objdesc, resstr, objname); + else + objdesc[0] = 0; + + SendMessageA(pdlgInfo->hwndResultDesc, WM_SETTEXT, 0, (LPARAM)objdesc); +} + + +/********************************************************************** * + * UIINSERTOBJECTDLG_SelChange + * + * Handle OK Button + */ +static BOOL UIINSERTOBJECTDLG_OnOpen(InsertObjectDlgInfo* pdlgInfo) +{ + BOOL bret = FALSE; + + if (BST_CHECKED == SendMessageA(pdlgInfo->hwndCreateCtrlCB, BM_GETCHECK, 0, 0) || + BST_CHECKED == SendMessageA(pdlgInfo->hwndCreateNewCB, BM_GETCHECK, 0, 0)) + { + INT index = SendMessageA(pdlgInfo->hwndObjTypeLB, LB_GETCURSEL, 0, 0); + + if (index >= 0) + { + CLSID* clsid = (CLSID*) SendMessageA(pdlgInfo->hwndObjTypeLB, + LB_GETITEMDATA, (WPARAM)index, 0); + memcpy(&pdlgInfo->lpOleUIInsertObject->clsid, clsid, sizeof(CLSID)); + + if (pdlgInfo->lpOleUIInsertObject->dwFlags & IOF_CREATENEWOBJECT) + { + pdlgInfo->lpOleUIInsertObject->sc= OleCreate( + &pdlgInfo->lpOleUIInsertObject->clsid, + &pdlgInfo->lpOleUIInsertObject->iid, + pdlgInfo->lpOleUIInsertObject->oleRender, + pdlgInfo->lpOleUIInsertObject->lpFormatEtc, + pdlgInfo->lpOleUIInsertObject->lpIOleClientSite, + pdlgInfo->lpOleUIInsertObject->lpIStorage, + pdlgInfo->lpOleUIInsertObject->ppvObj); + } + + bret = TRUE; + } + } + else if (BST_CHECKED == SendMessageA(pdlgInfo->hwndCreateFromFileCB, BM_GETCHECK, 0, 0)) + { + char fname[MAX_PATH]; + + if (pdlgInfo->lpOleUIInsertObject->lpszFile) + { + HRESULT hres; + WCHAR wcsFile[MAX_PATH]; + + SendMessageA(pdlgInfo->hwndFileTB, WM_GETTEXT, (WPARAM)MAX_PATH, (LPARAM)fname); + strncpy(pdlgInfo->lpOleUIInsertObject->lpszFile, fname, pdlgInfo->lpOleUIInsertObject->cchFile); + + RtlMultiByteToUnicodeN(wcsFile, MAX_PATH, NULL, fname, MAX_PATH); + if (ERROR_SUCCESS == (hres = GetClassFile(wcsFile, &pdlgInfo->lpOleUIInsertObject->clsid))) + { + if (pdlgInfo->lpOleUIInsertObject->dwFlags & IOF_CREATEFILEOBJECT) + { + hres = OleCreateFromFile( + &pdlgInfo->lpOleUIInsertObject->clsid, + wcsFile, + &pdlgInfo->lpOleUIInsertObject->iid, + pdlgInfo->lpOleUIInsertObject->oleRender, + pdlgInfo->lpOleUIInsertObject->lpFormatEtc, + pdlgInfo->lpOleUIInsertObject->lpIOleClientSite, + pdlgInfo->lpOleUIInsertObject->lpIStorage, + pdlgInfo->lpOleUIInsertObject->ppvObj); + } + + bret = TRUE; + } + pdlgInfo->lpOleUIInsertObject->sc = hres; + } + } + + return bret; +} + + +/********************************************************************** * + * UIINSERTOBJECTDLG_BrowseFile + * + * Browse for the file + */ +static void UIINSERTOBJECTDLG_BrowseFile(InsertObjectDlgInfo* pdlgInfo) +{ + OPENFILENAMEA fn; + char fname[MAX_PATH]; + char title[32]; + + fn.lStructSize = sizeof(OPENFILENAMEA); + fn.hwndOwner = pdlgInfo->hwndSelf; + fn.hInstance = 0; + fn.lpstrFilter = "All Files\0*.*\0\0"; + fn.lpstrCustomFilter = NULL; + fn.nMaxCustFilter = 0; + fn.nFilterIndex = 0; + + SendMessageA(pdlgInfo->hwndFileTB, WM_GETTEXT, (WPARAM)MAX_PATH, (LPARAM)fname); + fn.lpstrFile = fname; + fn.nMaxFile = MAX_PATH; + + fn.lpstrFileTitle = NULL; + fn.nMaxFileTitle = 0; + fn.lpstrInitialDir = NULL; + + LoadStringA(OLEDLG_hInstance, IDS_BROWSE, title, 32); + fn.lpstrTitle = title; + + fn.Flags = OFN_EXPLORER | OFN_FILEMUSTEXIST | + OFN_HIDEREADONLY | OFN_LONGNAMES; + fn.nFileOffset = 0; + fn.nFileExtension = 0; + fn.lpstrDefExt = NULL; + fn.lCustData = 0; + fn.lpfnHook = NULL; + fn.lpTemplateName = NULL; + + if (GetOpenFileNameA(&fn)) + SendMessageA(pdlgInfo->hwndFileTB, WM_SETTEXT, (WPARAM)0, (LPARAM)fn.lpstrFile); +} + + +/********************************************************************** * + * UIINSERTOBJECTDLG_AddControl + * + * Add control to Object Type + */ +static void UIINSERTOBJECTDLG_AddControl(InsertObjectDlgInfo* pdlgInfo) +{ + OPENFILENAMEA fn; + char fname[MAX_PATH]; + char title[32]; + + fn.lStructSize = sizeof(OPENFILENAMEA); + fn.hwndOwner = pdlgInfo->hwndSelf; + fn.hInstance = 0; + fn.lpstrFilter = "OLE Controls\0*.ocx\0Libraries\0*.dll\0All Files\0*.*\0\0"; + fn.lpstrCustomFilter = NULL; + fn.nMaxCustFilter = 0; + fn.nFilterIndex = 0; + + fname[0] = 0; + fn.lpstrFile = fname; + fn.nMaxFile = MAX_PATH; + + fn.lpstrFileTitle = NULL; + fn.nMaxFileTitle = 0; + fn.lpstrInitialDir = NULL; + + LoadStringA(OLEDLG_hInstance, IDS_BROWSE, title, 32); + fn.lpstrTitle = title; + + fn.Flags = OFN_EXPLORER | OFN_FILEMUSTEXIST | + OFN_HIDEREADONLY | OFN_LONGNAMES; + fn.nFileOffset = 0; + fn.nFileExtension = 0; + fn.lpstrDefExt = NULL; + fn.lCustData = 0; + fn.lpfnHook = NULL; + fn.lpTemplateName = NULL; + + if (GetOpenFileNameA(&fn)) + { + HMODULE hMod; + BOOL bValid = FALSE; + + hMod = LoadLibraryA(fn.lpstrFile); + + if (hMod) + { + DLLREGISTER regproc; + + regproc = (DLLREGISTER) GetProcAddress(hMod, "DllRegisterServer"); + if (regproc) + { + if (S_OK == regproc()) + { + UIINSERTOBJECTDLG_PopulateObjectTypes(pdlgInfo); + bValid = TRUE; + } + } + + FreeLibrary(hMod); + } + + if (!bValid) + { + char title[32]; + char msg[256]; + + LoadStringA(OLEDLG_hInstance, IDS_NOTOLEMODCAPTION, title, 32); + LoadStringA(OLEDLG_hInstance, IDS_NOTOLEMOD, msg, 256); + + MessageBoxA(pdlgInfo->hwndSelf, msg, title, MB_ICONEXCLAMATION); + } + } +} _____ Added: vendor/wine/dlls/oledlg/current/oledlg.spec --- vendor/wine/dlls/oledlg/current/oledlg.spec 2004-12-31 15:28:42 UTC (rev 12579) +++ vendor/wine/dlls/oledlg/current/oledlg.spec 2004-12-31 15:29:49 UTC (rev 12580) @@ -0,0 +1,23 @@ + 1 stdcall OleUIAddVerbMenuA(ptr str long long long long long long ptr) + 2 stdcall OleUICanConvertOrActivateAs(ptr long long) + 3 stdcall OleUIInsertObjectA(ptr) + 4 stdcall OleUIPasteSpecialA(ptr) + 5 stdcall OleUIEditLinksA(ptr) + 6 stdcall OleUIChangeIconA(ptr) + 7 stdcall OleUIConvertA(ptr) + 8 stdcall OleUIBusyA(ptr) + 9 stdcall OleUIUpdateLinksA(ptr long str long) + 10 varargs OleUIPromptUserA(long long) + 11 stdcall OleUIObjectPropertiesA(ptr) + 12 stdcall OleUIChangeSourceA(ptr) + 13 varargs OleUIPromptUserW(long long) + 14 stdcall OleUIAddVerbMenuW(ptr wstr long long long long long long ptr) + 15 stdcall OleUIBusyW(ptr) + 16 stdcall OleUIChangeIconW(ptr) + 17 stdcall OleUIChangeSourceW(ptr) + 18 stdcall OleUIConvertW(ptr) + 19 stdcall OleUIEditLinksW(ptr) + 20 stdcall OleUIInsertObjectW(ptr) + 21 stdcall OleUIObjectPropertiesW(ptr) + 22 stdcall OleUIPasteSpecialW(ptr) + 23 stdcall OleUIUpdateLinksW(ptr long wstr long) _____ Added: vendor/wine/dlls/oledlg/current/oledlg_Cs.rc --- vendor/wine/dlls/oledlg/current/oledlg_Cs.rc 2004-12-31 15:28:42 UTC (rev 12579) +++ vendor/wine/dlls/oledlg/current/oledlg_Cs.rc 2004-12-31 15:29:49 UTC (rev 12580) @@ -0,0 +1,57 @@ +/* + * Czech resources or oledlg + * Copyright 2003 Ulrich Czekalla for CodeWeavers + * Copyright 2004 David Kredba + * + * 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_CZECH, SUBLANG_DEFAULT + +UIINSERTOBJECT DIALOG DISCARDABLE 0, 0, 294, 151 +STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Vlo¾it objekt" +FONT 8, "MS Shell Dlg" +BEGIN + LISTBOX IDC_OBJTYPELIST,82,19,131,66,LBS_SORT | + LBS_NOINTEGRALHEIGHT | WS_VISIBLE | WS_VSCROLL | + WS_TABSTOP + LTEXT "Typ objektu:",IDC_OBJTYPELBL,82,7,53,8,WS_VISIBLE + DEFPUSHBUTTON "OK",IDOK,221,7,66,14 + PUSHBUTTON "Storno",IDCANCEL,221,24,66,14 + GROUPBOX "Výsledek",IDC_RESULT,7,103,208,41 + CONTROL "Vytvoøit nový",IDC_CREATENEW,"Button",BS_AUTORADIOBUTTON | + WS_GROUP,7,20,62,10 + CONTROL "Vytvoøit propojení",IDC_CREATECONTROL,"Button", + BS_AUTORADIOBUTTON | NOT WS_VISIBLE,7,54,62,10 + CONTROL "Vytvoøit ze souboru",IDC_CREATEFROMFILE,"Button", + BS_AUTORADIOBUTTON,7,37,67,10 + LTEXT "",IDC_RESULTDESC,49,112,159,23 + PUSHBUTTON "Pøid&at propojení...",IDC_ADDCONTROL,81,88,63,14,NOT WS_VISIBLE + CONTROL "Zobrazit jako ikonu",IDC_ASICON,"Button",BS_AUTOCHECKBOX | + WS_TABSTOP | NOT WS_VISIBLE,223,58,64,10 + PUSHBUTTON "Procházet...",IDC_BROWSE,83,53,50,14,NOT WS_VISIBLE + LTEXT "Soubor:",IDC_FILELBL,83,27,20,8, NOT WS_VISIBLE + EDITTEXT IDC_FILE,83,37,132,13,ES_AUTOHSCROLL | NOT WS_VISIBLE +END + +STRINGTABLE DISCARDABLE +{ + IDS_RESULTOBJDESC "Vlo¾en nový %s objekt do Va¹eho dokumentu" + IDS_RESULTFILEOBJDESC "Vlo¾en obsah souboru jako objekt do Va¹eho dokumentu, tak¾e ho mù¾ete upravit programem, kterým byl vytvoøen." + IDS_BROWSE "Procházet" + IDS_NOTOLEMOD "Soubor není platným OLE modulem. Nelze registrovat OLE propojení." + IDS_NOTOLEMODCAPTION "Pøidat propojení" +} _____ Added: vendor/wine/dlls/oledlg/current/oledlg_De.rc --- vendor/wine/dlls/oledlg/current/oledlg_De.rc 2004-12-31 15:28:42 UTC (rev 12579) +++ vendor/wine/dlls/oledlg/current/oledlg_De.rc 2004-12-31 15:29:49 UTC (rev 12580) @@ -0,0 +1,55 @@ +/* + * Copyright 2004 Henning Gerhardt + * + * 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_GERMAN, SUBLANG_DEFAULT + +UIINSERTOBJECT DIALOG DISCARDABLE 0, 0, 294, 151 +STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Objekt einfügen" +FONT 8, "MS Shell Dlg" +BEGIN + LISTBOX IDC_OBJTYPELIST,82,19,131,66,LBS_SORT | + LBS_NOINTEGRALHEIGHT | WS_VISIBLE | WS_VSCROLL | + WS_TABSTOP + LTEXT "Objekttyp:",IDC_OBJTYPELBL,82,7,53,8,WS_VISIBLE + DEFPUSHBUTTON "OK",IDOK,221,7,66,14 + PUSHBUTTON "Abbrechen",IDCANCEL,221,24,66,14 + GROUPBOX "Ergebnis",IDC_RESULT,7,103,208,41 + CONTROL "&Neu erstellen",IDC_CREATENEW,"Button",BS_AUTORADIOBUTTON | + WS_GROUP,7,20,62,10 + CONTROL "S&teuerung erstellen",IDC_CREATECONTROL,"Button", + BS_AUTORADIOBUTTON | NOT WS_VISIBLE,7,54,62,10 + CONTROL "A&us Datei erstellen",IDC_CREATEFROMFILE,"Button", + BS_AUTORADIOBUTTON,7,37,67,10 + LTEXT "",IDC_RESULTDESC,49,112,159,23 + PUSHBUTTON "Steuerung hin&zufügen",IDC_ADDCONTROL,81,88,63,14,NOT WS_VISIBLE + CONTROL "Als &Symbol anzeigen",IDC_ASICON,"Button",BS_AUTOCHECKBOX | + WS_TABSTOP | NOT WS_VISIBLE,223,58,64,10 + PUSHBUTTON "D&urchsuchen...",IDC_BROWSE,83,53,50,14,NOT WS_VISIBLE + LTEXT "Datei:",IDC_FILELBL,83,27,20,8, NOT WS_VISIBLE + EDITTEXT IDC_FILE,83,37,132,13,ES_AUTOHSCROLL | NOT WS_VISIBLE +END + +STRINGTABLE DISCARDABLE +{ + IDS_RESULTOBJDESC "Fügt ein neues %s - Objekt in Ihr Dokument ein." + IDS_RESULTFILEOBJDESC "Fügt den Inhalt der Datei als Objekt so in Ihr Dokument ein, dass Sie es mit dem Programm aktivieren können, mit dem es erstellt wurde." + IDS_BROWSE "Durchsuchen" + IDS_NOTOLEMOD "Die Datei ist offenbar kein gültiges OLE - Steuermodul. Die OLE - Steuerung konnte nicht registiert werden." + IDS_NOTOLEMODCAPTION "Steuerung hinzufügen" +} _____ Added: vendor/wine/dlls/oledlg/current/oledlg_En.rc --- vendor/wine/dlls/oledlg/current/oledlg_En.rc 2004-12-31 15:28:42 UTC (rev 12579) +++ vendor/wine/dlls/oledlg/current/oledlg_En.rc 2004-12-31 15:29:49 UTC (rev 12580) @@ -0,0 +1,55 @@ +/* + * Copyright 2003 Ulrich Czekalla 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 + */ + +LANGUAGE LANG_ENGLISH, SUBLANG_DEFAULT + +UIINSERTOBJECT DIALOG DISCARDABLE 0, 0, 294, 151 +STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Insert Object" +FONT 8, "MS Shell Dlg" +BEGIN + LISTBOX IDC_OBJTYPELIST,82,19,131,66,LBS_SORT | + LBS_NOINTEGRALHEIGHT | WS_VISIBLE | WS_VSCROLL | + WS_TABSTOP + LTEXT "Object Type:",IDC_OBJTYPELBL,82,7,53,8,WS_VISIBLE + DEFPUSHBUTTON "OK",IDOK,221,7,66,14 + PUSHBUTTON "Cancel",IDCANCEL,221,24,66,14 + GROUPBOX "Result",IDC_RESULT,7,103,208,41 + CONTROL "Create New",IDC_CREATENEW,"Button",BS_AUTORADIOBUTTON | + WS_GROUP,7,20,62,10 + CONTROL "Create Control",IDC_CREATECONTROL,"Button", + BS_AUTORADIOBUTTON | NOT WS_VISIBLE,7,54,62,10 + CONTROL "Create From File",IDC_CREATEFROMFILE,"Button", + BS_AUTORADIOBUTTON,7,37,67,10 + LTEXT "",IDC_RESULTDESC,49,112,159,23 + PUSHBUTTON "&Add Control...",IDC_ADDCONTROL,81,88,63,14,NOT WS_VISIBLE + CONTROL "Display As Icon",IDC_ASICON,"Button",BS_AUTOCHECKBOX | + WS_TABSTOP | NOT WS_VISIBLE,223,58,64,10 + PUSHBUTTON "Browse...",IDC_BROWSE,83,53,50,14,NOT WS_VISIBLE + LTEXT "File:",IDC_FILELBL,83,27,20,8, NOT WS_VISIBLE + EDITTEXT IDC_FILE,83,37,132,13,ES_AUTOHSCROLL | NOT WS_VISIBLE +END + +STRINGTABLE DISCARDABLE +{ + IDS_RESULTOBJDESC "Insert a new %s object into your document" + IDS_RESULTFILEOBJDESC "Insert the contents of the file as an object into your document so that you may activate it using the program which created it." + IDS_BROWSE "Browse" + IDS_NOTOLEMOD "File does not appear to be a valid OLE module. Unable to register OLE control." + IDS_NOTOLEMODCAPTION "Add Control" +} _____ Added: vendor/wine/dlls/oledlg/current/oledlg_Es.rc --- vendor/wine/dlls/oledlg/current/oledlg_Es.rc 2004-12-31 15:28:42 UTC (rev 12579) +++ vendor/wine/dlls/oledlg/current/oledlg_Es.rc 2004-12-31 15:29:49 UTC (rev 12580) @@ -0,0 +1,55 @@ +/* + * Copyright 2004 José Manuel Ferrer Ortiz + * + * 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_SPANISH, SUBLANG_DEFAULT + +UIINSERTOBJECT DIALOG DISCARDABLE 0, 0, 294, 151 +STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Insertar objeto" +FONT 8, "MS Shell Dlg" +BEGIN + LISTBOX IDC_OBJTYPELIST,82,19,131,66,LBS_SORT | + LBS_NOINTEGRALHEIGHT | WS_VISIBLE | WS_VSCROLL | + WS_TABSTOP + LTEXT "Tipo de objeto:",IDC_OBJTYPELBL,82,7,53,8,WS_VISIBLE + DEFPUSHBUTTON "Aceptar",IDOK,221,7,66,14 + PUSHBUTTON "Cancelar",IDCANCEL,221,24,66,14 + GROUPBOX "Resultado",IDC_RESULT,7,103,208,41 + CONTROL "Crear nuevo",IDC_CREATENEW,"Button",BS_AUTORADIOBUTTON | + WS_GROUP,7,20,62,10 + CONTROL "Crear control",IDC_CREATECONTROL,"Button", + BS_AUTORADIOBUTTON | NOT WS_VISIBLE,7,54,62,10 + CONTROL "Crear desde archivo",IDC_CREATEFROMFILE,"Button", + BS_AUTORADIOBUTTON,7,37,67,10 + LTEXT "",IDC_RESULTDESC,49,112,159,23 + PUSHBUTTON "&Añadir control...",IDC_ADDCONTROL,81,88,63,14,NOT WS_VISIBLE + CONTROL "Mostrar como icono",IDC_ASICON,"Button",BS_AUTOCHECKBOX | + WS_TABSTOP | NOT WS_VISIBLE,223,58,64,10 + PUSHBUTTON "Explorar...",IDC_BROWSE,83,53,50,14,NOT WS_VISIBLE + LTEXT "Archivo:",IDC_FILELBL,83,27,20,8, NOT WS_VISIBLE + EDITTEXT IDC_FILE,83,37,132,13,ES_AUTOHSCROLL | NOT WS_VISIBLE +END + +STRINGTABLE DISCARDABLE +{ + IDS_RESULTOBJDESC "Inserta un nuevo objeto %s en su documento" + IDS_RESULTFILEOBJDESC "Inserta el contenido del archivo como un objeto en su documento, con lo que podrá activarlo utilizando el programa que lo creó." + IDS_BROWSE "Explorar" + IDS_NOTOLEMOD "El archivo no parece ser un módulo OLE válido. Incapaz de registrar el control OLE." + IDS_NOTOLEMODCAPTION "Añadir control" +} _____ Added: vendor/wine/dlls/oledlg/current/oledlg_It.rc --- vendor/wine/dlls/oledlg/current/oledlg_It.rc 2004-12-31 15:28:42 UTC (rev 12579) +++ vendor/wine/dlls/oledlg/current/oledlg_It.rc 2004-12-31 15:29:49 UTC (rev 12580) @@ -0,0 +1,56 @@ +/* + * Copyright 2003 Ulrich Czekalla for CodeWeavers + * Copyright 2003 Ivan Leo Puoti + * + * 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_ITALIAN, SUBLANG_DEFAULT + +UIINSERTOBJECT DIALOG DISCARDABLE 0, 0, 294, 151 +STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Insersci oggetto" +FONT 8, "MS Shell Dlg" +BEGIN + LISTBOX IDC_OBJTYPELIST,82,19,131,66,LBS_SORT | + LBS_NOINTEGRALHEIGHT | WS_VISIBLE | WS_VSCROLL | + WS_TABSTOP + LTEXT "Tipo di oggetto:",IDC_OBJTYPELBL,82,7,53,8,WS_VISIBLE + DEFPUSHBUTTON "OK",IDOK,221,7,66,14 + PUSHBUTTON "Annulla",IDCANCEL,221,24,66,14 + GROUPBOX "Risultato",IDC_RESULT,7,103,208,41 + CONTROL "Crea Nuovo",IDC_CREATENEW,"Button",BS_AUTORADIOBUTTON | + WS_GROUP,7,20,62,10 + CONTROL "Crea Controllo",IDC_CREATECONTROL,"Tasto", + BS_AUTORADIOBUTTON | NOT WS_VISIBLE,7,54,62,10 + CONTROL "Crea da File",IDC_CREATEFROMFILE,"Tasto", + BS_AUTORADIOBUTTON,7,37,67,10 + LTEXT "",IDC_RESULTDESC,49,112,159,23 + PUSHBUTTON "&Aggiungi Controllo...",IDC_ADDCONTROL,81,88,63,14,NOT WS_VISIBLE + CONTROL "Visualizza come Icona",IDC_ASICON,"Button",BS_AUTOCHECKBOX | + WS_TABSTOP | NOT WS_VISIBLE,223,58,64,10 + PUSHBUTTON "Esplora...",IDC_BROWSE,83,53,50,14,NOT WS_VISIBLE + LTEXT "File:",IDC_FILELBL,83,27,20,8, NOT WS_VISIBLE + EDITTEXT IDC_FILE,83,37,132,13,ES_AUTOHSCROLL | NOT WS_VISIBLE +END + +STRINGTABLE DISCARDABLE +{ + IDS_RESULTOBJDESC "Inserisci un nuovo oggetto %s nel documento" + IDS_RESULTFILEOBJDESC "Inserisci i contenuti del file come un oggetto nel documento in modo da poterlo attivare usando il programma che lo ha creato." + IDS_BROWSE "Esplora" + IDS_NOTOLEMOD "Il file non sembra essere un module OLE valido. Impossibile registrare il controllo OLE." + IDS_NOTOLEMODCAPTION "Aggiungi Controllo" +} _____ Added: vendor/wine/dlls/oledlg/current/oledlg_Ja.rc --- vendor/wine/dlls/oledlg/current/oledlg_Ja.rc 2004-12-31 15:28:42 UTC (rev 12579) +++ vendor/wine/dlls/oledlg/current/oledlg_Ja.rc 2004-12-31 15:29:49 UTC (rev 12580) @@ -0,0 +1,55 @@ +/* + * Copyright 2004 Hajime Segawa + * + * 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 [truncated at 1000 lines; 571 more skipped]
19 years, 12 months
1
0
0
0
Integrated change by gvg in revision 12579
by gvg@svn.reactos.com
Import and merge Wine-20041201 Added: trunk/reactos/lib/oleaut32/ Added: trunk/reactos/lib/oleaut32/Makefile.ros-template Added: trunk/reactos/lib/oleaut32/cursoricon.h Added: trunk/reactos/lib/oleaut32/makefile Modified: trunk/reactos/lib/oleaut32/oaidl_p.c Modified: trunk/reactos/lib/oleaut32/variant.c Modified: trunk/reactos/lib/oleaut32/variant.h _____ Copied: trunk/reactos/lib/oleaut32 (from rev 12578, vendor/wine/dlls/oleaut32/current) _____ Added: trunk/reactos/lib/oleaut32/Makefile.ros-template --- vendor/wine/dlls/oleaut32/current/Makefile.ros-template 2004-12-31 15:27:32 UTC (rev 12578) +++ trunk/reactos/lib/oleaut32/Makefile.ros-template 2004-12-31 15:28:42 UTC (rev 12579) @@ -0,0 +1,21 @@ +# $Id: Makefile.ros-template 12052 2004-12-12 18:01:23Z navaraf $ + +TARGET_NAME = oleaut32 + +TARGET_OBJECTS = @C_SRCS@ + +TARGET_CFLAGS = @EXTRADEFS@ -D__REACTOS__ + +TARGET_SDKLIBS = @IMPORTS@ winmm.a wine.a wine_uuid.a wine_unicode.a ntdll.a + +TARGET_BASE = $(TARGET_BASE_LIB_OLEAUT32) + +TARGET_RC_SRCS = @RC_SRCS@ +TARGET_RC_BINSRC = @RC_BINSRC@ +TARGET_RC_BINARIES = @RC_BINARIES@ + +default: all + +DEP_OBJECTS = $(TARGET_OBJECTS) + +include $(TOOLS_PATH)/depend.mk _____ Added: trunk/reactos/lib/oleaut32/cursoricon.h --- vendor/wine/dlls/oleaut32/current/cursoricon.h 2004-12-31 15:27:32 UTC (rev 12578) +++ trunk/reactos/lib/oleaut32/cursoricon.h 2004-12-31 15:28:42 UTC (rev 12579) @@ -0,0 +1,89 @@ +/* + * Cursor and icon definitions + * + * Copyright 1995 Alexandre Julliard + * + * 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_CURSORICON_H +#define __WINE_CURSORICON_H + +#include <windef.h> + +#include <pshpack1.h> + +typedef struct +{ + BYTE bWidth; + BYTE bHeight; + BYTE bColorCount; + BYTE bReserved; +} ICONRESDIR; + +typedef struct +{ + WORD wWidth; + WORD wHeight; +} CURSORDIR; + +typedef struct +{ union + { ICONRESDIR icon; + CURSORDIR cursor; + } ResInfo; + WORD wPlanes; + WORD wBitCount; + DWORD dwBytesInRes; + WORD wResId; +} CURSORICONDIRENTRY; + +typedef struct +{ + WORD idReserved; + WORD idType; + WORD idCount; + CURSORICONDIRENTRY idEntries[1]; +} CURSORICONDIR; + +typedef struct { + BYTE bWidth; + BYTE bHeight; + BYTE bColorCount; + BYTE bReserved; + WORD xHotspot; + WORD yHotspot; + DWORD dwDIBSize; + DWORD dwDIBOffset; +} CURSORICONFILEDIRENTRY; + +typedef struct +{ + WORD idReserved; + WORD idType; + WORD idCount; + CURSORICONFILEDIRENTRY idEntries[1]; +} CURSORICONFILEDIR; + + +#include <poppack.h> + +#define CID_RESOURCE 0x0001 +#define CID_WIN32 0x0004 +#define CID_NONSHARED 0x0008 + +extern void CURSORICON_FreeModuleIcons( HMODULE16 hModule ); + +#endif /* __WINE_CURSORICON_H */ _____ Added: trunk/reactos/lib/oleaut32/makefile --- vendor/wine/dlls/oleaut32/current/makefile 2004-12-31 15:27:32 UTC (rev 12578) +++ trunk/reactos/lib/oleaut32/makefile 2004-12-31 15:28:42 UTC (rev 12579) @@ -0,0 +1,9 @@ +# $Id: makefile 8082 2004-02-07 18:53:59Z mf $ + +PATH_TO_TOP = ../.. + +TARGET_TYPE = winedll + +include $(PATH_TO_TOP)/rules.mak + +include $(TOOLS_PATH)/helper.mk _____ Modified: trunk/reactos/lib/oleaut32/oaidl_p.c --- vendor/wine/dlls/oleaut32/current/oaidl_p.c 2004-12-31 15:27:32 UTC (rev 12578) +++ trunk/reactos/lib/oleaut32/oaidl_p.c 2004-12-31 15:28:42 UTC (rev 12579) @@ -57,8 +57,8 @@ } MIDL_PROC_FORMAT_STRING; -extern const MIDL_TYPE_FORMAT_STRING __MIDL_TypeFormatString; -extern const MIDL_PROC_FORMAT_STRING __MIDL_ProcFormatString; +static const MIDL_TYPE_FORMAT_STRING __MIDL_TypeFormatString; +static const MIDL_PROC_FORMAT_STRING __MIDL_ProcFormatString; /* Standard interface: __MIDL_itf_oaidl_0000, ver. 0.0, @@ -77,7 +77,7 @@ GUID={0x00020400,0x0000,0x0000,{0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46} } */ -extern const MIDL_STUB_DESC Object_StubDesc; +static const MIDL_STUB_DESC Object_StubDesc; HRESULT STDMETHODCALLTYPE IDispatch_GetTypeInfoCount_Proxy( @@ -116,9 +116,11 @@ if ( (_RpcMessage.DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION ) NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[0] ); - *pctinfo = *(( UINT __RPC_FAR * )_StubMsg.Buffer)++; + *pctinfo = *( UINT __RPC_FAR * )_StubMsg.Buffer; + _StubMsg.Buffer += sizeof(UINT); - _RetVal = *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++; + _RetVal = *( HRESULT __RPC_FAR * )_StubMsg.Buffer; + _StubMsg.Buffer += sizeof(HRESULT); } RpcFinally @@ -157,7 +159,7 @@ &_StubMsg, &Object_StubDesc, _pRpcChannelBuffer); - ( UINT __RPC_FAR * )pctinfo = 0; + pctinfo = 0; RpcTryFinally { pctinfo = &_M0; @@ -169,9 +171,11 @@ _StubMsg.BufferLength = 4U + 4U; NdrStubGetBuffer(This, _pRpcChannelBuffer, &_StubMsg); - *(( UINT __RPC_FAR * )_StubMsg.Buffer)++ = *pctinfo; + *( UINT __RPC_FAR * )_StubMsg.Buffer = *pctinfo; + _StubMsg.Buffer += sizeof(UINT); - *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++ = _RetVal; + *( HRESULT __RPC_FAR * )_StubMsg.Buffer = _RetVal; + _StubMsg.Buffer += sizeof(HRESULT); } RpcFinally @@ -224,9 +228,11 @@ _StubMsg.BufferLength = 4U + 4U; NdrProxyGetBuffer(This, &_StubMsg); - *(( UINT __RPC_FAR * )_StubMsg.Buffer)++ = iTInfo; + *( UINT __RPC_FAR * )_StubMsg.Buffer = iTInfo; + _StubMsg.Buffer += sizeof(UINT); - *(( LCID __RPC_FAR * )_StubMsg.Buffer)++ = lcid; + *( LCID __RPC_FAR * )_StubMsg.Buffer = lcid; + _StubMsg.Buffer += sizeof(LCID); NdrProxySendReceive(This, &_StubMsg); @@ -239,7 +245,8 @@ (unsigned char)0 ); _StubMsg.Buffer = (unsigned char __RPC_FAR *)(((long)_StubMsg.Buffer + 3) & ~ 0x3); - _RetVal = *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++; + _RetVal = *( HRESULT __RPC_FAR * )_StubMsg.Buffer; + _StubMsg.Buffer += sizeof(HRESULT); } RpcFinally @@ -280,15 +287,17 @@ &_StubMsg, &Object_StubDesc, _pRpcChannelBuffer); - ( ITypeInfo __RPC_FAR *__RPC_FAR * )ppTInfo = 0; + ppTInfo = 0; RpcTryFinally { if ( (_pRpcMessage->DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION ) NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[6] ); - iTInfo = *(( UINT __RPC_FAR * )_StubMsg.Buffer)++; + iTInfo = *( UINT __RPC_FAR * )_StubMsg.Buffer; + _StubMsg.Buffer += sizeof(UINT); - lcid = *(( LCID __RPC_FAR * )_StubMsg.Buffer)++; + lcid = *( LCID __RPC_FAR * )_StubMsg.Buffer; + _StubMsg.Buffer += sizeof(LCID); ppTInfo = &_M1; _M1 = 0; @@ -315,7 +324,8 @@ (PFORMAT_STRING) &__MIDL_TypeFormatString.Format[6] ); _StubMsg.Buffer = (unsigned char __RPC_FAR *)(((long)_StubMsg.Buffer + 3) & ~ 0x3); - *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++ = _RetVal; + *( HRESULT __RPC_FAR * )_StubMsg.Buffer = _RetVal; + _StubMsg.Buffer += sizeof(HRESULT); } RpcFinally @@ -396,9 +406,11 @@ (PFORMAT_STRING) &__MIDL_TypeFormatString.Format[54] ); _StubMsg.Buffer = (unsigned char __RPC_FAR *)(((long)_StubMsg.Buffer + 3) & ~ 0x3); - *(( UINT __RPC_FAR * )_StubMsg.Buffer)++ = cNames; + *( UINT __RPC_FAR * )_StubMsg.Buffer = cNames; + _StubMsg.Buffer += sizeof(UINT); - *(( LCID __RPC_FAR * )_StubMsg.Buffer)++ = lcid; + *( LCID __RPC_FAR * )_StubMsg.Buffer = lcid; + _StubMsg.Buffer += sizeof(LCID); NdrProxySendReceive(This, &_StubMsg); @@ -410,7 +422,8 @@ (PFORMAT_STRING) &__MIDL_TypeFormatString.Format[88], (unsigned char)0 ); - _RetVal = *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++; + _RetVal = *( HRESULT __RPC_FAR * )_StubMsg.Buffer; + _StubMsg.Buffer += sizeof(HRESULT); } RpcFinally @@ -454,8 +467,8 @@ &_StubMsg, &Object_StubDesc, _pRpcChannelBuffer); - ( LPOLESTR __RPC_FAR * )rgszNames = 0; - ( DISPID __RPC_FAR * )rgDispId = 0; + rgszNames = 0; + rgDispId = 0; RpcTryFinally { if ( (_pRpcMessage->DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION ) @@ -472,9 +485,12 @@ (unsigned char)0 ); _StubMsg.Buffer = (unsigned char __RPC_FAR *)(((long)_StubMsg.Buffer + 3) & ~ 0x3); - cNames = *(( UINT __RPC_FAR * )_StubMsg.Buffer)++; + cNames = *( UINT __RPC_FAR * )_StubMsg.Buffer; + _StubMsg.Buffer += sizeof(UINT); + - lcid = *(( LCID __RPC_FAR * )_StubMsg.Buffer)++; + lcid = *( LCID __RPC_FAR * )_StubMsg.Buffer; + _StubMsg.Buffer += sizeof(LCID); rgDispId = NdrAllocate(&_StubMsg,cNames * 4); @@ -505,7 +521,8 @@ (unsigned char __RPC_FAR *)rgDispId, (PFORMAT_STRING) &__MIDL_TypeFormatString.Format[88] ); - *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++ = _RetVal; + *( HRESULT __RPC_FAR * )_StubMsg.Buffer = _RetVal; + _StubMsg.Buffer += sizeof(HRESULT); } RpcFinally @@ -626,22 +643,26 @@ (PFORMAT_STRING) &__MIDL_TypeFormatString.Format[1184] ); NdrProxyGetBuffer(This, &_StubMsg); - *(( DISPID __RPC_FAR * )_StubMsg.Buffer)++ = dispIdMember; + *( DISPID __RPC_FAR * )_StubMsg.Buffer = dispIdMember; + _StubMsg.Buffer += sizeof(DISPID); NdrSimpleStructMarshall( (PMIDL_STUB_MESSAGE)& _StubMsg, (unsigned char __RPC_FAR *)riid, (PFORMAT_STRING) &__MIDL_TypeFormatString.Format[38] ); - *(( LCID __RPC_FAR * )_StubMsg.Buffer)++ = lcid; + *( LCID __RPC_FAR * )_StubMsg.Buffer = lcid; + _StubMsg.Buffer += sizeof(LCID); - *(( DWORD __RPC_FAR * )_StubMsg.Buffer)++ = dwFlags; + *( DWORD __RPC_FAR * )_StubMsg.Buffer = dwFlags; + _StubMsg.Buffer += sizeof(DWORD); NdrComplexStructMarshall( (PMIDL_STUB_MESSAGE)& _StubMsg, (unsigned char __RPC_FAR *)pDispParams, (PFORMAT_STRING) &__MIDL_TypeFormatString.Format[1080] ); _StubMsg.Buffer = (unsigned char __RPC_FAR *)(((long)_StubMsg.Buffer + 3) & ~ 0x3); - *(( UINT __RPC_FAR * )_StubMsg.Buffer)++ = cVarRef; + *( UINT __RPC_FAR * )_StubMsg.Buffer = cVarRef; + _StubMsg.Buffer += sizeof(UINT); _StubMsg.MaxCount = cVarRef; @@ -671,7 +692,8 @@ (unsigned char)0 ); _StubMsg.Buffer = (unsigned char __RPC_FAR *)(((long)_StubMsg.Buffer + 3) & ~ 0x3); - *pArgErr = *(( UINT __RPC_FAR * )_StubMsg.Buffer)++; + *pArgErr = *( UINT __RPC_FAR * )_StubMsg.Buffer; + _StubMsg.Buffer += sizeof(UINT); NdrComplexArrayUnmarshall( (PMIDL_STUB_MESSAGE) &_StubMsg, (unsigned char __RPC_FAR * __RPC_FAR *)&rgVarRef, @@ -679,7 +701,8 @@ (unsigned char)0 ); _StubMsg.Buffer = (unsigned char __RPC_FAR *)(((long)_StubMsg.Buffer + 3) & ~ 0x3); - _RetVal = *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++; + _RetVal = *( HRESULT __RPC_FAR * )_StubMsg.Buffer; + _StubMsg.Buffer += sizeof(HRESULT); } RpcFinally @@ -744,27 +767,30 @@ &_StubMsg, &Object_StubDesc, _pRpcChannelBuffer); - ( DISPPARAMS __RPC_FAR * )pDispParams = 0; - ( VARIANT __RPC_FAR * )pVarResult = 0; - ( EXCEPINFO __RPC_FAR * )pExcepInfo = 0; - ( UINT __RPC_FAR * )pArgErr = 0; - ( UINT __RPC_FAR * )rgVarRefIdx = 0; - ( VARIANTARG __RPC_FAR * )rgVarRef = 0; + pDispParams = 0; + pVarResult = 0; + pExcepInfo = 0; + pArgErr = 0; + rgVarRefIdx = 0; + rgVarRef = 0; RpcTryFinally { if ( (_pRpcMessage->DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION ) NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[34] ); - dispIdMember = *(( DISPID __RPC_FAR * )_StubMsg.Buffer)++; + dispIdMember = *( DISPID __RPC_FAR * )_StubMsg.Buffer; + _StubMsg.Buffer += sizeof(DISPID); NdrSimpleStructUnmarshall( (PMIDL_STUB_MESSAGE) &_StubMsg, (unsigned char __RPC_FAR * __RPC_FAR *)&riid, (PFORMAT_STRING) &__MIDL_TypeFormatString.Format[38], (unsigned char)0 ); - lcid = *(( LCID __RPC_FAR * )_StubMsg.Buffer)++; + lcid = *( LCID __RPC_FAR * )_StubMsg.Buffer; + _StubMsg.Buffer += sizeof(LCID); - dwFlags = *(( DWORD __RPC_FAR * )_StubMsg.Buffer)++; + dwFlags = *( DWORD __RPC_FAR * )_StubMsg.Buffer; + _StubMsg.Buffer += sizeof(DWORD); NdrComplexStructUnmarshall( (PMIDL_STUB_MESSAGE) &_StubMsg, (unsigned char __RPC_FAR * __RPC_FAR *)&pDispParams, @@ -772,7 +798,8 @@ (unsigned char)0 ); _StubMsg.Buffer = (unsigned char __RPC_FAR *)(((long)_StubMsg.Buffer + 3) & ~ 0x3); - cVarRef = *(( UINT __RPC_FAR * )_StubMsg.Buffer)++; + cVarRef = *( UINT __RPC_FAR * )_StubMsg.Buffer; + _StubMsg.Buffer += sizeof(UINT); NdrConformantArrayUnmarshall( (PMIDL_STUB_MESSAGE) &_StubMsg, (unsigned char __RPC_FAR * __RPC_FAR *)&rgVarRefIdx, @@ -838,7 +865,8 @@ (PFORMAT_STRING) &__MIDL_TypeFormatString.Format[1138] ); _StubMsg.Buffer = (unsigned char __RPC_FAR *)(((long)_StubMsg.Buffer + 3) & ~ 0x3); - *(( UINT __RPC_FAR * )_StubMsg.Buffer)++ = *pArgErr; + *( UINT __RPC_FAR * )_StubMsg.Buffer = *pArgErr; + _StubMsg.Buffer += sizeof(UINT); _StubMsg.MaxCount = cVarRef; @@ -847,7 +875,8 @@ (PFORMAT_STRING) &__MIDL_TypeFormatString.Format[1184] ); _StubMsg.Buffer = (unsigned char __RPC_FAR *)(((long)_StubMsg.Buffer + 3) & ~ 0x3); - *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++ = _RetVal; + *( HRESULT __RPC_FAR * )_StubMsg.Buffer = _RetVal; + _StubMsg.Buffer += sizeof(HRESULT); } RpcFinally @@ -963,7 +992,8 @@ _StubMsg.BufferLength = 4U; NdrProxyGetBuffer(This, &_StubMsg); - *(( ULONG __RPC_FAR * )_StubMsg.Buffer)++ = celt; + *( ULONG __RPC_FAR * )_StubMsg.Buffer = celt; + _StubMsg.Buffer += sizeof(ULONG); NdrProxySendReceive(This, &_StubMsg); @@ -976,9 +1006,11 @@ (unsigned char)0 ); _StubMsg.Buffer = (unsigned char __RPC_FAR *)(((long)_StubMsg.Buffer + 3) & ~ 0x3); - *pCeltFetched = *(( ULONG __RPC_FAR * )_StubMsg.Buffer)++; + *pCeltFetched = *( ULONG __RPC_FAR * )_StubMsg.Buffer; + _StubMsg.Buffer += sizeof(ULONG); - _RetVal = *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++; + _RetVal = *( HRESULT __RPC_FAR * )_StubMsg.Buffer; + _StubMsg.Buffer += sizeof(HRESULT); } RpcFinally @@ -1027,14 +1059,15 @@ &_StubMsg, &Object_StubDesc, _pRpcChannelBuffer); - ( VARIANT __RPC_FAR * )rgVar = 0; - ( ULONG __RPC_FAR * )pCeltFetched = 0; + rgVar = 0; + pCeltFetched = 0; RpcTryFinally { if ( (_pRpcMessage->DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION ) NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[72] ); - celt = *(( ULONG __RPC_FAR * )_StubMsg.Buffer)++; + celt = *( ULONG __RPC_FAR * )_StubMsg.Buffer; + _StubMsg.Buffer += sizeof(ULONG); rgVar = NdrAllocate(&_StubMsg,celt * 16); pCeltFetched = &_M11; @@ -1071,9 +1104,11 @@ (PFORMAT_STRING) &__MIDL_TypeFormatString.Format[1206] ); _StubMsg.Buffer = (unsigned char __RPC_FAR *)(((long)_StubMsg.Buffer + 3) & ~ 0x3); - *(( ULONG __RPC_FAR * )_StubMsg.Buffer)++ = *pCeltFetched; + *( ULONG __RPC_FAR * )_StubMsg.Buffer = *pCeltFetched; + _StubMsg.Buffer += sizeof(ULONG); - *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++ = _RetVal; + *( HRESULT __RPC_FAR * )_StubMsg.Buffer = _RetVal; + _StubMsg.Buffer += sizeof(HRESULT); } RpcFinally @@ -1121,14 +1156,16 @@ _StubMsg.BufferLength = 4U; NdrProxyGetBuffer(This, &_StubMsg); - *(( ULONG __RPC_FAR * )_StubMsg.Buffer)++ = celt; + *( ULONG __RPC_FAR * )_StubMsg.Buffer = celt; + _StubMsg.Buffer += sizeof(ULONG); NdrProxySendReceive(This, &_StubMsg); if ( (_RpcMessage.DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION ) NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[84] ); - _RetVal = *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++; + _RetVal = *( HRESULT __RPC_FAR * )_StubMsg.Buffer; + _StubMsg.Buffer += sizeof(HRESULT); } RpcFinally @@ -1167,9 +1204,9 @@ if ( (_pRpcMessage->DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION ) NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[84] ); - celt = *(( ULONG __RPC_FAR * )_StubMsg.Buffer)++; + celt = *( ULONG __RPC_FAR * )_StubMsg.Buffer; + _StubMsg.Buffer += sizeof(ULONG); - *_pdwStubPhase = STUB_CALL_SERVER; _RetVal = (((IEnumVARIANT*) ((CStdStubBuffer *)This)->pvServerObject)->lpVtbl) -> Skip((IEnumVARIANT *) ((CStdStubBuffer *)This)->pvServerObject,celt); @@ -1177,7 +1214,8 @@ _StubMsg.BufferLength = 4U; NdrStubGetBuffer(This, _pRpcChannelBuffer, &_StubMsg); - *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++ = _RetVal; + *( HRESULT __RPC_FAR * )_StubMsg.Buffer = _RetVal; + _StubMsg.Buffer += sizeof(HRESULT); } RpcFinally @@ -1221,8 +1259,9 @@ if ( (_RpcMessage.DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION ) NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[88] ); - _RetVal = *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++; - + _RetVal = *( HRESULT __RPC_FAR * )_StubMsg.Buffer; + _StubMsg.Buffer += sizeof(HRESULT); + } RpcFinally { @@ -1264,7 +1303,8 @@ _StubMsg.BufferLength = 4U; NdrStubGetBuffer(This, _pRpcChannelBuffer, &_StubMsg); - *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++ = _RetVal; + *( HRESULT __RPC_FAR * )_StubMsg.Buffer = _RetVal; + _StubMsg.Buffer += sizeof(HRESULT); } RpcFinally @@ -1326,7 +1366,8 @@ (unsigned char)0 ); _StubMsg.Buffer = (unsigned char __RPC_FAR *)(((long)_StubMsg.Buffer + 3) & ~ 0x3); - _RetVal = *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++; + _RetVal = *( HRESULT __RPC_FAR * )_StubMsg.Buffer; + _StubMsg.Buffer += sizeof(HRESULT); } RpcFinally @@ -1365,7 +1406,7 @@ &_StubMsg, &Object_StubDesc, _pRpcChannelBuffer); - ( IEnumVARIANT __RPC_FAR *__RPC_FAR * )ppEnum = 0; + ppEnum = 0; RpcTryFinally { ppEnum = &_M12; @@ -1389,7 +1430,8 @@ (PFORMAT_STRING) &__MIDL_TypeFormatString.Format[1224] ); _StubMsg.Buffer = (unsigned char __RPC_FAR *)(((long)_StubMsg.Buffer + 3) & ~ 0x3); - *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++ = _RetVal; + *( HRESULT __RPC_FAR * )_StubMsg.Buffer = _RetVal; + _StubMsg.Buffer += sizeof(HRESULT); } RpcFinally @@ -1548,9 +1590,11 @@ (PFORMAT_STRING) &__MIDL_TypeFormatString.Format[1248] ); _StubMsg.Buffer = (unsigned char __RPC_FAR *)(((long)_StubMsg.Buffer + 3) & ~ 0x3); - *(( ULONG __RPC_FAR * )_StubMsg.Buffer)++ = lHashVal; + *( ULONG __RPC_FAR * )_StubMsg.Buffer = lHashVal; + _StubMsg.Buffer += sizeof(ULONG); - *(( WORD __RPC_FAR * )_StubMsg.Buffer)++ = wFlags; + *( WORD __RPC_FAR * )_StubMsg.Buffer = wFlags; + _StubMsg.Buffer += sizeof(WORD); NdrProxySendReceive(This, &_StubMsg); @@ -1588,7 +1632,8 @@ (unsigned char)0 ); _StubMsg.Buffer = (unsigned char __RPC_FAR *)(((long)_StubMsg.Buffer + 3) & ~ 0x3); - _RetVal = *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++; + _RetVal = *( HRESULT __RPC_FAR * )_StubMsg.Buffer; + _StubMsg.Buffer += sizeof(HRESULT); } RpcFinally @@ -1660,13 +1705,13 @@ &_StubMsg, &Object_StubDesc, _pRpcChannelBuffer); - ( LPOLESTR )szName = 0; - ( ITypeInfo __RPC_FAR *__RPC_FAR * )ppTInfo = 0; - ( DESCKIND __RPC_FAR * )pDescKind = 0; - ( LPFUNCDESC __RPC_FAR * )ppFuncDesc = 0; - ( LPVARDESC __RPC_FAR * )ppVarDesc = 0; - ( ITypeComp __RPC_FAR *__RPC_FAR * )ppTypeComp = 0; - ( CLEANLOCALSTORAGE __RPC_FAR * )pDummy = 0; + szName = 0; + ppTInfo = 0; + pDescKind = 0; + ppFuncDesc = 0; + ppVarDesc = 0; + ppTypeComp = 0; + pDummy = 0; RpcTryFinally { if ( (_pRpcMessage->DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION ) @@ -1678,9 +1723,11 @@ (unsigned char)0 ); _StubMsg.Buffer = (unsigned char __RPC_FAR *)(((long)_StubMsg.Buffer + 3) & ~ 0x3); - lHashVal = *(( ULONG __RPC_FAR * )_StubMsg.Buffer)++; + lHashVal = *( ULONG __RPC_FAR * )_StubMsg.Buffer; + _StubMsg.Buffer += sizeof(ULONG); - wFlags = *(( WORD __RPC_FAR * )_StubMsg.Buffer)++; + wFlags = *( WORD __RPC_FAR * )_StubMsg.Buffer; + _StubMsg.Buffer += sizeof(WORD); ppTInfo = &_M15; _M15 = 0; @@ -1759,7 +1806,8 @@ (PFORMAT_STRING) &__MIDL_TypeFormatString.Format[1568] ); _StubMsg.Buffer = (unsigned char __RPC_FAR *)(((long)_StubMsg.Buffer + 3) & ~ 0x3); - *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++ = _RetVal; + *( HRESULT __RPC_FAR * )_StubMsg.Buffer = _RetVal; + _StubMsg.Buffer += sizeof(HRESULT); } RpcFinally @@ -1845,7 +1893,8 @@ (PFORMAT_STRING) &__MIDL_TypeFormatString.Format[1248] ); _StubMsg.Buffer = (unsigned char __RPC_FAR *)(((long)_StubMsg.Buffer + 3) & ~ 0x3); - *(( ULONG __RPC_FAR * )_StubMsg.Buffer)++ = lHashVal; + *( ULONG __RPC_FAR * )_StubMsg.Buffer = lHashVal; + _StubMsg.Buffer += sizeof(ULONG); NdrProxySendReceive(This, &_StubMsg); @@ -1858,7 +1907,8 @@ (unsigned char)0 ); _StubMsg.Buffer = (unsigned char __RPC_FAR *)(((long)_StubMsg.Buffer + 3) & ~ 0x3); - _RetVal = *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++; + _RetVal = *( HRESULT __RPC_FAR * )_StubMsg.Buffer; + _StubMsg.Buffer += sizeof(HRESULT); } RpcFinally @@ -1899,8 +1949,8 @@ &_StubMsg, &Object_StubDesc, _pRpcChannelBuffer); - ( LPOLESTR )szName = 0; - ( ITypeInfo __RPC_FAR *__RPC_FAR * )ppTInfo = 0; + szName = 0; + ppTInfo = 0; RpcTryFinally { if ( (_pRpcMessage->DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION ) @@ -1912,7 +1962,8 @@ (unsigned char)0 ); _StubMsg.Buffer = (unsigned char __RPC_FAR *)(((long)_StubMsg.Buffer + 3) & ~ 0x3); - lHashVal = *(( ULONG __RPC_FAR * )_StubMsg.Buffer)++; + lHashVal = *( ULONG __RPC_FAR * )_StubMsg.Buffer; + _StubMsg.Buffer += sizeof(ULONG); ppTInfo = &_M23; _M23 = 0; @@ -1941,7 +1992,8 @@ (PFORMAT_STRING) &__MIDL_TypeFormatString.Format[6] ); _StubMsg.Buffer = (unsigned char __RPC_FAR *)(((long)_StubMsg.Buffer + 3) & ~ 0x3); - *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++ = _RetVal; + *( HRESULT __RPC_FAR * )_StubMsg.Buffer = _RetVal; + _StubMsg.Buffer += sizeof(HRESULT); } RpcFinally @@ -2058,7 +2110,8 @@ (unsigned char)0 ); _StubMsg.Buffer = (unsigned char __RPC_FAR *)(((long)_StubMsg.Buffer + 3) & ~ 0x3); - _RetVal = *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++; + _RetVal = *( HRESULT __RPC_FAR * )_StubMsg.Buffer; + _StubMsg.Buffer += sizeof(HRESULT); } RpcFinally @@ -2103,8 +2156,8 @@ &_StubMsg, &Object_StubDesc, _pRpcChannelBuffer); - ( LPTYPEATTR __RPC_FAR * )ppTypeAttr = 0; - ( CLEANLOCALSTORAGE __RPC_FAR * )pDummy = 0; + ppTypeAttr = 0; + pDummy = 0; RpcTryFinally { ppTypeAttr = &_M24; @@ -2142,7 +2195,8 @@ (PFORMAT_STRING) &__MIDL_TypeFormatString.Format[1644] ); _StubMsg.Buffer = (unsigned char __RPC_FAR *)(((long)_StubMsg.Buffer + 3) & ~ 0x3); - *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++ = _RetVal; + *( HRESULT __RPC_FAR * )_StubMsg.Buffer = _RetVal; + _StubMsg.Buffer += sizeof(HRESULT); } RpcFinally @@ -2212,7 +2266,8 @@ (unsigned char)0 ); _StubMsg.Buffer = (unsigned char __RPC_FAR *)(((long)_StubMsg.Buffer + 3) & ~ 0x3); - _RetVal = *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++; + _RetVal = *( HRESULT __RPC_FAR * )_StubMsg.Buffer; + _StubMsg.Buffer += sizeof(HRESULT); } RpcFinally @@ -2251,7 +2306,7 @@ &_StubMsg, &Object_StubDesc, _pRpcChannelBuffer); - ( ITypeComp __RPC_FAR *__RPC_FAR * )ppTComp = 0; + ppTComp = 0; RpcTryFinally { ppTComp = &_M26; @@ -2275,7 +2330,8 @@ (PFORMAT_STRING) &__MIDL_TypeFormatString.Format[1540] ); _StubMsg.Buffer = (unsigned char __RPC_FAR *)(((long)_StubMsg.Buffer + 3) & ~ 0x3); - *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++ = _RetVal; + *( HRESULT __RPC_FAR * )_StubMsg.Buffer = _RetVal; + _StubMsg.Buffer += sizeof(HRESULT); } RpcFinally @@ -2340,7 +2396,8 @@ _StubMsg.BufferLength = 4U; NdrProxyGetBuffer(This, &_StubMsg); - *(( UINT __RPC_FAR * )_StubMsg.Buffer)++ = index; + *( UINT __RPC_FAR * )_StubMsg.Buffer = index; + _StubMsg.Buffer += sizeof(UINT); NdrProxySendReceive(This, &_StubMsg); @@ -2358,7 +2415,8 @@ (unsigned char)0 ); _StubMsg.Buffer = (unsigned char __RPC_FAR *)(((long)_StubMsg.Buffer + 3) & ~ 0x3); - _RetVal = *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++; + _RetVal = *( HRESULT __RPC_FAR * )_StubMsg.Buffer; + _StubMsg.Buffer += sizeof(HRESULT); } RpcFinally @@ -2404,14 +2462,15 @@ &_StubMsg, &Object_StubDesc, _pRpcChannelBuffer); - ( LPFUNCDESC __RPC_FAR * )ppFuncDesc = 0; - ( CLEANLOCALSTORAGE __RPC_FAR * )pDummy = 0; + ppFuncDesc = 0; + pDummy = 0; RpcTryFinally { if ( (_pRpcMessage->DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION ) NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[158] ); - index = *(( UINT __RPC_FAR * )_StubMsg.Buffer)++; + index = *( UINT __RPC_FAR * )_StubMsg.Buffer; + _StubMsg.Buffer += sizeof(UINT); ppFuncDesc = &_M27; _M27 = 0; @@ -2449,7 +2508,8 @@ (PFORMAT_STRING) &__MIDL_TypeFormatString.Format[1660] ); _StubMsg.Buffer = (unsigned char __RPC_FAR *)(((long)_StubMsg.Buffer + 3) & ~ 0x3); - *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++ = _RetVal; + *( HRESULT __RPC_FAR * )_StubMsg.Buffer = _RetVal; + _StubMsg.Buffer += sizeof(HRESULT); } RpcFinally @@ -2518,7 +2578,8 @@ _StubMsg.BufferLength = 4U; NdrProxyGetBuffer(This, &_StubMsg); - *(( UINT __RPC_FAR * )_StubMsg.Buffer)++ = index; + *( UINT __RPC_FAR * )_StubMsg.Buffer = index; + _StubMsg.Buffer += sizeof(UINT); NdrProxySendReceive(This, &_StubMsg); @@ -2536,7 +2597,8 @@ (unsigned char)0 ); _StubMsg.Buffer = (unsigned char __RPC_FAR *)(((long)_StubMsg.Buffer + 3) & ~ 0x3); - _RetVal = *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++; + _RetVal = *( HRESULT __RPC_FAR * )_StubMsg.Buffer; + _StubMsg.Buffer += sizeof(HRESULT); } RpcFinally @@ -2582,14 +2644,15 @@ &_StubMsg, &Object_StubDesc, _pRpcChannelBuffer); - ( LPVARDESC __RPC_FAR * )ppVarDesc = 0; - ( CLEANLOCALSTORAGE __RPC_FAR * )pDummy = 0; + ppVarDesc = 0; + pDummy = 0; RpcTryFinally { if ( (_pRpcMessage->DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION ) NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[170] ); - index = *(( UINT __RPC_FAR * )_StubMsg.Buffer)++; + index = *( UINT __RPC_FAR * )_StubMsg.Buffer; + _StubMsg.Buffer += sizeof(UINT); ppVarDesc = &_M29; _M29 = 0; @@ -2627,7 +2690,8 @@ (PFORMAT_STRING) &__MIDL_TypeFormatString.Format[1676] ); _StubMsg.Buffer = (unsigned char __RPC_FAR *)(((long)_StubMsg.Buffer + 3) & ~ 0x3); - *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++ = _RetVal; + *( HRESULT __RPC_FAR * )_StubMsg.Buffer = _RetVal; + _StubMsg.Buffer += sizeof(HRESULT); } RpcFinally @@ -2693,9 +2757,11 @@ _StubMsg.BufferLength = 4U + 4U; NdrProxyGetBuffer(This, &_StubMsg); - *(( MEMBERID __RPC_FAR * )_StubMsg.Buffer)++ = memid; + *( MEMBERID __RPC_FAR * )_StubMsg.Buffer = memid; + _StubMsg.Buffer += sizeof(MEMBERID); - *(( UINT __RPC_FAR * )_StubMsg.Buffer)++ = cMaxNames; + *( UINT __RPC_FAR * )_StubMsg.Buffer = cMaxNames; + _StubMsg.Buffer += sizeof(UINT); NdrProxySendReceive(This, &_StubMsg); @@ -2708,9 +2774,11 @@ (unsigned char)0 ); _StubMsg.Buffer = (unsigned char __RPC_FAR *)(((long)_StubMsg.Buffer + 3) & ~ 0x3); - *pcNames = *(( UINT __RPC_FAR * )_StubMsg.Buffer)++; + *pcNames = *( UINT __RPC_FAR * )_StubMsg.Buffer; + _StubMsg.Buffer += sizeof(UINT); - _RetVal = *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++; + _RetVal = *( HRESULT __RPC_FAR * )_StubMsg.Buffer; + _StubMsg.Buffer += sizeof(HRESULT); } RpcFinally @@ -2760,16 +2828,18 @@ &_StubMsg, &Object_StubDesc, _pRpcChannelBuffer); - ( BSTR __RPC_FAR * )rgBstrNames = 0; - ( UINT __RPC_FAR * )pcNames = 0; + rgBstrNames = 0; + pcNames = 0; RpcTryFinally { if ( (_pRpcMessage->DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION ) NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[182] ); - memid = *(( MEMBERID __RPC_FAR * )_StubMsg.Buffer)++; + memid = *( MEMBERID __RPC_FAR * )_StubMsg.Buffer; + _StubMsg.Buffer += sizeof(MEMBERID); - cMaxNames = *(( UINT __RPC_FAR * )_StubMsg.Buffer)++; + cMaxNames = *( UINT __RPC_FAR * )_StubMsg.Buffer; + _StubMsg.Buffer += sizeof(UINT); rgBstrNames = NdrAllocate(&_StubMsg,cMaxNames * 4); pcNames = &_M34; @@ -2807,9 +2877,11 @@ (PFORMAT_STRING) &__MIDL_TypeFormatString.Format[1690] ); _StubMsg.Buffer = (unsigned char __RPC_FAR *)(((long)_StubMsg.Buffer + 3) & ~ 0x3); - *(( UINT __RPC_FAR * )_StubMsg.Buffer)++ = *pcNames; + *( UINT __RPC_FAR * )_StubMsg.Buffer = *pcNames; + _StubMsg.Buffer += sizeof(UINT); - *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++ = _RetVal; + *( HRESULT __RPC_FAR * )_StubMsg.Buffer = _RetVal; + _StubMsg.Buffer += sizeof(HRESULT); } RpcFinally @@ -2862,16 +2934,19 @@ _StubMsg.BufferLength = 4U; NdrProxyGetBuffer(This, &_StubMsg); - *(( UINT __RPC_FAR * )_StubMsg.Buffer)++ = index; + *( UINT __RPC_FAR * )_StubMsg.Buffer = index; + _StubMsg.Buffer += sizeof(UINT); NdrProxySendReceive(This, &_StubMsg); if ( (_RpcMessage.DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION ) NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[196] ); - *pRefType = *(( HREFTYPE __RPC_FAR * )_StubMsg.Buffer)++; + *pRefType = *( HREFTYPE __RPC_FAR * )_StubMsg.Buffer; + _StubMsg.Buffer += sizeof(HREFTYPE); - _RetVal = *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++; + _RetVal = *( HRESULT __RPC_FAR * )_StubMsg.Buffer; + _StubMsg.Buffer += sizeof(HRESULT); } RpcFinally @@ -2911,13 +2986,14 @@ &_StubMsg, &Object_StubDesc, _pRpcChannelBuffer); - ( HREFTYPE __RPC_FAR * )pRefType = 0; + pRefType = 0; RpcTryFinally { if ( (_pRpcMessage->DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION ) NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[196] ); - index = *(( UINT __RPC_FAR * )_StubMsg.Buffer)++; + index = *( UINT __RPC_FAR * )_StubMsg.Buffer; + _StubMsg.Buffer += sizeof(UINT); pRefType = &_M35; @@ -2931,9 +3007,11 @@ _StubMsg.BufferLength = 4U + 4U; NdrStubGetBuffer(This, _pRpcChannelBuffer, &_StubMsg); - *(( HREFTYPE __RPC_FAR * )_StubMsg.Buffer)++ = *pRefType; + *( HREFTYPE __RPC_FAR * )_StubMsg.Buffer = *pRefType; + _StubMsg.Buffer += sizeof(HREFTYPE); - *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++ = _RetVal; + *( HRESULT __RPC_FAR * )_StubMsg.Buffer = _RetVal; + _StubMsg.Buffer += sizeof(HRESULT); } RpcFinally @@ -2978,16 +3056,19 @@ _StubMsg.BufferLength = 4U; NdrProxyGetBuffer(This, &_StubMsg); - *(( UINT __RPC_FAR * )_StubMsg.Buffer)++ = index; + *( UINT __RPC_FAR * )_StubMsg.Buffer = index; + _StubMsg.Buffer += sizeof(UINT); NdrProxySendReceive(This, &_StubMsg); if ( (_RpcMessage.DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION ) NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[196] ); - *pImplTypeFlags = *(( INT __RPC_FAR * )_StubMsg.Buffer)++; + *pImplTypeFlags = *( INT __RPC_FAR * )_StubMsg.Buffer; + _StubMsg.Buffer += sizeof(INT); - _RetVal = *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++; + _RetVal = *( HRESULT __RPC_FAR * )_StubMsg.Buffer; + _StubMsg.Buffer += sizeof(HRESULT); } [truncated at 1000 lines; 2291 more skipped]
19 years, 12 months
1
0
0
0
Integrated change by gvg in revision 12578
by gvg@svn.reactos.com
Need to remove existing files before doing vendor import Deleted: trunk/reactos/lib/oleaut32/
19 years, 12 months
1
0
0
0
Integrated change by gvg in revision 12577
by gvg@svn.reactos.com
Tag Wine-20041201 Added: vendor/wine/dlls/oleaut32/Wine-20041201/ _____ Copied: vendor/wine/dlls/oleaut32/Wine-20041201 (from rev 12576, vendor/wine/dlls/oleaut32/current)
19 years, 12 months
1
0
0
0
Integrated change by gvg in revision 12576
by gvg@svn.reactos.com
Wine-20041201 vendor drop Added: vendor/wine/dlls/oleaut32/ Added: vendor/wine/dlls/oleaut32/current/ Added: vendor/wine/dlls/oleaut32/current/Makefile.in Added: vendor/wine/dlls/oleaut32/current/connpt.c Added: vendor/wine/dlls/oleaut32/current/connpt.h Added: vendor/wine/dlls/oleaut32/current/dispatch.c Added: vendor/wine/dlls/oleaut32/current/hash.c Added: vendor/wine/dlls/oleaut32/current/oaidl_p.c Added: vendor/wine/dlls/oleaut32/current/ole2disp.c Added: vendor/wine/dlls/oleaut32/current/ole2disp.h Added: vendor/wine/dlls/oleaut32/current/ole2disp.spec Added: vendor/wine/dlls/oleaut32/current/oleaut.c Added: vendor/wine/dlls/oleaut32/current/oleaut32.rc Added: vendor/wine/dlls/oleaut32/current/oleaut32.spec Added: vendor/wine/dlls/oleaut32/current/oleaut32_Cz.rc Added: vendor/wine/dlls/oleaut32/current/oleaut32_De.rc Added: vendor/wine/dlls/oleaut32/current/oleaut32_Dk.rc Added: vendor/wine/dlls/oleaut32/current/oleaut32_En.rc Added: vendor/wine/dlls/oleaut32/current/oleaut32_Es.rc Added: vendor/wine/dlls/oleaut32/current/oleaut32_Fr.rc Added: vendor/wine/dlls/oleaut32/current/oleaut32_Hu.rc Added: vendor/wine/dlls/oleaut32/current/oleaut32_It.rc Added: vendor/wine/dlls/oleaut32/current/oleaut32_Nl.rc Added: vendor/wine/dlls/oleaut32/current/oleaut32_No.rc Added: vendor/wine/dlls/oleaut32/current/oleaut32_Pl.rc Added: vendor/wine/dlls/oleaut32/current/oleaut32_Pt.rc Added: vendor/wine/dlls/oleaut32/current/oleaut32_Sv.rc Added: vendor/wine/dlls/oleaut32/current/oleaut32_Th.rc Added: vendor/wine/dlls/oleaut32/current/olefont.c Added: vendor/wine/dlls/oleaut32/current/olepicture.c Added: vendor/wine/dlls/oleaut32/current/regsvr.c Added: vendor/wine/dlls/oleaut32/current/resource.h Added: vendor/wine/dlls/oleaut32/current/safearray.c Added: vendor/wine/dlls/oleaut32/current/stubs.c Added: vendor/wine/dlls/oleaut32/current/tmarshal.c Added: vendor/wine/dlls/oleaut32/current/tmarshal.h Added: vendor/wine/dlls/oleaut32/current/typelib.c Added: vendor/wine/dlls/oleaut32/current/typelib.h Added: vendor/wine/dlls/oleaut32/current/typelib.spec Added: vendor/wine/dlls/oleaut32/current/typelib16.c Added: vendor/wine/dlls/oleaut32/current/typelib2.c Added: vendor/wine/dlls/oleaut32/current/usrmarshal.c Added: vendor/wine/dlls/oleaut32/current/varformat.c Added: vendor/wine/dlls/oleaut32/current/variant.c Added: vendor/wine/dlls/oleaut32/current/variant.h Added: vendor/wine/dlls/oleaut32/current/vartype.c Added: vendor/wine/dlls/oleaut32/current/version.rc _____ Added: vendor/wine/dlls/oleaut32/current/Makefile.in --- vendor/wine/dlls/oleaut32/current/Makefile.in 2004-12-31 15:20:48 UTC (rev 12575) +++ vendor/wine/dlls/oleaut32/current/Makefile.in 2004-12-31 15:25:53 UTC (rev 12576) @@ -0,0 +1,44 @@ +EXTRADEFS = -D_OLEAUT32_ -DCOM_NO_WINDOWS_H +TOPSRCDIR = @top_srcdir@ +TOPOBJDIR = ../.. +SRCDIR = @srcdir@ +VPATH = @srcdir@ +MODULE = oleaut32.dll +IMPORTS = ole32 rpcrt4 user32 gdi32 advapi32 kernel32 ntdll +DELAYIMPORTS = comctl32 +EXTRALIBS = $(LIBUNICODE) -luuid + +C_SRCS = \ + connpt.c \ + dispatch.c \ + hash.c \ + oaidl_p.c \ + oleaut.c \ + olefont.c \ + olepicture.c \ + regsvr.c \ + safearray.c \ + stubs.c \ + tmarshal.c \ + typelib.c \ + typelib2.c \ + usrmarshal.c \ + varformat.c \ + variant.c \ + vartype.c + +C_SRCS16 = \ + ole2disp.c \ + typelib16.c + +SPEC_SRCS16 = \ + ole2disp.spec \ + typelib.spec + +RC_SRCS = oleaut32.rc + +SUBDIRS = tests + +@MAKE_DLL_RULES@ + +### Dependencies: _____ Added: vendor/wine/dlls/oleaut32/current/connpt.c --- vendor/wine/dlls/oleaut32/current/connpt.c 2004-12-31 15:20:48 UTC (rev 12575) +++ vendor/wine/dlls/oleaut32/current/connpt.c 2004-12-31 15:25:53 UTC (rev 12576) @@ -0,0 +1,632 @@ +/* + * Implementation of a generic ConnectionPoint object. + * + * Copyright 2000 Huw D M Davies 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 + * + * NOTES: + * See one exported function here is CreateConnectionPoint, see + * comments just above that function for information. + */ + +#include <assert.h> +#include <stdarg.h> +#include <string.h> + +#define COBJMACROS + +#include "winerror.h" +#include "windef.h" +#include "winbase.h" +#include "wingdi.h" +#include "winuser.h" +#include "ole2.h" +#include "olectl.h" +#include "connpt.h" + +#include "wine/debug.h" + +WINE_DEFAULT_DEBUG_CHANNEL(ole); + +#define MAXSINKS 10 + +/********************************************************************** ** + * Implementation of IConnectionPoint + */ +typedef struct ConnectionPointImpl { + + IConnectionPointVtbl *lpvtbl; + + /* IUnknown of our main object*/ + IUnknown *Obj; + + /* Reference count */ + DWORD ref; + + /* IID of sink interface */ + IID iid; + + /* Array of sink IUnknowns */ + IUnknown **sinks; + DWORD maxSinks; + + DWORD nSinks; +} ConnectionPointImpl; + +static IConnectionPointVtbl ConnectionPointImpl_VTable; + + +/********************************************************************** ** + * Implementation of IEnumConnections + */ +typedef struct EnumConnectionsImpl { + + IEnumConnectionsVtbl *lpvtbl; + + DWORD ref; + + /* IUnknown of ConnectionPoint, used for ref counting */ + IUnknown *pUnk; + + /* Connection Data */ + CONNECTDATA *pCD; + DWORD nConns; + + /* Next connection to enumerate from */ + DWORD nCur; + +} EnumConnectionsImpl; + +static EnumConnectionsImpl *EnumConnectionsImpl_Construct(IUnknown *pUnk, + DWORD nSinks, + CONNECTDATA *pCD); + + +/********************************************************************** ** + * ConnectionPointImpl_Construct + */ +static ConnectionPointImpl *ConnectionPointImpl_Construct(IUnknown *pUnk, + REFIID riid) +{ + ConnectionPointImpl *Obj; + + Obj = HeapAlloc(GetProcessHeap(), 0, sizeof(*Obj)); + Obj->lpvtbl = &ConnectionPointImpl_VTable; + Obj->Obj = pUnk; + Obj->ref = 1; + Obj->iid = *riid; + Obj->maxSinks = MAXSINKS; + Obj->sinks = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, + sizeof(IUnknown*) * MAXSINKS); + Obj->nSinks = 0; + return Obj; +} + +/********************************************************************** ** + * ConnectionPointImpl_Destroy + */ +static void ConnectionPointImpl_Destroy(ConnectionPointImpl *Obj) +{ + DWORD i; + for(i = 0; i < Obj->maxSinks; i++) { + if(Obj->sinks[i]) { + IUnknown_Release(Obj->sinks[i]); + Obj->sinks[i] = NULL; + } + } + HeapFree(GetProcessHeap(), 0, Obj->sinks); + HeapFree(GetProcessHeap(), 0, Obj); + return; +} + +static ULONG WINAPI ConnectionPointImpl_AddRef(IConnectionPoint* iface); +/********************************************************************** ** + * ConnectionPointImpl_QueryInterface (IUnknown) + * + * See Windows documentation for more details on IUnknown methods. + */ +static HRESULT WINAPI ConnectionPointImpl_QueryInterface( + IConnectionPoint* iface, + REFIID riid, + void** ppvObject) +{ + ConnectionPointImpl *This = (ConnectionPointImpl *)iface; + TRACE("(%p)->(%s, %p)\n", This, debugstr_guid(riid), ppvObject); + + /* + * Perform a sanity check on the parameters. + */ + if ( (This==0) || (ppvObject==0) ) + return E_INVALIDARG; + + /* + * Initialize the return parameter. + */ + *ppvObject = 0; + + /* + * Compare the riid with the interface IDs implemented by this object. + */ + if (memcmp(&IID_IUnknown, riid, sizeof(IID_IUnknown)) == 0) + { + *ppvObject = (IConnectionPoint*)This; + } + else if (memcmp(&IID_IConnectionPoint, riid, sizeof(IID_IConnectionPoint)) == 0) + { + *ppvObject = (IConnectionPoint*)This; + } + + /* + * Check that we obtained an interface. + */ + if ((*ppvObject)==0) + { + FIXME("() : asking for un supported interface %s\n",debugstr_guid(riid)); + return E_NOINTERFACE; + } + + /* + * Query Interface always increases the reference count by one when it is + * successful + */ + ConnectionPointImpl_AddRef((IConnectionPoint*)This); + + return S_OK; +} + + +/********************************************************************** ** + * ConnectionPointImpl_AddRef (IUnknown) + * + * See Windows documentation for more details on IUnknown methods. + */ +static ULONG WINAPI ConnectionPointImpl_AddRef(IConnectionPoint* iface) +{ + ConnectionPointImpl *This = (ConnectionPointImpl *)iface; + TRACE("(%p)->(ref=%ld)\n", This, This->ref); + return InterlockedIncrement(&This->ref); +} + +/********************************************************************** ** + * ConnectionPointImpl_Release (IUnknown) + * + * See Windows documentation for more details on IUnknown methods. + */ +static ULONG WINAPI ConnectionPointImpl_Release( + IConnectionPoint* iface) +{ + ConnectionPointImpl *This = (ConnectionPointImpl *)iface; + ULONG ref; + TRACE("(%p)->(ref=%ld)\n", This, This->ref); + + /* + * Decrease the reference count on this object. + */ + ref = InterlockedDecrement(&This->ref); + + /* + * If the reference count goes down to 0, perform suicide. + */ + if (ref == 0) ConnectionPointImpl_Destroy(This); + + return ref; +} + +/********************************************************************** ** + * ConnectionPointImpl_GetConnectionInterface (IConnectionPoint) + * + */ +static HRESULT WINAPI ConnectionPointImpl_GetConnectionInterface( + IConnectionPoint *iface, + IID *piid) +{ + ConnectionPointImpl *This = (ConnectionPointImpl *)iface; + TRACE("(%p)->(%p) returning %s\n", This, piid, debugstr_guid(&(This->iid))); + *piid = This->iid; + return S_OK; +} + +/********************************************************************** ** + * ConnectionPointImpl_GetConnectionPointContainer (IConnectionPoint) + * + */ +static HRESULT WINAPI ConnectionPointImpl_GetConnectionPointContainer( + IConnectionPoint *iface, + IConnectionPointContainer **ppCPC) +{ + ConnectionPointImpl *This = (ConnectionPointImpl *)iface; + TRACE("(%p)->(%p)\n", This, ppCPC); + + return IUnknown_QueryInterface(This->Obj, + &IID_IConnectionPointContainer, + (LPVOID)ppCPC); +} + +/********************************************************************** ** + * ConnectionPointImpl_Advise (IConnectionPoint) + * + */ +static HRESULT WINAPI ConnectionPointImpl_Advise(IConnectionPoint *iface, + IUnknown *lpUnk, + DWORD *pdwCookie) +{ + DWORD i; + ConnectionPointImpl *This = (ConnectionPointImpl *)iface; + IUnknown *lpSink; + TRACE("(%p)->(%p, %p)\n", This, lpUnk, pdwCookie); + + *pdwCookie = 0; + if(FAILED(IUnknown_QueryInterface(lpUnk, &This->iid, (LPVOID)&lpSink))) + return CONNECT_E_CANNOTCONNECT; + + for(i = 0; i < This->maxSinks; i++) { + if(This->sinks[i] == NULL) + break; + } + if(i == This->maxSinks) { + This->maxSinks += MAXSINKS; + This->sinks = HeapReAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, This->sinks, + This->maxSinks * sizeof(IUnknown *)); + } + This->sinks[i] = lpSink; + This->nSinks++; + *pdwCookie = i + 1; + return S_OK; +} + + +/********************************************************************** ** + * ConnectionPointImpl_Unadvise (IConnectionPoint) + * + */ +static HRESULT WINAPI ConnectionPointImpl_Unadvise(IConnectionPoint *iface, + DWORD dwCookie) +{ + ConnectionPointImpl *This = (ConnectionPointImpl *)iface; + TRACE("(%p)->(%ld)\n", This, dwCookie); + + if(dwCookie == 0 || dwCookie > This->maxSinks) return E_INVALIDARG; + + if(This->sinks[dwCookie-1] == NULL) return CONNECT_E_NOCONNECTION; + + IUnknown_Release(This->sinks[dwCookie-1]); + This->sinks[dwCookie-1] = NULL; + This->nSinks--; + return S_OK; +} + +/********************************************************************** ** + * ConnectionPointImpl_EnumConnections (IConnectionPoint) + * + */ +static HRESULT WINAPI ConnectionPointImpl_EnumConnections( + IConnectionPoint *iface, + LPENUMCONNECTIONS *ppEnum) +{ + ConnectionPointImpl *This = (ConnectionPointImpl *)iface; + CONNECTDATA *pCD; + DWORD i, nextslot; + EnumConnectionsImpl *EnumObj; + HRESULT hr; + + TRACE("(%p)->(%p)\n", This, ppEnum); + + *ppEnum = NULL; + + if(This->nSinks == 0) return OLE_E_NOCONNECTION; + + pCD = HeapAlloc(GetProcessHeap(), 0, sizeof(CONNECTDATA) * This->nSinks); + + for(i = 0, nextslot = 0; i < This->maxSinks; i++) { + if(This->sinks[i] != NULL) { + pCD[nextslot].pUnk = This->sinks[i]; + pCD[nextslot].dwCookie = i + 1; + nextslot++; + } + } + assert(nextslot == This->nSinks); + + /* Bump the ref count of this object up by one. It gets Released in + IEnumConnections_Release */ + IUnknown_AddRef((IUnknown*)This); + + EnumObj = EnumConnectionsImpl_Construct((IUnknown*)This, This->nSinks, pCD); + hr = IEnumConnections_QueryInterface((IEnumConnections*)EnumObj, + &IID_IEnumConnections, (LPVOID)ppEnum); + IEnumConnections_Release((IEnumConnections*)EnumObj); + + HeapFree(GetProcessHeap(), 0, pCD); + return hr; +} + +static IConnectionPointVtbl ConnectionPointImpl_VTable = +{ + ConnectionPointImpl_QueryInterface, + ConnectionPointImpl_AddRef, + ConnectionPointImpl_Release, + ConnectionPointImpl_GetConnectionInterface, + ConnectionPointImpl_GetConnectionPointContainer, + ConnectionPointImpl_Advise, + ConnectionPointImpl_Unadvise, + ConnectionPointImpl_EnumConnections +}; + + +static IEnumConnectionsVtbl EnumConnectionsImpl_VTable; +static ULONG WINAPI EnumConnectionsImpl_AddRef(IEnumConnections* iface); + +/********************************************************************** ** + * EnumConnectionsImpl_Construct + */ +static EnumConnectionsImpl *EnumConnectionsImpl_Construct(IUnknown *pUnk, + DWORD nSinks, + CONNECTDATA *pCD) +{ + EnumConnectionsImpl *Obj = HeapAlloc(GetProcessHeap(), 0, sizeof(*Obj)); + DWORD i; + + Obj->lpvtbl = &EnumConnectionsImpl_VTable; + Obj->ref = 1; + Obj->pUnk = pUnk; + Obj->pCD = HeapAlloc(GetProcessHeap(), 0, nSinks * sizeof(CONNECTDATA)); + Obj->nConns = nSinks; + Obj->nCur = 0; + + for(i = 0; i < nSinks; i++) { + Obj->pCD[i] = pCD[i]; + IUnknown_AddRef(Obj->pCD[i].pUnk); + } + return Obj; +} + +/********************************************************************** ** + * EnumConnectionsImpl_Destroy + */ +static void EnumConnectionsImpl_Destroy(EnumConnectionsImpl *Obj) +{ + DWORD i; + + for(i = 0; i < Obj->nConns; i++) + IUnknown_Release(Obj->pCD[i].pUnk); + + HeapFree(GetProcessHeap(), 0, Obj->pCD); + HeapFree(GetProcessHeap(), 0, Obj); + return; +} + +/********************************************************************** ** + * EnumConnectionsImpl_QueryInterface (IUnknown) + * + * See Windows documentation for more details on IUnknown methods. + */ +static HRESULT WINAPI EnumConnectionsImpl_QueryInterface( + IEnumConnections* iface, + REFIID riid, + void** ppvObject) +{ + ConnectionPointImpl *This = (ConnectionPointImpl *)iface; + TRACE("(%p)->(%s, %p)\n", This, debugstr_guid(riid), ppvObject); + + /* + * Perform a sanity check on the parameters. + */ + if ( (This==0) || (ppvObject==0) ) + return E_INVALIDARG; + + /* + * Initialize the return parameter. + */ + *ppvObject = 0; + + /* + * Compare the riid with the interface IDs implemented by this object. + */ + if (memcmp(&IID_IUnknown, riid, sizeof(IID_IUnknown)) == 0) + { + *ppvObject = (IEnumConnections*)This; + } + else if (memcmp(&IID_IEnumConnections, riid, sizeof(IID_IEnumConnections)) == 0) + { + *ppvObject = (IEnumConnections*)This; + } + + /* + * Check that we obtained an interface. + */ + if ((*ppvObject)==0) + { + FIXME("() : asking for un supported interface %s\n",debugstr_guid(riid)); + return E_NOINTERFACE; + } + + /* + * Query Interface always increases the reference count by one when it is + * successful + */ + EnumConnectionsImpl_AddRef((IEnumConnections*)This); + + return S_OK; +} + + +/********************************************************************** ** + * EnumConnectionsImpl_AddRef (IUnknown) + * + * See Windows documentation for more details on IUnknown methods. + */ +static ULONG WINAPI EnumConnectionsImpl_AddRef(IEnumConnections* iface) +{ + EnumConnectionsImpl *This = (EnumConnectionsImpl *)iface; + ULONG ref; + TRACE("(%p)->(ref=%ld)\n", This, This->ref); + ref = InterlockedIncrement(&This->ref); + IUnknown_AddRef(This->pUnk); + return ref; +} + +/********************************************************************** ** + * EnumConnectionsImpl_Release (IUnknown) + * + * See Windows documentation for more details on IUnknown methods. + */ +static ULONG WINAPI EnumConnectionsImpl_Release(IEnumConnections* iface) +{ + EnumConnectionsImpl *This = (EnumConnectionsImpl *)iface; + ULONG ref; + TRACE("(%p)->(ref=%ld)\n", This, This->ref); + + IUnknown_Release(This->pUnk); + + /* + * Decrease the reference count on this object. + */ + ref = InterlockedDecrement(&This->ref); + + /* + * If the reference count goes down to 0, perform suicide. + */ + if (ref == 0) EnumConnectionsImpl_Destroy(This); + + return ref; +} + +/********************************************************************** ** + * EnumConnectionsImpl_Next (IEnumConnections) + * + */ +static HRESULT WINAPI EnumConnectionsImpl_Next(IEnumConnections* iface, + ULONG cConn, LPCONNECTDATA pCD, + ULONG *pEnum) +{ + EnumConnectionsImpl *This = (EnumConnectionsImpl *)iface; + DWORD nRet = 0; + TRACE("(%p)->(%ld, %p, %p)\n", This, cConn, pCD, pEnum); + + if(pEnum == NULL) { + if(cConn != 1) + return E_POINTER; + } else + *pEnum = 0; + + if(This->nCur >= This->nConns) + return S_FALSE; + + while(This->nCur < This->nConns && cConn) { + *pCD++ = This->pCD[This->nCur]; + IUnknown_AddRef(This->pCD[This->nCur].pUnk); + This->nCur++; + cConn--; + nRet++; + } + + if(pEnum) + *pEnum = nRet; + + return S_OK; +} + + +/********************************************************************** ** + * EnumConnectionsImpl_Skip (IEnumConnections) + * + */ +static HRESULT WINAPI EnumConnectionsImpl_Skip(IEnumConnections* iface, + ULONG cSkip) +{ + EnumConnectionsImpl *This = (EnumConnectionsImpl *)iface; + TRACE("(%p)->(%ld)\n", This, cSkip); + + if(This->nCur + cSkip >= This->nConns) + return S_FALSE; + + This->nCur += cSkip; + + return S_OK; +} + + +/********************************************************************** ** + * EnumConnectionsImpl_Reset (IEnumConnections) + * + */ +static HRESULT WINAPI EnumConnectionsImpl_Reset(IEnumConnections* iface) +{ + EnumConnectionsImpl *This = (EnumConnectionsImpl *)iface; + TRACE("(%p)\n", This); + + This->nCur = 0; + + return S_OK; +} + + +/********************************************************************** ** + * EnumConnectionsImpl_Clone (IEnumConnections) + * + */ +static HRESULT WINAPI EnumConnectionsImpl_Clone(IEnumConnections* iface, + LPENUMCONNECTIONS *ppEnum) +{ + EnumConnectionsImpl *This = (EnumConnectionsImpl *)iface; + EnumConnectionsImpl *newObj; + TRACE("(%p)->(%p)\n", This, ppEnum); + + newObj = EnumConnectionsImpl_Construct(This->pUnk, This->nConns, This->pCD); + newObj->nCur = This->nCur; + *ppEnum = (LPENUMCONNECTIONS)newObj; + IUnknown_AddRef(This->pUnk); + return S_OK; +} + +static IEnumConnectionsVtbl EnumConnectionsImpl_VTable = +{ + EnumConnectionsImpl_QueryInterface, + EnumConnectionsImpl_AddRef, + EnumConnectionsImpl_Release, + EnumConnectionsImpl_Next, + EnumConnectionsImpl_Skip, + EnumConnectionsImpl_Reset, + EnumConnectionsImpl_Clone +}; + +/********************************************************************** ** + * + * The exported function to create the connection point. + * NB not a windows API + * + * PARAMS + * pUnk [in] IUnknown of object to which the ConnectionPoint is associated. + * Needed to access IConnectionPointContainer. + * + * riid [in] IID of sink interface that this ConnectionPoint manages + * + * pCP [out] returns IConnectionPoint + * + */ +HRESULT CreateConnectionPoint(IUnknown *pUnk, REFIID riid, + IConnectionPoint **pCP) +{ + ConnectionPointImpl *Obj; + HRESULT hr; + + Obj = ConnectionPointImpl_Construct(pUnk, riid); + if(!Obj) return E_OUTOFMEMORY; + + hr = IConnectionPoint_QueryInterface((IConnectionPoint *)Obj, + &IID_IConnectionPoint, (LPVOID)pCP); + IConnectionPoint_Release((IConnectionPoint *)Obj); + return hr; +} _____ Added: vendor/wine/dlls/oleaut32/current/connpt.h --- vendor/wine/dlls/oleaut32/current/connpt.h 2004-12-31 15:20:48 UTC (rev 12575) +++ vendor/wine/dlls/oleaut32/current/connpt.h 2004-12-31 15:25:53 UTC (rev 12576) @@ -0,0 +1,24 @@ +/* + * Copyright 2000 Huw D M Davies 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 + */ + +#ifndef _CONNPT_H +#define _CONNPT_H + +HRESULT CreateConnectionPoint(IUnknown *pUnk, REFIID riid, IConnectionPoint **pCP); + +#endif /* _CONNPT_H */ _____ Added: vendor/wine/dlls/oleaut32/current/dispatch.c --- vendor/wine/dlls/oleaut32/current/dispatch.c 2004-12-31 15:20:48 UTC (rev 12575) +++ vendor/wine/dlls/oleaut32/current/dispatch.c 2004-12-31 15:25:53 UTC (rev 12576) @@ -0,0 +1,456 @@ +/** + * Dispatch API functions + * + * Copyright 2000 Francois Jacques, Macadamian Technologies Inc. + * + * 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 + * + * TODO: Type coercion is implemented in variant.c but not called yet. + */ + +#include "config.h" + +#include <stdlib.h> +#include <string.h> +#include <stdarg.h> +#include <stdio.h> +#include <ctype.h> + +#define COBJMACROS + +#include "windef.h" +#include "winbase.h" +#include "objbase.h" +#include "oleauto.h" +#include "winerror.h" +#include "winreg.h" +#include "winnls.h" /* for PRIMARYLANGID */ + +#include "wine/debug.h" + +WINE_DEFAULT_DEBUG_CHANNEL(ole); +WINE_DECLARE_DEBUG_CHANNEL(typelib); + +static IDispatch * WINAPI StdDispatch_Construct(IUnknown * punkOuter, void * pvThis, ITypeInfo * pTypeInfo); + +/********************************************************************** ******** + * DispInvoke (OLEAUT32.30) + * + * Call an object method using the information from its type library. + * + * RETURNS + * Success: S_OK. + * Failure: Returns DISP_E_EXCEPTION and updates pexcepinfo if an exception occurs. + * DISP_E_BADPARAMCOUNT if the number of parameters is incorrect. + * DISP_E_MEMBERNOTFOUND if the method does not exist. + * puArgErr is updated if a parameter error (see notes) occurs. + * Otherwise, returns the result of calling ITypeInfo_Invoke(). + * + * NOTES + * Parameter errors include the following: + *| DISP_E_BADVARTYPE + *| E_INVALIDARG An argument was invalid + *| DISP_E_TYPEMISMATCH, + *| DISP_E_OVERFLOW An argument was valid but could not be coerced + *| DISP_E_PARAMNOTOPTIONAL A non optional parameter was not passed + *| DISP_E_PARAMNOTFOUND A parameter was passed that was not expected by the method + * This call defers to ITypeInfo_Invoke(). + */ +HRESULT WINAPI DispInvoke( + VOID *_this, /* [in] Object to call method on */ + ITypeInfo *ptinfo, /* [in] Object type info */ + DISPID dispidMember, /* [in] DISPID of the member (e.g. from GetIDsOfNames()) */ + USHORT wFlags, /* [in] Kind of method call (DISPATCH_ flags from "oaidl.h") */ + DISPPARAMS *pparams, /* [in] Array of method arguments */ + VARIANT *pvarResult, /* [out] Destination for the result of the call */ + EXCEPINFO *pexcepinfo, /* [out] Destination for exception information */ + UINT *puArgErr) /* [out] Destination for bad argument */ +{ + /** + * TODO: + * For each param, call DispGetParam to perform type coercion + */ + FIXME("Coercion of arguments not implemented\n"); + + return ITypeInfo_Invoke(ptinfo, _this, dispidMember, wFlags, + pparams, pvarResult, pexcepinfo, puArgErr); +} + +/********************************************************************** ******** + * DispGetIDsOfNames (OLEAUT32.29) + * + * Convert a set of parameter names to DISPID's for DispInvoke(). + * + * RETURNS + * Success: S_OK. + * Failure: An HRESULT error code. + * + * NOTES + * This call defers to ITypeInfo_GetIDsOfNames(). The ITypeInfo interface passed + * as ptinfo contains the information to map names to DISPID's. + */ +HRESULT WINAPI DispGetIDsOfNames( + ITypeInfo *ptinfo, /* [in] Object's type info */ + OLECHAR **rgszNames, /* [in] Array of names to get DISPID's for */ + UINT cNames, /* [in] Number of names in rgszNames */ + DISPID *rgdispid) /* [out] Destination for converted DISPID's */ +{ + return ITypeInfo_GetIDsOfNames(ptinfo, rgszNames, cNames, rgdispid); +} + +/********************************************************************** ******** + * DispGetParam (OLEAUT32.28) + * + * Retrive a parameter from a DISPPARAMS structure and coerce it to the + * specified variant type. + * + * NOTES + * Coercion is done using system (0) locale. + * + * RETURNS + * Success: S_OK. + * Failure: DISP_E_PARAMNOTFOUND, if position is invalid. or + * DISP_E_TYPEMISMATCH, if the coercion failed. puArgErr is + * set to the index of the argument in pdispparams. + */ +HRESULT WINAPI DispGetParam( + DISPPARAMS *pdispparams, /* [in] Parameter list */ + UINT position, /* [in] Position of parameter to coerce in pdispparams */ + VARTYPE vtTarg, /* [in] Type of value to coerce to */ + VARIANT *pvarResult, /* [out] Destination for resulting variant */ + UINT *puArgErr) /* [out] Destination for error code */ +{ + /* position is counted backwards */ + UINT pos; + HRESULT hr; + + TRACE("position=%d, cArgs=%d, cNamedArgs=%d\n", + position, pdispparams->cArgs, pdispparams->cNamedArgs); + if (position < pdispparams->cArgs) { + /* positional arg? */ + pos = pdispparams->cArgs - position - 1; + } else { + /* FIXME: is this how to handle named args? */ + for (pos=0; pos<pdispparams->cNamedArgs; pos++) + if (pdispparams->rgdispidNamedArgs[pos] == position) break; + + if (pos==pdispparams->cNamedArgs) + return DISP_E_PARAMNOTFOUND; + } + hr = VariantChangeType(pvarResult, + &pdispparams->rgvarg[pos], + 0, vtTarg); + if (hr == DISP_E_TYPEMISMATCH) *puArgErr = pos; + return hr; +} + +/********************************************************************** ******** + * CreateStdDispatch [OLEAUT32.32] + * + * Create and return a standard IDispatch object. + * + * RETURNS + * Success: S_OK. ppunkStdDisp contains the new object. + * Failure: An HRESULT error code. + * + * NOTES + * Outer unknown appears to be completely ignored. + */ +HRESULT WINAPI CreateStdDispatch( + IUnknown* punkOuter, + void* pvThis, + ITypeInfo* ptinfo, + IUnknown** ppunkStdDisp) +{ + TRACE("(%p, %p, %p, %p)\n", punkOuter, pvThis, ptinfo, ppunkStdDisp); + + *ppunkStdDisp = (LPUNKNOWN)StdDispatch_Construct(punkOuter, pvThis, ptinfo); + if (!*ppunkStdDisp) + return E_OUTOFMEMORY; + return S_OK; +} + + +/********************************************************************** ******** + * IDispatch {OLEAUT32} + * + * NOTES + * The IDispatch interface provides a single interface to dispatch method calls, + * regardless of whether the object to be called is in or out of process, + * local or remote (e.g. being called over a network). This interface is late-bound + * (linked at run-time), as opposed to early-bound (linked at compile time). + * + * The interface is used by objects that wish to called by scripting + * languages such as VBA, in order to minimise the amount of COM and C/C++ + * knowledge required, or by objects that wish to live out of process from code + * that will call their methods. + * + * Method, property and parameter names can be localised. The details required to + * map names to methods and parameters are collected in a type library, usually + * output by an IDL compiler using the objects IDL description. This information is + * accessible programatically through the ITypeLib interface (for a type library), + * and the ITypeInfo interface (for an object within the type library). Type information + * can also be created at run-time using CreateDispTypeInfo(). + * + * WRAPPERS + * Instead of using IDispatch directly, there are several wrapper functions available + * to simplify the process of calling an objects methods through IDispatch. + * + * A standard implementation of an IDispatch object is created by calling + * CreateStdDispatch(). Numeric Id values for the parameters and methods (DISPID's) + * of an object of interest are retrieved by calling DispGetIDsOfNames(). DispGetParam() + * retrieves information about a particular parameter. Finally the DispInvoke() + * function is responsable for actually calling methods on an object. + * + * METHODS + */ + +typedef struct +{ + IDispatchVtbl *lpVtbl; + void * pvThis; + ITypeInfo * pTypeInfo; + ULONG ref; +} StdDispatch; + +/********************************************************************** ******** + * IDispatch_QueryInterface {OLEAUT32} + * + * See IUnknown_QueryInterface. + */ +static HRESULT WINAPI StdDispatch_QueryInterface( + LPDISPATCH iface, + REFIID riid, + void** ppvObject) +{ + StdDispatch *This = (StdDispatch *)iface; + TRACE("(%p)->(%s, %p)\n", iface, debugstr_guid(riid), ppvObject); + + if (IsEqualIID(riid, &IID_IDispatch) || + IsEqualIID(riid, &IID_IUnknown)) + { + *ppvObject = (LPVOID)This; + IUnknown_AddRef((LPUNKNOWN)*ppvObject); + return S_OK; + } + return E_NOINTERFACE; +} + +/********************************************************************** ******** + * IDispatch_AddRef {OLEAUT32} + * + * See IUnknown_AddRef. + */ +static ULONG WINAPI StdDispatch_AddRef(LPDISPATCH iface) +{ + StdDispatch *This = (StdDispatch *)iface; + TRACE("()\n"); + + return InterlockedIncrement(&This->ref); +} + +/********************************************************************** ******** + * IDispatch_Release {OLEAUT32} + * + * See IUnknown_Release. + */ +static ULONG WINAPI StdDispatch_Release(LPDISPATCH iface) +{ + StdDispatch *This = (StdDispatch *)iface; + ULONG ref; + TRACE("(%p)->()\n", This); + + ref = InterlockedDecrement(&This->ref); + + if (ref == 0) + { + ITypeInfo_Release(This->pTypeInfo); + CoTaskMemFree(This); [truncated at 1000 lines; 50703 more skipped]
19 years, 12 months
1
0
0
0
Integrated change by gvg in revision 12575
by gvg@svn.reactos.com
Import and merge Wine-20041201 Added: trunk/reactos/lib/ole32/ Added: trunk/reactos/lib/ole32/Makefile.ros-template Added: trunk/reactos/lib/ole32/dcom.h Modified: trunk/reactos/lib/ole32/ifs.c Modified: trunk/reactos/lib/ole32/ifs.h Added: trunk/reactos/lib/ole32/makefile Modified: trunk/reactos/lib/ole32/oleproxy.c _____ Copied: trunk/reactos/lib/ole32 (from rev 12574, vendor/wine/dlls/ole32/current) _____ Added: trunk/reactos/lib/ole32/Makefile.ros-template --- vendor/wine/dlls/ole32/current/Makefile.ros-template 2004-12-31 15:19:40 UTC (rev 12574) +++ trunk/reactos/lib/ole32/Makefile.ros-template 2004-12-31 15:20:48 UTC (rev 12575) @@ -0,0 +1,21 @@ +# $Id: Makefile.ros-template 11910 2004-12-03 23:37:44Z blight $ + +TARGET_NAME = ole32 + +TARGET_OBJECTS = @C_SRCS@ + +TARGET_CFLAGS = @EXTRADEFS@ + +TARGET_SDKLIBS = @IMPORTS@ wine.a wine_uuid.a ntdll.a + +TARGET_BASE = $(TARGET_BASE_LIB_OLE32) + +TARGET_RC_SRCS = @RC_SRCS@ +TARGET_RC_BINSRC = @RC_BINSRC@ +TARGET_RC_BINARIES = @RC_BINARIES@ + +default: all + +DEP_OBJECTS = $(TARGET_OBJECTS) + +include $(TOOLS_PATH)/depend.mk _____ Added: trunk/reactos/lib/ole32/dcom.h --- vendor/wine/dlls/ole32/current/dcom.h 2004-12-31 15:19:40 UTC (rev 12574) +++ trunk/reactos/lib/ole32/dcom.h 2004-12-31 15:20:48 UTC (rev 12575) @@ -0,0 +1,515 @@ +/*** Autogenerated by WIDL 0.1 from dcom.idl - Do not edit ***/ +#include <rpc.h> +#include <rpcndr.h> + +#ifndef __WIDL_DCOM_H +#define __WIDL_DCOM_H +#ifdef __cplusplus +extern "C" { +#endif +#include <unknwn.h> +typedef MIDL_uhyper ID; + +typedef ID MID; + +typedef ID OXID; + +typedef ID OID; + +typedef ID SETID; + +typedef GUID IPID; + +typedef GUID CID; + +typedef REFGUID REFIPID; + +#define COM_MINOR_VERSION_1 (1) + +#define COM_MINOR_VERSION_2 (2) + +#define COM_MAJOR_VERSION (5) + +#define COM_MINOR_VERSION (3) + +typedef struct tagCOMVERSION { + unsigned short MajorVersion; + unsigned short MinorVersion; +} COMVERSION; + +#define ORPCF_NULL (0) + +#define ORPCF_LOCAL (1) + +#define ORPCF_RESERVED1 (2) + +#define ORPCF_RESERVED2 (4) + +#define ORPCF_RESERVED3 (8) + +#define ORPCF_RESERVED4 (16) + +typedef struct tagORPC_EXTENT { + GUID id; + unsigned long size; + byte data[1]; +} ORPC_EXTENT; + +typedef struct tagORPC_EXTENT_ARRAY { + unsigned long size; + unsigned long reserved; + ORPC_EXTENT **extent; +} ORPC_EXTENT_ARRAY; + +typedef struct tagORPCTHIS { + COMVERSION version; + unsigned long flags; + unsigned long reserved1; + CID cid; + ORPC_EXTENT_ARRAY *extensions; +} ORPCTHIS; + +typedef struct tagORPCTHAT { + unsigned long flags; + ORPC_EXTENT_ARRAY *extensions; +} ORPCTHAT; + +#define NCADG_IP_UDP (0x8) + +#define NCACN_IP_TCP (0x7) + +#define NCADG_IPX (0xe) + +#define NCACN_SPX (0xc) + +#define NCACN_NB_NB (0x12) + +#define NCACN_NB_IPX (0xd) + +#define NCACN_DNET_NSP (0x4) + +#define NCACN_HTTP (0x1f) + +typedef struct tagSTRINGBINDING { + unsigned short wTowerId; + unsigned short aNetworkAddr[1]; +} STRINGBINDING; + +#define COM_C_AUTHZ_NONE (0xffff) + +typedef struct tagSECURITYBINDING { + unsigned short wAuthnSvc; + unsigned short wAuthzSvc; + unsigned short aPrincName[1]; +} SECURITYBINDING; + +typedef struct tagDUALSTRINGARRAY { + unsigned short wNumEntries; + unsigned short wSecurityOffset; + unsigned short aStringArray[1]; +} DUALSTRINGARRAY; + +#define OBJREF_SIGNATURE (0x574f454d) + +#define OBJREF_STANDARD (0x1) + +#define OBJREF_HANDLER (0x2) + +#define OBJREF_CUSTOM (0x4) + +#define SORF_OXRES1 (0x1) + +#define SORF_OXRES2 (0x20) + +#define SORF_OXRES3 (0x40) + +#define SORF_OXRES4 (0x80) + +#define SORF_OXRES5 (0x100) + +#define SORF_OXRES6 (0x200) + +#define SORF_OXRES7 (0x400) + +#define SORF_OXRES8 (0x800) + +#define SORF_NULL (0x0) + +#define SORF_NOPING (0x1000) + +typedef struct tagSTDOBJREF { + unsigned long flags; + unsigned long cPublicRefs; + OXID oxid; + OID oid; + IPID ipid; +} STDOBJREF; + +typedef struct tagOBJREF { + unsigned long signature; + unsigned long flags; + GUID iid; + union { + struct OR_STANDARD { + STDOBJREF std; + DUALSTRINGARRAY saResAddr; + } u_standard; + struct OR_HANDLER { + STDOBJREF std; + CLSID clsid; + DUALSTRINGARRAY saResAddr; + } u_handler; + struct OR_CUSTOM { + CLSID clsid; + unsigned long cbExtension; + unsigned long size; + byte *pData; + } u_custom; + } u_objref; +} OBJREF; + +typedef struct tagMInterfacePointer { + ULONG ulCntData; + BYTE abData[1]; +} MInterfacePointer; + +typedef MInterfacePointer *PMInterfacePointer; + +#ifndef __IRemUnknown_FWD_DEFINED__ +#define __IRemUnknown_FWD_DEFINED__ +typedef struct IRemUnknown IRemUnknown; +#endif + +typedef IRemUnknown *LPREMUNKNOWN; + +typedef struct tagREMQIRESULT { + HRESULT hResult; + STDOBJREF std; +} REMQIRESULT; + +typedef struct tagREMINTERFACEREF { + IPID ipid; + unsigned long cPublicRefs; + unsigned long cPrivateRefs; +} REMINTERFACEREF; + +/********************************************************************** ******* + * IRemUnknown interface + */ +#ifndef __IRemUnknown_INTERFACE_DEFINED__ +#define __IRemUnknown_INTERFACE_DEFINED__ + +DEFINE_GUID(IID_IRemUnknown, 0x00000131, 0x0000, 0x0000, 0xc0,0x00, 0x00,0x00,0x00,0x00,0x00,0x46); +#if defined(__cplusplus) && !defined(CINTERFACE) +struct IRemUnknown : public IUnknown +{ + virtual HRESULT STDMETHODCALLTYPE RemQueryInterface( + REFIPID ripid, + unsigned long cRefs, + unsigned short cIids, + IID* iids, + REMQIRESULT** ppQIResults) = 0; + + virtual HRESULT STDMETHODCALLTYPE RemAddRef( + unsigned short cInterfaceRefs, + REMINTERFACEREF* InterfaceRefs, + HRESULT* pResults) = 0; + + virtual HRESULT STDMETHODCALLTYPE RemRelease( + unsigned short cInterfaceRefs, + REMINTERFACEREF* InterfaceRefs) = 0; + +}; +#else +typedef struct IRemUnknownVtbl IRemUnknownVtbl; +struct IRemUnknown { + const IRemUnknownVtbl* lpVtbl; +}; +struct IRemUnknownVtbl { + BEGIN_INTERFACE + + /*** IUnknown methods ***/ + HRESULT (STDMETHODCALLTYPE *QueryInterface)( + IRemUnknown* This, + REFIID riid, + void** ppvObject); + + ULONG (STDMETHODCALLTYPE *AddRef)( + IRemUnknown* This); + + ULONG (STDMETHODCALLTYPE *Release)( + IRemUnknown* This); + + /*** IRemUnknown methods ***/ + HRESULT (STDMETHODCALLTYPE *RemQueryInterface)( + IRemUnknown* This, + REFIPID ripid, + unsigned long cRefs, + unsigned short cIids, + IID* iids, + REMQIRESULT** ppQIResults); + + HRESULT (STDMETHODCALLTYPE *RemAddRef)( + IRemUnknown* This, + unsigned short cInterfaceRefs, + REMINTERFACEREF* InterfaceRefs, + HRESULT* pResults); + + HRESULT (STDMETHODCALLTYPE *RemRelease)( + IRemUnknown* This, + unsigned short cInterfaceRefs, + REMINTERFACEREF* InterfaceRefs); + + END_INTERFACE +}; + +#ifdef COBJMACROS +/*** IUnknown methods ***/ +#define IRemUnknown_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IRemUnknown_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IRemUnknown_Release(p) (p)->lpVtbl->Release(p) +/*** IRemUnknown methods ***/ +#define IRemUnknown_RemQueryInterface(p,a,b,c,d,e) (p)->lpVtbl->RemQueryInterface(p,a,b,c,d,e) +#define IRemUnknown_RemAddRef(p,a,b,c) (p)->lpVtbl->RemAddRef(p,a,b,c) +#define IRemUnknown_RemRelease(p,a,b) (p)->lpVtbl->RemRelease(p,a,b) +#endif + +#endif + +#define IRemUnknown_METHODS \ + /*** IUnknown methods ***/ \ + STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; \ + STDMETHOD_(ULONG,AddRef)(THIS) PURE; \ + STDMETHOD_(ULONG,Release)(THIS) PURE; \ + /*** IRemUnknown methods ***/ \ + STDMETHOD_(HRESULT,RemQueryInterface)(THIS_ REFIPID ripid, unsigned long cRefs, unsigned short cIids, IID* iids, REMQIRESULT** ppQIResults) PURE; \ + STDMETHOD_(HRESULT,RemAddRef)(THIS_ unsigned short cInterfaceRefs, REMINTERFACEREF* InterfaceRefs, HRESULT* pResults) PURE; \ + STDMETHOD_(HRESULT,RemRelease)(THIS_ unsigned short cInterfaceRefs, REMINTERFACEREF* InterfaceRefs) PURE; + +HRESULT CALLBACK IRemUnknown_RemQueryInterface_Proxy( + IRemUnknown* This, + REFIPID ripid, + unsigned long cRefs, + unsigned short cIids, + IID* iids, + REMQIRESULT** ppQIResults); +void __RPC_STUB IRemUnknown_RemQueryInterface_Stub( + struct IRpcStubBuffer* This, + struct IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +HRESULT CALLBACK IRemUnknown_RemAddRef_Proxy( + IRemUnknown* This, + unsigned short cInterfaceRefs, + REMINTERFACEREF* InterfaceRefs, + HRESULT* pResults); +void __RPC_STUB IRemUnknown_RemAddRef_Stub( + struct IRpcStubBuffer* This, + struct IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +HRESULT CALLBACK IRemUnknown_RemRelease_Proxy( + IRemUnknown* This, + unsigned short cInterfaceRefs, + REMINTERFACEREF* InterfaceRefs); +void __RPC_STUB IRemUnknown_RemRelease_Stub( + struct IRpcStubBuffer* This, + struct IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); + +#endif /* __IRemUnknown_INTERFACE_DEFINED__ */ + +#ifndef __IRemUnknown2_FWD_DEFINED__ +#define __IRemUnknown2_FWD_DEFINED__ +typedef struct IRemUnknown2 IRemUnknown2; +#endif + +typedef IRemUnknown2 *LPREMUNKNOWN2; + +/********************************************************************** ******* + * IRemUnknown2 interface + */ +#ifndef __IRemUnknown2_INTERFACE_DEFINED__ +#define __IRemUnknown2_INTERFACE_DEFINED__ + +DEFINE_GUID(IID_IRemUnknown2, 0x00000142, 0x0000, 0x0000, 0xc0,0x00, 0x00,0x00,0x00,0x00,0x00,0x46); +#if defined(__cplusplus) && !defined(CINTERFACE) +struct IRemUnknown2 : public IRemUnknown +{ + virtual HRESULT STDMETHODCALLTYPE RemQueryInterface2( + REFIPID ripid, + unsigned short cIids, + IID* iids, + HRESULT* phr, + MInterfacePointer** ppMIF) = 0; + +}; +#else +typedef struct IRemUnknown2Vtbl IRemUnknown2Vtbl; +struct IRemUnknown2 { + const IRemUnknown2Vtbl* lpVtbl; +}; +struct IRemUnknown2Vtbl { + BEGIN_INTERFACE + + /*** IUnknown methods ***/ + HRESULT (STDMETHODCALLTYPE *QueryInterface)( + IRemUnknown2* This, + REFIID riid, + void** ppvObject); + + ULONG (STDMETHODCALLTYPE *AddRef)( + IRemUnknown2* This); + + ULONG (STDMETHODCALLTYPE *Release)( + IRemUnknown2* This); + + /*** IRemUnknown methods ***/ + HRESULT (STDMETHODCALLTYPE *RemQueryInterface)( + IRemUnknown2* This, + REFIPID ripid, + unsigned long cRefs, + unsigned short cIids, + IID* iids, + REMQIRESULT** ppQIResults); + + HRESULT (STDMETHODCALLTYPE *RemAddRef)( + IRemUnknown2* This, + unsigned short cInterfaceRefs, + REMINTERFACEREF* InterfaceRefs, + HRESULT* pResults); + + HRESULT (STDMETHODCALLTYPE *RemRelease)( + IRemUnknown2* This, + unsigned short cInterfaceRefs, + REMINTERFACEREF* InterfaceRefs); + + /*** IRemUnknown2 methods ***/ + HRESULT (STDMETHODCALLTYPE *RemQueryInterface2)( + IRemUnknown2* This, + REFIPID ripid, + unsigned short cIids, + IID* iids, + HRESULT* phr, + MInterfacePointer** ppMIF); + + END_INTERFACE +}; + +#ifdef COBJMACROS +/*** IUnknown methods ***/ +#define IRemUnknown2_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IRemUnknown2_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IRemUnknown2_Release(p) (p)->lpVtbl->Release(p) +/*** IRemUnknown methods ***/ +#define IRemUnknown2_RemQueryInterface(p,a,b,c,d,e) (p)->lpVtbl->RemQueryInterface(p,a,b,c,d,e) +#define IRemUnknown2_RemAddRef(p,a,b,c) (p)->lpVtbl->RemAddRef(p,a,b,c) +#define IRemUnknown2_RemRelease(p,a,b) (p)->lpVtbl->RemRelease(p,a,b) +/*** IRemUnknown2 methods ***/ +#define IRemUnknown2_RemQueryInterface2(p,a,b,c,d,e) (p)->lpVtbl->RemQueryInterface2(p,a,b,c,d,e) +#endif + +#endif + +#define IRemUnknown2_METHODS \ + /*** IUnknown methods ***/ \ + STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; \ + STDMETHOD_(ULONG,AddRef)(THIS) PURE; \ + STDMETHOD_(ULONG,Release)(THIS) PURE; \ + /*** IRemUnknown methods ***/ \ + STDMETHOD_(HRESULT,RemQueryInterface)(THIS_ REFIPID ripid, unsigned long cRefs, unsigned short cIids, IID* iids, REMQIRESULT** ppQIResults) PURE; \ + STDMETHOD_(HRESULT,RemAddRef)(THIS_ unsigned short cInterfaceRefs, REMINTERFACEREF* InterfaceRefs, HRESULT* pResults) PURE; \ + STDMETHOD_(HRESULT,RemRelease)(THIS_ unsigned short cInterfaceRefs, REMINTERFACEREF* InterfaceRefs) PURE; \ + /*** IRemUnknown2 methods ***/ \ + STDMETHOD_(HRESULT,RemQueryInterface2)(THIS_ REFIPID ripid, unsigned short cIids, IID* iids, HRESULT* phr, MInterfacePointer** ppMIF) PURE; + +HRESULT CALLBACK IRemUnknown2_RemQueryInterface2_Proxy( + IRemUnknown2* This, + REFIPID ripid, + unsigned short cIids, + IID* iids, + HRESULT* phr, + MInterfacePointer** ppMIF); +void __RPC_STUB IRemUnknown2_RemQueryInterface2_Stub( + struct IRpcStubBuffer* This, + struct IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); + +#endif /* __IRemUnknown2_INTERFACE_DEFINED__ */ + +#if 0 +/********************************************************************** ******* + * IOXIDResolver interface (v0.0) + */ +DEFINE_GUID(IID_IOXIDResolver, 0x99fcfec4, 0x5260, 0x101b, 0xbb,0xcb, 0x00,0xaa,0x00,0x21,0x34,0x7a); +extern RPC_IF_HANDLE IOXIDResolver_v0_0_c_ifspec; +extern RPC_IF_HANDLE IOXIDResolver_v0_0_s_ifspec; +error_status_t ResolveOxid( + handle_t hRpc, + OXID* pOxid, + unsigned short cRequestedProtseqs, + unsigned short arRequestedProtseqs[], + DUALSTRINGARRAY** ppdsaOxidBindings, + IPID* pipidRemUnknown, + DWORD* pAuthnHint); +error_status_t SimplePing( + handle_t hRpc, + SETID* pSetId); +error_status_t ComplexPing( + handle_t hRpc, + SETID* pSetId, + unsigned short SequenceNum, + unsigned short cAddToSet, + unsigned short cDelFromSet, + OID AddToSet[], + OID DelFromSet[], + unsigned short* pPingBackoffFactor); +error_status_t ServerAlive( + handle_t hRpc); +error_status_t ResolveOxid2( + handle_t hRpc, + OXID* pOxid, + unsigned short cRequestedProtseqs, + unsigned short arRequestedProtseqs[], + DUALSTRINGARRAY** ppdsaOxidBindings, + IPID* pipidRemUnknown, + DWORD* pAuthnHint, + COMVERSION* pComVersion); + +#define MODE_GET_CLASS_OBJECT (0xffffffff) + +/********************************************************************** ******* + * IRemoteActivation interface (v0.0) + */ +DEFINE_GUID(IID_IRemoteActivation, 0x4d9f4ab8, 0x7d1c, 0x11cf, 0x86,0x1e, 0x00,0x20,0xaf,0x6e,0x7c,0x57); +extern RPC_IF_HANDLE IRemoteActivation_v0_0_c_ifspec; +extern RPC_IF_HANDLE IRemoteActivation_v0_0_s_ifspec; +HRESULT RemoteActivation( + handle_t hRpc, + ORPCTHIS* ORPCthis, + ORPCTHAT* ORPCthat, + GUID* Clsid, + WCHAR* pwszObjectName, + MInterfacePointer* pObjectStorage, + DWORD ClientImpLevel, + DWORD Mode, + DWORD Interfaces, + IID* pIIDs, + unsigned short cRequestedProtseqs, + unsigned short RequestedProtseqs[], + OXID* pOxid, + DUALSTRINGARRAY** ppdsaOxidBindings, + IPID* pipidRemUnknown, + DWORD* pAuthnHint, + COMVERSION* pServerVersion, + HRESULT* phr, + MInterfacePointer** ppInterfaceData, + HRESULT* pResults); + +#endif +#ifdef __cplusplus +} +#endif +#endif /* __WIDL_DCOM_H */ _____ Modified: trunk/reactos/lib/ole32/ifs.c --- vendor/wine/dlls/ole32/current/ifs.c 2004-12-31 15:19:40 UTC (rev 12574) +++ trunk/reactos/lib/ole32/ifs.c 2004-12-31 15:20:48 UTC (rev 12575) @@ -77,8 +77,8 @@ { LPVOID *NewSpyedBlocks; - if (!Malloc32.SpyedBlocks) NewSpyedBlocks = LocalAlloc(GMEM_ZEROINIT, NewLength); - else NewSpyedBlocks = LocalReAlloc(Malloc32.SpyedBlocks, NewLength, GMEM_ZEROINIT); + if (!Malloc32.SpyedBlocks) NewSpyedBlocks = LocalAlloc(GMEM_ZEROINIT, NewLength * sizeof(PVOID)); + else NewSpyedBlocks = LocalReAlloc(Malloc32.SpyedBlocks, NewLength * sizeof(PVOID), GMEM_ZEROINIT); if (NewSpyedBlocks) { Malloc32.SpyedBlocks = NewSpyedBlocks; Malloc32.SpyedBlockTableLength = NewLength; _____ Modified: trunk/reactos/lib/ole32/ifs.h --- vendor/wine/dlls/ole32/current/ifs.h 2004-12-31 15:19:40 UTC (rev 12574) +++ trunk/reactos/lib/ole32/ifs.h 2004-12-31 15:20:48 UTC (rev 12575) @@ -33,8 +33,7 @@ * IMalloc16 interface */ -typedef struct IMalloc16 IMalloc16, *LPMALLOC16; - +#undef INTERFACE #define INTERFACE IMalloc16 DECLARE_INTERFACE_(IMalloc16,IUnknown) { @@ -52,14 +51,14 @@ }; #undef INTERFACE +typedef struct IMalloc16 *LPMALLOC16; + /**********************************************************************/ extern LPMALLOC16 IMalloc16_Constructor(); /**********************************************************************/ -typedef struct ILockBytes16 *LPLOCKBYTES16, ILockBytes16; - #define INTERFACE ILockBytes16 DECLARE_INTERFACE_(ILockBytes16,IUnknown) { @@ -95,8 +94,6 @@ DWORD reserved; } STATSTG16; -typedef struct IStream16 IStream16, *LPSTREAM16; - #define INTERFACE IStream16 DECLARE_INTERFACE_(IStream16,ISequentialStream) { @@ -124,8 +121,6 @@ typedef OLECHAR16 **SNB16; -typedef struct IStorage16 IStorage16, *LPSTORAGE16; - #define INTERFACE IStorage16 DECLARE_INTERFACE_(IStorage16,IUnknown) { _____ Added: trunk/reactos/lib/ole32/makefile --- vendor/wine/dlls/ole32/current/makefile 2004-12-31 15:19:40 UTC (rev 12574) +++ trunk/reactos/lib/ole32/makefile 2004-12-31 15:20:48 UTC (rev 12575) @@ -0,0 +1,9 @@ +# $Id: makefile 7409 2004-01-02 19:49:47Z gvg $ + +PATH_TO_TOP = ../.. + +TARGET_TYPE = winedll + +include $(PATH_TO_TOP)/rules.mak + +include $(TOOLS_PATH)/helper.mk _____ Modified: trunk/reactos/lib/ole32/oleproxy.c --- vendor/wine/dlls/ole32/current/oleproxy.c 2004-12-31 15:19:40 UTC (rev 12574) +++ trunk/reactos/lib/ole32/oleproxy.c 2004-12-31 15:20:48 UTC (rev 12575) @@ -38,6 +38,7 @@ #include <stdlib.h> #include <stdarg.h> +#include <stddef.h> #include <stdio.h> #include <string.h>
19 years, 12 months
1
0
0
0
Integrated change by gvg in revision 12574
by gvg@svn.reactos.com
Need to remove existing files before doing vendor import Deleted: trunk/reactos/lib/ole32/
19 years, 12 months
1
0
0
0
Integrated change by gvg in revision 12573
by gvg@svn.reactos.com
Tag Wine-20041201 Added: vendor/wine/dlls/ole32/Wine-20041201/ _____ Copied: vendor/wine/dlls/ole32/Wine-20041201 (from rev 12572, vendor/wine/dlls/ole32/current)
19 years, 12 months
1
0
0
0
Integrated change by gvg in revision 12572
by gvg@svn.reactos.com
Wine-20041201 vendor drop Added: vendor/wine/dlls/ole32/ Added: vendor/wine/dlls/ole32/current/ Added: vendor/wine/dlls/ole32/current/Makefile.in Added: vendor/wine/dlls/ole32/current/antimoniker.c Added: vendor/wine/dlls/ole32/current/bindctx.c Added: vendor/wine/dlls/ole32/current/clipboard.c Added: vendor/wine/dlls/ole32/current/compobj.c Added: vendor/wine/dlls/ole32/current/compobj.spec Added: vendor/wine/dlls/ole32/current/compobj_private.h Added: vendor/wine/dlls/ole32/current/compositemoniker.c Added: vendor/wine/dlls/ole32/current/datacache.c Added: vendor/wine/dlls/ole32/current/dcom.idl Added: vendor/wine/dlls/ole32/current/defaulthandler.c Added: vendor/wine/dlls/ole32/current/errorinfo.c Added: vendor/wine/dlls/ole32/current/filemoniker.c Added: vendor/wine/dlls/ole32/current/ftmarshal.c Added: vendor/wine/dlls/ole32/current/git.c Added: vendor/wine/dlls/ole32/current/hglobalstream.c Added: vendor/wine/dlls/ole32/current/ifs.c Added: vendor/wine/dlls/ole32/current/ifs.h Added: vendor/wine/dlls/ole32/current/itemmoniker.c Added: vendor/wine/dlls/ole32/current/marshal.c Added: vendor/wine/dlls/ole32/current/memlockbytes.c Added: vendor/wine/dlls/ole32/current/memlockbytes16.c Added: vendor/wine/dlls/ole32/current/moniker.c Added: vendor/wine/dlls/ole32/current/moniker.h Added: vendor/wine/dlls/ole32/current/ole16.c Added: vendor/wine/dlls/ole32/current/ole2.c Added: vendor/wine/dlls/ole32/current/ole2.spec Added: vendor/wine/dlls/ole32/current/ole2_16.c Added: vendor/wine/dlls/ole32/current/ole2conv.spec Added: vendor/wine/dlls/ole32/current/ole2impl.c Added: vendor/wine/dlls/ole32/current/ole2nls.c Added: vendor/wine/dlls/ole32/current/ole2nls.spec Added: vendor/wine/dlls/ole32/current/ole2prox.spec Added: vendor/wine/dlls/ole32/current/ole2stubs.c Added: vendor/wine/dlls/ole32/current/ole2thk.spec Added: vendor/wine/dlls/ole32/current/ole32.spec Added: vendor/wine/dlls/ole32/current/ole32_main.c Added: vendor/wine/dlls/ole32/current/ole32_main.h Added: vendor/wine/dlls/ole32/current/ole32res.rc Added: vendor/wine/dlls/ole32/current/oleobj.c Added: vendor/wine/dlls/ole32/current/oleproxy.c Added: vendor/wine/dlls/ole32/current/olestd.h Added: vendor/wine/dlls/ole32/current/regsvr.c Added: vendor/wine/dlls/ole32/current/rpc.c Added: vendor/wine/dlls/ole32/current/stg_bigblockfile.c Added: vendor/wine/dlls/ole32/current/stg_stream.c Added: vendor/wine/dlls/ole32/current/storage.c Added: vendor/wine/dlls/ole32/current/storage.spec Added: vendor/wine/dlls/ole32/current/storage32.c Added: vendor/wine/dlls/ole32/current/storage32.h Added: vendor/wine/dlls/ole32/current/version.rc _____ Added: vendor/wine/dlls/ole32/current/Makefile.in --- vendor/wine/dlls/ole32/current/Makefile.in 2004-12-31 15:14:19 UTC (rev 12571) +++ vendor/wine/dlls/ole32/current/Makefile.in 2004-12-31 15:17:24 UTC (rev 12572) @@ -0,0 +1,74 @@ +EXTRADEFS = -D_OLE32_ -DCOM_NO_WINDOWS_H +TOPSRCDIR = @top_srcdir@ +TOPOBJDIR = ../.. +SRCDIR = @srcdir@ +VPATH = @srcdir@ +MODULE = ole32.dll +IMPORTS = advapi32 user32 gdi32 rpcrt4 kernel32 ntdll +EXTRALIBS = -luuid + +C_SRCS = \ + antimoniker.c \ + bindctx.c \ + clipboard.c \ + compobj.c \ + compositemoniker.c \ + datacache.c \ + defaulthandler.c \ + errorinfo.c \ + filemoniker.c \ + ftmarshal.c \ + git.c \ + hglobalstream.c \ + ifs.c \ + itemmoniker.c \ + marshal.c \ + memlockbytes.c \ + moniker.c \ + ole2.c \ + ole2stubs.c \ + ole2impl.c \ + ole32_main.c \ + oleobj.c \ + oleproxy.c \ + regsvr.c \ + rpc.c \ + stg_bigblockfile.c \ + stg_stream.c \ + storage32.c + +C_SRCS16 = \ + memlockbytes16.c \ + ole16.c \ + ole2_16.c \ + ole2nls.c \ + storage.c + +SPEC_SRCS16 = \ + compobj.spec \ + ole2.spec \ + ole2conv.spec \ + ole2nls.spec \ + ole2prox.spec \ + ole2thk.spec \ + storage.spec + +RC_SRCS = ole32res.rc +RC_BINSRC = ole32res.rc +RC_BINARIES = \ + drag_copy.cur \ + drag_link.cur \ + drag_move.cur \ + nodrop.cur + +IDL_SRCS = \ + dcom.idl + +SUBDIRS = tests + +@MAKE_DLL_RULES@ + +### Dependencies: + +# note: this will get overwritten by make depend +$(ALL_OBJS): $(IDL_SRCS:.idl=.h) _____ Added: vendor/wine/dlls/ole32/current/antimoniker.c --- vendor/wine/dlls/ole32/current/antimoniker.c 2004-12-31 15:14:19 UTC (rev 12571) +++ vendor/wine/dlls/ole32/current/antimoniker.c 2004-12-31 15:17:24 UTC (rev 12572) @@ -0,0 +1,666 @@ +/********************************************************************** ***************** + * AntiMonikers implementation + * + * Copyright 1999 Noomen Hamza + * + * 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 <assert.h> +#include <stdarg.h> +#include <string.h> + +#define COBJMACROS +#define NONAMELESSUNION +#define NONAMELESSSTRUCT + +#include "windef.h" +#include "winbase.h" +#include "winerror.h" +#include "wine/unicode.h" +#include "objbase.h" +#include "wine/debug.h" +#include "moniker.h" + +WINE_DEFAULT_DEBUG_CHANNEL(ole); + +const CLSID CLSID_AntiMoniker = { + 0x305, 0, 0, {0xC0, 0, 0, 0, 0, 0, 0, 0x46} +}; + +/* AntiMoniker data structure */ +typedef struct AntiMonikerImpl{ + + IMonikerVtbl* lpvtbl1; /* VTable relative to the IMoniker interface.*/ + + /* The ROT (RunningObjectTable implementation) uses the IROTData interface to test whether + * two monikers are equal. That's whay IROTData interface is implemented by monikers. + */ + IROTDataVtbl* lpvtbl2; /* VTable relative to the IROTData interface.*/ + + ULONG ref; /* reference counter for this object */ + +} AntiMonikerImpl; + +/********************************************************************** **********/ +/* AntiMoniker prototype functions : */ + +/* IUnknown prototype functions */ +static HRESULT WINAPI AntiMonikerImpl_QueryInterface(IMoniker* iface,REFIID riid,void** ppvObject); +static ULONG WINAPI AntiMonikerImpl_AddRef(IMoniker* iface); +static ULONG WINAPI AntiMonikerImpl_Release(IMoniker* iface); + +/* IPersist prototype functions */ +static HRESULT WINAPI AntiMonikerImpl_GetClassID(IMoniker* iface, CLSID *pClassID); + +/* IPersistStream prototype functions */ +static HRESULT WINAPI AntiMonikerImpl_IsDirty(IMoniker* iface); +static HRESULT WINAPI AntiMonikerImpl_Load(IMoniker* iface, IStream* pStm); +static HRESULT WINAPI AntiMonikerImpl_Save(IMoniker* iface, IStream* pStm, BOOL fClearDirty); +static HRESULT WINAPI AntiMonikerImpl_GetSizeMax(IMoniker* iface, ULARGE_INTEGER* pcbSize); + +/* IMoniker prototype functions */ +static HRESULT WINAPI AntiMonikerImpl_BindToObject(IMoniker* iface,IBindCtx* pbc, IMoniker* pmkToLeft, REFIID riid, VOID** ppvResult); +static HRESULT WINAPI AntiMonikerImpl_BindToStorage(IMoniker* iface,IBindCtx* pbc, IMoniker* pmkToLeft, REFIID riid, VOID** ppvResult); +static HRESULT WINAPI AntiMonikerImpl_Reduce(IMoniker* iface,IBindCtx* pbc, DWORD dwReduceHowFar,IMoniker** ppmkToLeft, IMoniker** ppmkReduced); +static HRESULT WINAPI AntiMonikerImpl_ComposeWith(IMoniker* iface,IMoniker* pmkRight,BOOL fOnlyIfNotGeneric, IMoniker** ppmkComposite); +static HRESULT WINAPI AntiMonikerImpl_Enum(IMoniker* iface,BOOL fForward, IEnumMoniker** ppenumMoniker); +static HRESULT WINAPI AntiMonikerImpl_IsEqual(IMoniker* iface,IMoniker* pmkOtherMoniker); +static HRESULT WINAPI AntiMonikerImpl_Hash(IMoniker* iface,DWORD* pdwHash); +static HRESULT WINAPI AntiMonikerImpl_IsRunning(IMoniker* iface,IBindCtx* pbc, IMoniker* pmkToLeft, IMoniker* pmkNewlyRunning); +static HRESULT WINAPI AntiMonikerImpl_GetTimeOfLastChange(IMoniker* iface, IBindCtx* pbc, IMoniker* pmkToLeft, FILETIME* pAntiTime); +static HRESULT WINAPI AntiMonikerImpl_Inverse(IMoniker* iface,IMoniker** ppmk); +static HRESULT WINAPI AntiMonikerImpl_CommonPrefixWith(IMoniker* iface,IMoniker* pmkOther, IMoniker** ppmkPrefix); +static HRESULT WINAPI AntiMonikerImpl_RelativePathTo(IMoniker* iface,IMoniker* pmOther, IMoniker** ppmkRelPath); +static HRESULT WINAPI AntiMonikerImpl_GetDisplayName(IMoniker* iface,IBindCtx* pbc, IMoniker* pmkToLeft, LPOLESTR *ppszDisplayName); +static HRESULT WINAPI AntiMonikerImpl_ParseDisplayName(IMoniker* iface,IBindCtx* pbc, IMoniker* pmkToLeft, LPOLESTR pszDisplayName, ULONG* pchEaten, IMoniker** ppmkOut); +static HRESULT WINAPI AntiMonikerImpl_IsSystemMoniker(IMoniker* iface,DWORD* pwdMksys); + +/********************************************************************** **********/ +/* IROTData prototype functions */ + +/* IUnknown prototype functions */ +static HRESULT WINAPI AntiMonikerROTDataImpl_QueryInterface(IROTData* iface,REFIID riid,VOID** ppvObject); +static ULONG WINAPI AntiMonikerROTDataImpl_AddRef(IROTData* iface); +static ULONG WINAPI AntiMonikerROTDataImpl_Release(IROTData* iface); + +/* IROTData prototype function */ +static HRESULT WINAPI AntiMonikerROTDataImpl_GetComparaisonData(IROTData* iface,BYTE* pbData,ULONG cbMax,ULONG* pcbData); + +/* Local function used by AntiMoniker implementation */ +HRESULT WINAPI AntiMonikerImpl_Construct(AntiMonikerImpl* iface); +HRESULT WINAPI AntiMonikerImpl_Destroy(AntiMonikerImpl* iface); + +/********************************************************************** **********/ +/* Virtual function table for the AntiMonikerImpl class which include IPersist,*/ +/* IPersistStream and IMoniker functions. */ +static IMonikerVtbl VT_AntiMonikerImpl = +{ + AntiMonikerImpl_QueryInterface, + AntiMonikerImpl_AddRef, + AntiMonikerImpl_Release, + AntiMonikerImpl_GetClassID, + AntiMonikerImpl_IsDirty, + AntiMonikerImpl_Load, + AntiMonikerImpl_Save, + AntiMonikerImpl_GetSizeMax, + AntiMonikerImpl_BindToObject, + AntiMonikerImpl_BindToStorage, + AntiMonikerImpl_Reduce, + AntiMonikerImpl_ComposeWith, + AntiMonikerImpl_Enum, + AntiMonikerImpl_IsEqual, + AntiMonikerImpl_Hash, + AntiMonikerImpl_IsRunning, + AntiMonikerImpl_GetTimeOfLastChange, + AntiMonikerImpl_Inverse, + AntiMonikerImpl_CommonPrefixWith, + AntiMonikerImpl_RelativePathTo, + AntiMonikerImpl_GetDisplayName, + AntiMonikerImpl_ParseDisplayName, + AntiMonikerImpl_IsSystemMoniker +}; + +/********************************************************************** **********/ +/* Virtual function table for the IROTData class. */ +static IROTDataVtbl VT_ROTDataImpl = +{ + AntiMonikerROTDataImpl_QueryInterface, + AntiMonikerROTDataImpl_AddRef, + AntiMonikerROTDataImpl_Release, + AntiMonikerROTDataImpl_GetComparaisonData +}; + +/********************************************************************** ********* + * AntiMoniker_QueryInterface + ************************************************************************ *******/ +HRESULT WINAPI AntiMonikerImpl_QueryInterface(IMoniker* iface,REFIID riid,void** ppvObject) +{ + AntiMonikerImpl *This = (AntiMonikerImpl *)iface; + + TRACE("(%p,%p,%p)\n",This,riid,ppvObject); + + /* Perform a sanity check on the parameters.*/ + if ( (This==0) || (ppvObject==0) ) + return E_INVALIDARG; + + /* Initialize the return parameter */ + *ppvObject = 0; + + /* Compare the riid with the interface IDs implemented by this object.*/ + if (IsEqualIID(&IID_IUnknown, riid) || + IsEqualIID(&IID_IPersist, riid) || + IsEqualIID(&IID_IPersistStream, riid) || + IsEqualIID(&IID_IMoniker, riid) + ) + *ppvObject = iface; + else if (IsEqualIID(&IID_IROTData, riid)) + *ppvObject = (IROTData*)&(This->lpvtbl2); + + /* Check that we obtained an interface.*/ + if ((*ppvObject)==0) + return E_NOINTERFACE; + + /* Query Interface always increases the reference count by one when it is successful */ + AntiMonikerImpl_AddRef(iface); + + return S_OK; +} + +/********************************************************************** ******** + * AntiMoniker_AddRef + ************************************************************************ ******/ +ULONG WINAPI AntiMonikerImpl_AddRef(IMoniker* iface) +{ + AntiMonikerImpl *This = (AntiMonikerImpl *)iface; + + TRACE("(%p)\n",This); + + return InterlockedIncrement(&This->ref); +} + +/********************************************************************** ******** + * AntiMoniker_Release + ************************************************************************ ******/ +ULONG WINAPI AntiMonikerImpl_Release(IMoniker* iface) +{ + AntiMonikerImpl *This = (AntiMonikerImpl *)iface; + ULONG ref; + + TRACE("(%p)\n",This); + + ref = InterlockedDecrement(&This->ref); + + /* destroy the object if there's no more reference on it */ + if (ref == 0) AntiMonikerImpl_Destroy(This); + + return ref; +} + +/********************************************************************** ******** + * AntiMoniker_GetClassID + ************************************************************************ ******/ +HRESULT WINAPI AntiMonikerImpl_GetClassID(IMoniker* iface,CLSID *pClassID) +{ + TRACE("(%p,%p),stub!\n",iface,pClassID); + + if (pClassID==NULL) + return E_POINTER; + + *pClassID = CLSID_AntiMoniker; + + return S_OK; +} + +/********************************************************************** ******** + * AntiMoniker_IsDirty + ************************************************************************ ******/ +HRESULT WINAPI AntiMonikerImpl_IsDirty(IMoniker* iface) +{ + /* Note that the OLE-provided implementations of the IPersistStream::IsDirty + method in the OLE-provided moniker interfaces always return S_FALSE because + their internal state never changes. */ + + TRACE("(%p)\n",iface); + + return S_FALSE; +} + +/********************************************************************** ******** + * AntiMoniker_Load + ************************************************************************ ******/ +HRESULT WINAPI AntiMonikerImpl_Load(IMoniker* iface,IStream* pStm) +{ + DWORD constant=1,dwbuffer; + HRESULT res; + + /* data read by this function is only a DWORD constant (must be 1) ! */ + res=IStream_Read(pStm,&dwbuffer,sizeof(DWORD),NULL); + + if (SUCCEEDED(res)&& dwbuffer!=constant) + return E_FAIL; + + return res; +} + +/********************************************************************** ******** + * AntiMoniker_Save + ************************************************************************ ******/ +HRESULT WINAPI AntiMonikerImpl_Save(IMoniker* iface,IStream* pStm,BOOL fClearDirty) +{ + DWORD constant=1; + HRESULT res; + + /* data written by this function is only a DWORD constant set to 1 ! */ + res=IStream_Write(pStm,&constant,sizeof(constant),NULL); + + return res; +} + +/********************************************************************** ******** + * AntiMoniker_GetSizeMax + ************************************************************************ ******/ +HRESULT WINAPI AntiMonikerImpl_GetSizeMax(IMoniker* iface, + ULARGE_INTEGER* pcbSize)/* Pointer to size of stream needed to save object */ +{ + TRACE("(%p,%p)\n",iface,pcbSize); + + if (pcbSize!=NULL) + return E_POINTER; + + /* for more details see AntiMonikerImpl_Save coments */ + + /* Normaly the sizemax must be the size of DWORD ! but I tested this function it ususlly return 16 bytes */ + /* more than the number of bytes used by AntiMoniker::Save function */ + pcbSize->u.LowPart = sizeof(DWORD)+16; + + pcbSize->u.HighPart=0; + + return S_OK; +} + +/********************************************************************** ******** + * AntiMoniker_Construct (local function) + ************************************************************************ *******/ +HRESULT WINAPI AntiMonikerImpl_Construct(AntiMonikerImpl* This) +{ + + TRACE("(%p)\n",This); + + /* Initialize the virtual fgunction table. */ + This->lpvtbl1 = &VT_AntiMonikerImpl; + This->lpvtbl2 = &VT_ROTDataImpl; + This->ref = 0; + + return S_OK; +} + +/********************************************************************** ******** + * AntiMoniker_Destroy (local function) + ************************************************************************ *******/ +HRESULT WINAPI AntiMonikerImpl_Destroy(AntiMonikerImpl* This) +{ + TRACE("(%p)\n",This); + + return HeapFree(GetProcessHeap(),0,This); +} + +/********************************************************************** ******** + * AntiMoniker_BindToObject + ************************************************************************ ******/ +HRESULT WINAPI AntiMonikerImpl_BindToObject(IMoniker* iface, + IBindCtx* pbc, + IMoniker* pmkToLeft, + REFIID riid, + VOID** ppvResult) +{ + TRACE("(%p,%p,%p,%p,%p)\n",iface,pbc,pmkToLeft,riid,ppvResult); + return E_NOTIMPL; +} + +/********************************************************************** ******** + * AntiMoniker_BindToStorage + ************************************************************************ ******/ +HRESULT WINAPI AntiMonikerImpl_BindToStorage(IMoniker* iface, + IBindCtx* pbc, + IMoniker* pmkToLeft, + REFIID riid, + VOID** ppvResult) +{ + TRACE("(%p,%p,%p,%p,%p)\n",iface,pbc,pmkToLeft,riid,ppvResult); + return E_NOTIMPL; +} + +/********************************************************************** ******** + * AntiMoniker_Reduce + ************************************************************************ ******/ +HRESULT WINAPI AntiMonikerImpl_Reduce(IMoniker* iface, + IBindCtx* pbc, + DWORD dwReduceHowFar, + IMoniker** ppmkToLeft, + IMoniker** ppmkReduced) +{ + TRACE("(%p,%p,%ld,%p,%p)\n",iface,pbc,dwReduceHowFar,ppmkToLeft,ppmkRedu ced); + + if (ppmkReduced==NULL) + return E_POINTER; + + AntiMonikerImpl_AddRef(iface); + + *ppmkReduced=iface; + + return MK_S_REDUCED_TO_SELF; +} +/********************************************************************** ******** + * AntiMoniker_ComposeWith + ************************************************************************ ******/ +HRESULT WINAPI AntiMonikerImpl_ComposeWith(IMoniker* iface, + IMoniker* pmkRight, + BOOL fOnlyIfNotGeneric, + IMoniker** ppmkComposite) +{ + + TRACE("(%p,%p,%d,%p)\n",iface,pmkRight,fOnlyIfNotGeneric,ppmkComposite); + + if ((ppmkComposite==NULL)||(pmkRight==NULL)) + return E_POINTER; + + *ppmkComposite=0; + + if (fOnlyIfNotGeneric) + return MK_E_NEEDGENERIC; + else + return CreateGenericComposite(iface,pmkRight,ppmkComposite); +} + +/********************************************************************** ******** + * AntiMoniker_Enum + ************************************************************************ ******/ +HRESULT WINAPI AntiMonikerImpl_Enum(IMoniker* iface,BOOL fForward, IEnumMoniker** ppenumMoniker) +{ + TRACE("(%p,%d,%p)\n",iface,fForward,ppenumMoniker); + + if (ppenumMoniker == NULL) + return E_POINTER; + + *ppenumMoniker = NULL; + + return S_OK; +} + +/********************************************************************** ******** + * AntiMoniker_IsEqual + ************************************************************************ ******/ +HRESULT WINAPI AntiMonikerImpl_IsEqual(IMoniker* iface,IMoniker* pmkOtherMoniker) +{ + DWORD mkSys; + + TRACE("(%p,%p)\n",iface,pmkOtherMoniker); + + if (pmkOtherMoniker==NULL) + return S_FALSE; + + IMoniker_IsSystemMoniker(pmkOtherMoniker,&mkSys); + + if (mkSys==MKSYS_ANTIMONIKER) + return S_OK; + else + return S_FALSE; +} + +/********************************************************************** ******** + * AntiMoniker_Hash + ************************************************************************ ******/ +HRESULT WINAPI AntiMonikerImpl_Hash(IMoniker* iface,DWORD* pdwHash) +{ + if (pdwHash==NULL) + return E_POINTER; + + *pdwHash=0; + + return S_OK; +} + +/********************************************************************** ******** + * AntiMoniker_IsRunning + ************************************************************************ ******/ +HRESULT WINAPI AntiMonikerImpl_IsRunning(IMoniker* iface, + IBindCtx* pbc, + IMoniker* pmkToLeft, + IMoniker* pmkNewlyRunning) +{ + IRunningObjectTable* rot; + HRESULT res; + + TRACE("(%p,%p,%p,%p)\n",iface,pbc,pmkToLeft,pmkNewlyRunning); + + if (pbc==NULL) + return E_INVALIDARG; + + res=IBindCtx_GetRunningObjectTable(pbc,&rot); + + if (FAILED(res)) + return res; + + res = IRunningObjectTable_IsRunning(rot,iface); + + IRunningObjectTable_Release(rot); + + return res; +} + +/********************************************************************** ******** + * AntiMoniker_GetTimeOfLastChange + ************************************************************************ ******/ +HRESULT WINAPI AntiMonikerImpl_GetTimeOfLastChange(IMoniker* iface, + IBindCtx* pbc, + IMoniker* pmkToLeft, + FILETIME* pAntiTime) +{ + TRACE("(%p,%p,%p,%p)\n",iface,pbc,pmkToLeft,pAntiTime); + return E_NOTIMPL; +} + +/********************************************************************** ******** + * AntiMoniker_Inverse + ************************************************************************ ******/ +HRESULT WINAPI AntiMonikerImpl_Inverse(IMoniker* iface,IMoniker** ppmk) +{ + TRACE("(%p,%p)\n",iface,ppmk); + + if (ppmk==NULL) + return E_POINTER; + + *ppmk=0; + + return MK_E_NOINVERSE; +} + +/********************************************************************** ******** + * AntiMoniker_CommonPrefixWith + ************************************************************************ ******/ +HRESULT WINAPI AntiMonikerImpl_CommonPrefixWith(IMoniker* iface,IMoniker* pmkOther,IMoniker** ppmkPrefix) +{ + DWORD mkSys; + + IMoniker_IsSystemMoniker(pmkOther,&mkSys); + + if(mkSys==MKSYS_ITEMMONIKER){ + + IMoniker_AddRef(iface); + + *ppmkPrefix=iface; + + IMoniker_AddRef(iface); + + return MK_S_US; + } + else + return MonikerCommonPrefixWith(iface,pmkOther,ppmkPrefix); +} + +/********************************************************************** ******** + * AntiMoniker_RelativePathTo + ************************************************************************ ******/ +HRESULT WINAPI AntiMonikerImpl_RelativePathTo(IMoniker* iface,IMoniker* pmOther, IMoniker** ppmkRelPath) +{ + TRACE("(%p,%p,%p)\n",iface,pmOther,ppmkRelPath); + + if (ppmkRelPath==NULL) + return E_POINTER; + + IMoniker_AddRef(pmOther); + + *ppmkRelPath=pmOther; + + return MK_S_HIM; +} + +/********************************************************************** ******** + * AntiMoniker_GetDisplayName + ************************************************************************ ******/ +HRESULT WINAPI AntiMonikerImpl_GetDisplayName(IMoniker* iface, + IBindCtx* pbc, + IMoniker* pmkToLeft, + LPOLESTR *ppszDisplayName) +{ + static const WCHAR back[]={'\\','.','.',0}; + + TRACE("(%p,%p,%p,%p)\n",iface,pbc,pmkToLeft,ppszDisplayName); + + if (ppszDisplayName==NULL) + return E_POINTER; + + if (pmkToLeft!=NULL){ + FIXME("() pmkToLeft!=NULL not implemented \n"); + return E_NOTIMPL; + } + + *ppszDisplayName=CoTaskMemAlloc(sizeof(back)); + + if (*ppszDisplayName==NULL) + return E_OUTOFMEMORY; + + strcpyW(*ppszDisplayName,back); + + return S_OK; +} + +/********************************************************************** ******** + * AntiMoniker_ParseDisplayName + ************************************************************************ ******/ +HRESULT WINAPI AntiMonikerImpl_ParseDisplayName(IMoniker* iface, + IBindCtx* pbc, + IMoniker* pmkToLeft, + LPOLESTR pszDisplayName, + ULONG* pchEaten, + IMoniker** ppmkOut) +{ + TRACE("(%p,%p,%p,%p,%p,%p)\n",iface,pbc,pmkToLeft,pszDisplayName,pchEate n,ppmkOut); + return E_NOTIMPL; +} + +/********************************************************************** ******** + * AntiMoniker_IsSystemMoniker + ************************************************************************ ******/ +HRESULT WINAPI AntiMonikerImpl_IsSystemMoniker(IMoniker* iface,DWORD* pwdMksys) +{ + TRACE("(%p,%p)\n",iface,pwdMksys); + + if (!pwdMksys) + return E_POINTER; + + (*pwdMksys)=MKSYS_ANTIMONIKER; + + return S_OK; +} + +/********************************************************************** ********* + * AntiMonikerIROTData_QueryInterface + ************************************************************************ *******/ +HRESULT WINAPI AntiMonikerROTDataImpl_QueryInterface(IROTData *iface,REFIID riid,VOID** ppvObject) +{ + + ICOM_THIS_From_IROTData(IMoniker, iface); + + TRACE("(%p,%p,%p)\n",iface,riid,ppvObject); + + return AntiMonikerImpl_QueryInterface(This, riid, ppvObject); +} + +/********************************************************************** * + * AntiMonikerIROTData_AddRef + */ +ULONG WINAPI AntiMonikerROTDataImpl_AddRef(IROTData *iface) +{ + ICOM_THIS_From_IROTData(IMoniker, iface); + + TRACE("(%p)\n",iface); + + return AntiMonikerImpl_AddRef(This); +} + +/********************************************************************** * + * AntiMonikerIROTData_Release + */ +ULONG WINAPI AntiMonikerROTDataImpl_Release(IROTData* iface) +{ + ICOM_THIS_From_IROTData(IMoniker, iface); + + TRACE("(%p)\n",iface); + + return AntiMonikerImpl_Release(This); +} + +/********************************************************************** ******** + * AntiMonikerIROTData_GetComparaisonData + ************************************************************************ ******/ +HRESULT WINAPI AntiMonikerROTDataImpl_GetComparaisonData(IROTData* iface, + BYTE* pbData, + ULONG cbMax, + ULONG* pcbData) +{ + FIXME("(),stub!\n"); + return E_NOTIMPL; +} + +/********************************************************************** ******** + * CreateAntiMoniker [OLE32.@] + ************************************************************************ ******/ +HRESULT WINAPI CreateAntiMoniker(LPMONIKER * ppmk) +{ + AntiMonikerImpl* newAntiMoniker = 0; + HRESULT hr = S_OK; + IID riid=IID_IMoniker; + + TRACE("(%p)\n",ppmk); + + newAntiMoniker = HeapAlloc(GetProcessHeap(), 0, sizeof(AntiMonikerImpl)); + + if (newAntiMoniker == 0) + return STG_E_INSUFFICIENTMEMORY; + + hr = AntiMonikerImpl_Construct(newAntiMoniker); + + if (FAILED(hr)){ + + HeapFree(GetProcessHeap(),0,newAntiMoniker); + return hr; + } + + hr = AntiMonikerImpl_QueryInterface((IMoniker*)newAntiMoniker,&riid,(void**)p pmk); + + return hr; +} _____ Added: vendor/wine/dlls/ole32/current/bindctx.c --- vendor/wine/dlls/ole32/current/bindctx.c 2004-12-31 15:14:19 UTC (rev 12571) +++ vendor/wine/dlls/ole32/current/bindctx.c 2004-12-31 15:17:24 UTC (rev 12572) @@ -0,0 +1,590 @@ +/********************************************************************** ***************** + * BindCtx implementation + * + * Copyright 1999 Noomen Hamza + * + * 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 <stdarg.h> +#include <string.h> +#include <assert.h> + +#define COBJMACROS + +#include "winerror.h" +#include "windef.h" +#include "winbase.h" +#include "wine/unicode.h" +#include "objbase.h" +#include "wine/debug.h" + +WINE_DEFAULT_DEBUG_CHANNEL(ole); + +/* represent the first size table and it's increment block size */ +#define BLOCK_TAB_SIZE 10 +#define MAX_TAB_SIZE 0xFFFFFFFF + +/* data structure of the BindCtx table elements */ +typedef struct BindCtxObject{ + + IUnknown* pObj; /* point on a bound object */ + + LPOLESTR pkeyObj; /* key associated to this bound object */ + + BYTE regType; /* registration type: 1 if RegisterObjectParam and 0 if RegisterObjectBound */ + +} BindCtxObject; + +/* BindCtx data strucrture */ +typedef struct BindCtxImpl{ + + IBindCtxVtbl *lpVtbl; /* VTable relative to the IBindCtx interface.*/ + + ULONG ref; /* reference counter for this object */ + + BindCtxObject* bindCtxTable; /* this is a table in which all bounded objects are stored*/ + DWORD bindCtxTableLastIndex; /* first free index in the table */ + DWORD bindCtxTableSize; /* size table */ + + BIND_OPTS2 bindOption2; /* a structure which contains the bind options*/ + +} BindCtxImpl; + +/* IBindCtx prototype functions : */ + +/* IUnknown functions*/ +static HRESULT WINAPI BindCtxImpl_QueryInterface(IBindCtx* iface,REFIID riid,void** ppvObject); +static ULONG WINAPI BindCtxImpl_AddRef(IBindCtx* iface); +static ULONG WINAPI BindCtxImpl_Release(IBindCtx* iface); +/* IBindCtx functions */ +static HRESULT WINAPI BindCtxImpl_RegisterObjectBound(IBindCtx* iface,IUnknown* punk); +static HRESULT WINAPI BindCtxImpl_RevokeObjectBound(IBindCtx* iface, IUnknown* punk); +static HRESULT WINAPI BindCtxImpl_ReleaseBoundObjects(IBindCtx* iface); +static HRESULT WINAPI BindCtxImpl_SetBindOptions(IBindCtx* iface,BIND_OPTS *pbindopts); +static HRESULT WINAPI BindCtxImpl_GetBindOptions(IBindCtx* iface,BIND_OPTS *pbindopts); +static HRESULT WINAPI BindCtxImpl_GetRunningObjectTable(IBindCtx* iface,IRunningObjectTable** pprot); +static HRESULT WINAPI BindCtxImpl_RegisterObjectParam(IBindCtx* iface,LPOLESTR pszkey, IUnknown* punk); +static HRESULT WINAPI BindCtxImpl_GetObjectParam(IBindCtx* iface,LPOLESTR pszkey, IUnknown** punk); +static HRESULT WINAPI BindCtxImpl_EnumObjectParam(IBindCtx* iface,IEnumString** ppenum); +static HRESULT WINAPI BindCtxImpl_RevokeObjectParam(IBindCtx* iface,LPOLESTR pszkey); +/* Local functions*/ +HRESULT WINAPI BindCtxImpl_Construct(BindCtxImpl* This); +HRESULT WINAPI BindCtxImpl_Destroy(BindCtxImpl* This); +HRESULT WINAPI BindCtxImpl_GetObjectIndex(BindCtxImpl* This,IUnknown* punk,LPOLESTR pszkey,DWORD *index); + +/* Virtual function table for the BindCtx class. */ +static IBindCtxVtbl VT_BindCtxImpl = + { + BindCtxImpl_QueryInterface, + BindCtxImpl_AddRef, + BindCtxImpl_Release, + BindCtxImpl_RegisterObjectBound, + BindCtxImpl_RevokeObjectBound, + BindCtxImpl_ReleaseBoundObjects, + BindCtxImpl_SetBindOptions, + BindCtxImpl_GetBindOptions, + BindCtxImpl_GetRunningObjectTable, + BindCtxImpl_RegisterObjectParam, + BindCtxImpl_GetObjectParam, + BindCtxImpl_EnumObjectParam, + BindCtxImpl_RevokeObjectParam +}; + +/********************************************************************** ********* + * BindCtx_QueryInterface + ************************************************************************ *******/ +HRESULT WINAPI BindCtxImpl_QueryInterface(IBindCtx* iface,REFIID riid,void** ppvObject) +{ + BindCtxImpl *This = (BindCtxImpl *)iface; + + TRACE("(%p,%p,%p)\n",This,riid,ppvObject); + + /* Perform a sanity check on the parameters.*/ + if ( (This==0) || (ppvObject==0) ) + return E_INVALIDARG; + + /* Initialize the return parameter.*/ + *ppvObject = 0; + + /* Compare the riid with the interface IDs implemented by this object.*/ + if (IsEqualIID(&IID_IUnknown, riid)) + *ppvObject = (IBindCtx*)This; + else + if (IsEqualIID(&IID_IBindCtx, riid)) + *ppvObject = (IBindCtx*)This; + + /* Check that we obtained an interface.*/ + if ((*ppvObject)==0) + return E_NOINTERFACE; + + /* Query Interface always increases the reference count by one when it is successful */ + BindCtxImpl_AddRef(iface); + + return S_OK; +} + +/********************************************************************** ******** + * BindCtx_AddRef + ************************************************************************ ******/ +ULONG WINAPI BindCtxImpl_AddRef(IBindCtx* iface) +{ + BindCtxImpl *This = (BindCtxImpl *)iface; + + TRACE("(%p)\n",This); + + return InterlockedIncrement(&This->ref); +} + +/********************************************************************** ******** + * BindCtx_Release + ************************************************************************ ******/ +ULONG WINAPI BindCtxImpl_Release(IBindCtx* iface) +{ + BindCtxImpl *This = (BindCtxImpl *)iface; + ULONG ref; + + TRACE("(%p)\n",This); + + ref = InterlockedDecrement(&This->ref); + + if (ref == 0){ + /* release all registered objects */ + BindCtxImpl_ReleaseBoundObjects((IBindCtx*)This); + + BindCtxImpl_Destroy(This); + } + return ref; +} + + +/********************************************************************** ******** + * BindCtx_Construct (local function) + ************************************************************************ *******/ +HRESULT WINAPI BindCtxImpl_Construct(BindCtxImpl* This) +{ + TRACE("(%p)\n",This); + + /* Initialize the virtual function table.*/ + This->lpVtbl = &VT_BindCtxImpl; + This->ref = 0; + + /* Initialize the BIND_OPTS2 structure */ + This->bindOption2.cbStruct = sizeof(BIND_OPTS2); + This->bindOption2.grfFlags = 0; + This->bindOption2.grfMode = STGM_READWRITE; + This->bindOption2.dwTickCountDeadline = 0; + + This->bindOption2.dwTrackFlags = 0; + This->bindOption2.dwClassContext = CLSCTX_SERVER; + This->bindOption2.locale = 1033; + This->bindOption2.pServerInfo = 0; + + /* Initialize the bindctx table */ + This->bindCtxTableSize=BLOCK_TAB_SIZE; + This->bindCtxTableLastIndex=0; + This->bindCtxTable= HeapAlloc(GetProcessHeap(), 0,This->bindCtxTableSize*sizeof(BindCtxObject)); + + if (This->bindCtxTable==NULL) + return E_OUTOFMEMORY; + + return S_OK; +} + +/********************************************************************** ******** + * BindCtx_Destroy (local function) + ************************************************************************ *******/ +HRESULT WINAPI BindCtxImpl_Destroy(BindCtxImpl* This) +{ + TRACE("(%p)\n",This); + + /* free the table space memory */ + HeapFree(GetProcessHeap(),0,This->bindCtxTable); + + /* free the bindctx structure */ + HeapFree(GetProcessHeap(),0,This); + + return S_OK; +} + + +/********************************************************************** ******** + * BindCtx_RegisterObjectBound + ************************************************************************ ******/ +HRESULT WINAPI BindCtxImpl_RegisterObjectBound(IBindCtx* iface,IUnknown* punk) +{ + BindCtxImpl *This = (BindCtxImpl *)iface; + DWORD lastIndex=This->bindCtxTableLastIndex; + + TRACE("(%p,%p)\n",This,punk); + + if (punk==NULL) + return E_POINTER; + + IUnknown_AddRef(punk); + + /* put the object in the first free element in the table */ + This->bindCtxTable[lastIndex].pObj = punk; + This->bindCtxTable[lastIndex].pkeyObj = NULL; + This->bindCtxTable[lastIndex].regType = 0; + lastIndex= ++This->bindCtxTableLastIndex; + + if (lastIndex == This->bindCtxTableSize){ /* the table is full so it must be resized */ + [truncated at 1000 lines; 38414 more skipped]
19 years, 12 months
1
0
0
0
← Newer
1
...
7
8
9
10
11
12
13
...
83
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
Results per page:
10
25
50
100
200