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
October 2007
----- 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
20 participants
708 discussions
Start a n
N
ew thread
[janderwald] 29981: - populate Open With with found entries - see http://windowsxp.mvps.org/OpenWith.htm - silence debug messages - invoke shell extension's InvokeCommand on a event
by janderwald@svn.reactos.org
Author: janderwald Date: Tue Oct 30 21:35:02 2007 New Revision: 29981 URL:
http://svn.reactos.org/svn/reactos?rev=29981&view=rev
Log: - populate Open With with found entries - see
http://windowsxp.mvps.org/OpenWith.htm
- silence debug messages - invoke shell extension's InvokeCommand on a event Modified: trunk/reactos/dll/win32/shell32/she_ocmenu.c trunk/reactos/dll/win32/shell32/shv_item_cmenu.c Modified: trunk/reactos/dll/win32/shell32/she_ocmenu.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/she_ocme…
============================================================================== --- trunk/reactos/dll/win32/shell32/she_ocmenu.c (original) +++ trunk/reactos/dll/win32/shell32/she_ocmenu.c Tue Oct 30 21:35:02 2007 @@ -23,7 +23,7 @@ #define COBJMACROS #define NONAMELESSUNION #define NONAMELESSSTRUCT -#define YDEBUG +//#define YDEBUG #include "winerror.h" #include "wine/debug.h" @@ -46,8 +46,10 @@ const IShellExtInitVtbl *lpvtblShellExtInit; LONG wId; volatile LONG ref; + WCHAR ** szArray; + UINT size; + UINT count; } SHEOWImpl; - static const IShellExtInitVtbl eivt; static const IContextMenu2Vtbl cmvt; @@ -145,7 +147,8 @@ { UINT count = 0; MENUITEMINFOW mii; - WCHAR szBuffer[50]; + WCHAR szBuffer[MAX_PATH]; + UINT index; static const WCHAR szChoose[] = { 'C','h','o','o','s','e',' ','P','r','o','g','r','a','m','.','.','.',0 }; ZeroMemory(&mii, sizeof(mii)); @@ -153,7 +156,25 @@ mii.fMask = MIIM_ID | MIIM_TYPE | MIIM_STATE; mii.fType = MFT_STRING; mii.fState = MFS_ENABLED; - mii.wID = idCmdFirst; + + for (index = 0; index < This->count; index++) + { + mii.wID = idCmdFirst; + mii.dwTypeData = (LPWSTR)This->szArray[index]; + if (InsertMenuItemW(hMenu, -1, TRUE, &mii)) + { + idCmdFirst++; + count++; + } + } + + mii.fMask = MIIM_TYPE | MIIM_ID; + mii.fType = MFT_SEPARATOR; + mii.wID = -1; + InsertMenuItemW(hMenu, -1, TRUE, &mii); + + mii.fMask = MIIM_ID | MIIM_TYPE | MIIM_STATE; + mii.fType = MFT_STRING; if (!LoadStringW(shell32_hInstance, IDS_OPEN_WITH_CHOOSE, szBuffer, sizeof(szBuffer) / sizeof(WCHAR))) { @@ -161,8 +182,9 @@ wcscpy(szBuffer, szChoose); } + mii.wID = idCmdFirst; mii.dwTypeData = (LPWSTR)szBuffer; - if (InsertMenuItemW(hMenu, 0, TRUE, &mii)) + if (InsertMenuItemW(hMenu, -1, TRUE, &mii)) count++; return count; @@ -180,6 +202,7 @@ MENUITEMINFOW mii; USHORT items = 0; WCHAR szBuffer[100]; + BOOL bDefault = FALSE; HMENU hSubMenu = NULL; SHEOWImpl *This = impl_from_IContextMenu(iface); @@ -190,14 +213,26 @@ return E_FAIL; } - - hSubMenu = CreatePopupMenu(); - if (hSubMenu == NULL) - { - ERR("failed to create submenu"); - return E_FAIL; - } - items = AddItems(This, hSubMenu, idCmdFirst); + if (This->count) + { + hSubMenu = CreatePopupMenu(); + if (hSubMenu == NULL) + { + ERR("failed to create submenu"); + return E_FAIL; + } + items = AddItems(This, hSubMenu, idCmdFirst + 1); + } + else + { + /* no file association found */ + UINT pos = GetMenuDefaultItem(hmenu, TRUE, 0); + if (pos != -1) + { + /* replace default item with "Open With" action */ + bDefault = DeleteMenu(hmenu, pos, MF_BYPOSITION); + } + } ZeroMemory(&mii, sizeof(mii)); mii.cbSize = sizeof(mii); @@ -209,7 +244,14 @@ } mii.dwTypeData = (LPWSTR) szBuffer; mii.fState = MFS_ENABLED; - mii.wID = idCmdFirst + items; + if (bDefault) + { + mii.fState |= MFS_DEFAULT; + } + + mii.wID = idCmdFirst; + This->wId = idCmdFirst; + mii.fType = MFT_STRING; if (InsertMenuItemW( hmenu, 0, TRUE, &mii)) items++; @@ -222,10 +264,21 @@ SHEOWCm_fnInvokeCommand( IContextMenu2* iface, LPCMINVOKECOMMANDINFO lpici ) { SHEOWImpl *This = impl_from_IContextMenu(iface); - - TRACE("This %p\n", This); - - return E_FAIL; + TRACE("This %p wId %x count %u verb %x\n", This, This->wId, This->count, LOWORD(lpici->lpVerb)); + + if (This->wId > LOWORD(lpici->lpVerb) || This->count + This->wId < LOWORD(lpici->lpVerb)) + return E_FAIL; + + if (This->wId == LOWORD(lpici->lpVerb)) + { + /* show Open As dialog */ + return S_OK; + } + else + { + /* show program select dialog */ + return S_OK; + } } static HRESULT WINAPI @@ -264,6 +317,329 @@ SHEOWCm_fnHandleMenuMsg }; +BOOL +SHEOW_ResizeArray(SHEOWImpl *This) +{ + WCHAR ** new_array; + UINT ncount; + + if (This->count == 0) + ncount = 10; + else + ncount = This->count * 2; + + new_array = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, ncount * sizeof(WCHAR*)); + + if (!new_array) + return FALSE; + + if (This->szArray) + { + memcpy(new_array, This->szArray, This->count * sizeof(WCHAR*)); + HeapFree(GetProcessHeap(), 0, This->szArray); + } + + This->szArray = new_array; + This->size = ncount; + return TRUE; +} + + +void +SHEOW_AddOWItem(SHEOWImpl *This, WCHAR * szAppName) +{ + UINT index; + WCHAR * szPtr; + + if (This->count + 1 >= This->size || !This->szArray) + { + if (!SHEOW_ResizeArray(This)) + return; + } + + szPtr = wcsrchr(szAppName, '.'); + if (szPtr) + { + szPtr[0] = 0; + } + + for(index = 0; index < This->count; index++) + { + if (!wcsicmp(This->szArray[index], szAppName)) + return; + } + This->szArray[This->count] = wcsdup(szAppName); + + if (This->szArray[This->count]) + This->count++; +} + +UINT +SHEW_AddOpenWithProgId(SHEOWImpl *This, HKEY hKey) +{ + FIXME("implement me :)))\n"); + return 0; +} + + +UINT +SHEW_AddOpenWithItem(SHEOWImpl *This, HKEY hKey) +{ + + UINT NumItems = 0; + DWORD dwIndex = 0; + DWORD dwName, dwValue; + LONG result = ERROR_SUCCESS; + WCHAR szName[10]; + WCHAR szValue[MAX_PATH]; + WCHAR szMRUList[MAX_PATH] = {0}; + + static const WCHAR szMRU[] = {'M','R','U','L','i','s','t', 0 }; + + while(result == ERROR_SUCCESS) + { + dwName = sizeof(szName); + dwValue = sizeof(szValue); + + + result = RegEnumValueW(hKey, + dwIndex, + szName, + &dwName, + NULL, + NULL, + (LPBYTE)szValue, + &dwValue); + szName[9] = 0; + szValue[MAX_PATH-1] = 0; + + if (result == ERROR_SUCCESS) + { + if (wcsicmp(szValue, szMRU)) + { + SHEOW_AddOWItem(This, szValue); + NumItems++; + } + else + { + wcscpy(szMRUList, szValue); + } + } + dwIndex++; + } + + if (szMRUList[0]) + { + FIXME("handle MRUList\n"); + } + return NumItems; +} + + + +UINT +SHEOW_LoadItemFromHKCR(SHEOWImpl *This, WCHAR * szExt) +{ + HKEY hKey; + HKEY hSubKey; + LONG result; + UINT NumKeys = 0; + WCHAR szBuffer[30]; + WCHAR szResult[70]; + DWORD dwSize; + + static const WCHAR szCROW[] = { 'O','p','e','n','W','i','t','h','L','i','s','t', 0 }; + static const WCHAR szCROP[] = { 'O','p','e','n','W','i','t','h','P','r','o','g','I','D','s',0 }; + static const WCHAR szPT[] = { 'P','e','r','c','e','i','v','e','d','T','y','p','e', 0 }; + static const WCHAR szSys[] = { 'S','y','s','t','e','m','F','i','l','e','A','s','s','o','c','i','a','t','i','o','n','s','\\','%','s','\\','O','p','e','n','W','i','t','h','L','i','s','t', 0 }; + + + TRACE("SHEOW_LoadItemFromHKCR entered with This %p szExt %s\n",This, debugstr_w(szExt)); + + result = RegOpenKeyExW(HKEY_CLASSES_ROOT, + szExt, + 0, + KEY_READ | KEY_QUERY_VALUE, + &hKey); + if (result != ERROR_SUCCESS) + return NumKeys; + + result = RegOpenKeyExW(hKey, + szCROW, + 0, + KEY_READ | KEY_QUERY_VALUE, + &hSubKey); + + if (result == ERROR_SUCCESS) + { + NumKeys = SHEW_AddOpenWithItem(This, hSubKey); + RegCloseKey(hSubKey); + } + + result = RegOpenKeyExW(hKey, + szCROP, + 0, + KEY_READ | KEY_QUERY_VALUE, + &hSubKey); + + if (result == ERROR_SUCCESS) + { + NumKeys += SHEW_AddOpenWithProgId(This, hSubKey); + RegCloseKey(hSubKey); + } + + dwSize = sizeof(szBuffer); + + result = RegGetValueW(hKey, + NULL, + szPT, + RRF_RT_REG_SZ, + NULL, + szBuffer, + &dwSize); + szBuffer[29] = 0; + + if (result != ERROR_SUCCESS) + { + RegCloseKey(hKey); + return NumKeys; + } + + sprintfW(szResult, szSys, szExt); + result = RegOpenKeyExW(hKey, + szCROW, + 0, + KEY_READ | KEY_QUERY_VALUE, + &hSubKey); + + if (result == ERROR_SUCCESS) + { + NumKeys += SHEW_AddOpenWithProgId(This, hSubKey); + RegCloseKey(hSubKey); + } + + RegCloseKey(hKey); + return NumKeys; +} + + + + +UINT +SHEOW_LoadItemFromHKCU(SHEOWImpl *This, WCHAR * szExt) +{ + WCHAR szBuffer[MAX_PATH]; + HKEY hKey; + UINT KeyCount = 0; + LONG result; + + static const WCHAR szOWPL[] = { 'S','o','f','t','w','a','r','e','\\','M','i','c','r','o','s','o','f','t','\\','W','i','n','d','o','w','s', + '\\','C','u','r','r','e','n','t','V','e','r','s','i','o','n','\\','E','x','p','l','o','r','e','r','\\','F','i','l','e','E','x','t','s', + '\\','%','s','\\','O','p','e','n','W','i','t','h','P','r','o','g','I','D','s',0 }; + + static const WCHAR szOpenWith[] = { 'S','o','f','t','w','a','r','e','\\','M','i','c','r','o','s','o','f','t','\\','W','i','n','d','o','w','s', + '\\','C','u','r','r','e','n','t','V','e','r','s','i','o','n','\\','E','x','p','l','o','r','e','r','\\','F','i','l','e','E','x','t','s', + '\\','%','s','\\','O','p','e','n','W','i','t','h','L','i','s','t', 0 }; + + TRACE("SHEOW_LoadItemFromHKCU entered with This %p szExt %s\n",This, debugstr_w(szExt)); + + /* process HKCU settings */ + sprintfW(szBuffer, szOWPL, szExt); + TRACE("szBuffer %s\n", debugstr_w(szBuffer)); + result = RegOpenKeyExW(HKEY_CURRENT_USER, + szBuffer, + 0, + KEY_READ | KEY_QUERY_VALUE, + &hKey); + + if (result == ERROR_SUCCESS) + { + KeyCount = SHEW_AddOpenWithProgId(This, hKey); + RegCloseKey(hKey); + } + + sprintfW(szBuffer, szOpenWith, szExt); + TRACE("szBuffer %s\n", debugstr_w(szBuffer)); + result = RegOpenKeyExW(HKEY_CURRENT_USER, + szBuffer, + 0, + KEY_READ | KEY_QUERY_VALUE, + &hKey); + + if (result == ERROR_SUCCESS) + { + KeyCount += SHEW_AddOpenWithItem(This, hKey); + RegCloseKey(hKey); + } + return KeyCount; +} + +HRESULT +SHEOW_LoadOpenWithItems(SHEOWImpl *This, IDataObject *pdtobj) +{ + STGMEDIUM medium; + FORMATETC fmt; + HRESULT hr; + LPIDA pida; + LPCITEMIDLIST pidl_folder; + LPCITEMIDLIST pidl_child; + LPCITEMIDLIST pidl; + WCHAR szPath[MAX_PATH]; + LPWSTR szPtr; + + fmt.cfFormat = RegisterClipboardFormatA(CFSTR_SHELLIDLIST); + fmt.ptd = NULL; + fmt.dwAspect = DVASPECT_CONTENT; + fmt.lindex = -1; + fmt.tymed = TYMED_HGLOBAL; + + hr = IDataObject_GetData(pdtobj, &fmt, &medium); + + if (FAILED(hr)) + { + ERR("IDataObject_GetData failed with 0x%x\n", hr); + return hr; + } + + /*assert(pida->cidl==1);*/ + pida = (LPIDA)GlobalLock(medium.u.hGlobal); + + pidl_folder = (LPCITEMIDLIST) ((LPBYTE)pida+pida->aoffset[0]); + pidl_child = (LPCITEMIDLIST) ((LPBYTE)pida+pida->aoffset[1]); + + pidl = ILCombine(pidl_folder, pidl_child); + + GlobalUnlock(medium.u.hGlobal); + GlobalFree(medium.u.hGlobal); + + if (!pidl) + { + ERR("no mem\n"); + return E_OUTOFMEMORY; + } + if (!SHGetPathFromIDListW(pidl, szPath)) + { + SHFree(pidl); + ERR("SHGetPathFromIDListW failed\n"); + return FALSE; + } + + SHFree(pidl); + TRACE("szPath %s\n", debugstr_w(szPath)); + + szPtr = wcschr(szPath, '.'); + if (szPtr) + { + SHEOW_LoadItemFromHKCU(This, szPtr); + SHEOW_LoadItemFromHKCR(This, szPtr); + } + TRACE("count %u\n", This->count); + return S_OK; +} + + + + static HRESULT WINAPI SHEOW_ExtInit_Initialize( IShellExtInit* iface, LPCITEMIDLIST pidlFolder, IDataObject *pdtobj, HKEY hkeyProgID ) @@ -272,7 +648,7 @@ TRACE("This %p\n", This); - return S_OK; + return SHEOW_LoadOpenWithItems(This, pdtobj); } static ULONG WINAPI SHEOW_ExtInit_AddRef(IShellExtInit *iface) Modified: trunk/reactos/dll/win32/shell32/shv_item_cmenu.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/shv_item…
============================================================================== --- trunk/reactos/dll/win32/shell32/shv_item_cmenu.c (original) +++ trunk/reactos/dll/win32/shell32/shv_item_cmenu.c Tue Oct 30 21:35:02 2007 @@ -23,7 +23,7 @@ #define COBJMACROS #define NONAMELESSUNION #define NONAMELESSSTRUCT -#define YDEBUG +//#define YDEBUG #include "winerror.h" #include "wine/debug.h" @@ -45,6 +45,7 @@ /************************************************************************** * IContextMenu Implementation */ + typedef struct { const IContextMenu2Vtbl *lpVtbl; LONG ref; @@ -615,6 +616,24 @@ SHFree(pidlFQ); } } +HRESULT +DoShellExtensions(ItemCmImpl *This, LPCMINVOKECOMMANDINFO lpcmi) +{ + HRESULT hResult; + UINT i; + + TRACE("DoShellExtensions %p verb %x count %u\n",This, LOWORD(lpcmi->lpVerb), This->ecount); + for(i = 0; i < This->ecount; i++) + { + IContextMenu * cmenu = This->ecmenu[i]; + + hResult = cmenu->lpVtbl->InvokeCommand(cmenu, lpcmi); + if (SUCCEEDED(hResult)) + return hResult; + } + return NOERROR; +} + /************************************************************************** * ISvItemCm_fnInvokeCommand() @@ -669,6 +688,10 @@ DoProperties(iface, lpcmi->hwnd); break; default: + if (LOWORD(lpcmi->lpVerb) >= This->iIdSHEFirst && LOWORD(lpcmi->lpVerb) <= This->iIdSHELast) + { + return DoShellExtensions(iface, lpcmi); + } FIXME("Unhandled Verb %xl\n",LOWORD(lpcmi->lpVerb)); } }
17 years, 1 month
1
0
0
0
[janderwald] 29980: - add required registry entries for "Open With" shell extension - currently commented out
by janderwald@svn.reactos.org
Author: janderwald Date: Tue Oct 30 19:00:50 2007 New Revision: 29980 URL:
http://svn.reactos.org/svn/reactos?rev=29980&view=rev
Log: - add required registry entries for "Open With" shell extension - currently commented out Modified: trunk/reactos/boot/bootdata/hivecls.inf trunk/reactos/boot/bootdata/hivedef.inf Modified: trunk/reactos/boot/bootdata/hivecls.inf URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/bootdata/hivecls.inf?…
============================================================================== --- trunk/reactos/boot/bootdata/hivecls.inf (original) +++ trunk/reactos/boot/bootdata/hivecls.inf Tue Oct 30 19:00:50 2007 @@ -3,6 +3,11 @@ [AddReg] HKLM,"SOFTWARE\Classes",,0x00000010 + + +; Default key +;HKCR,"*","",0x00000000,"" +;HKCR,"*\shellex\ContextMenuHandlers\Open With","",0x00000000,"{09799AFB-AD67-11d1-ABCD-00C04FC30936}" ; Folders HKCR,"Folder","",0x00000000,"Folder" @@ -212,6 +217,14 @@ HKCR,"CLSID\{4657278A-411B-11d2-839A-00C04FD918D0}","",0x00000000,"Shell Drag and Drop helper" HKCR,"CLSID\{4657278A-411B-11d2-839A-00C04FD918D0}\InProcServer32","",0x00020000,"%SystemRoot%\system32\shell32.dll" HKCR,"CLSID\{4657278A-411B-11d2-839A-00C04FD918D0}\InProcServer32","ThreadingModel",0x00000000,"Apartment" + +; Open With shell extension +;HKCR,"CLSID\{09799AFB-AD67-11d1-ABCD-00C04FC30936}","",0x00000000,"Open With Context Menu Handler" +;HKCR,"CLSID\{09799AFB-AD67-11d1-ABCD-00C04FC30936}\InProcServer32","",0x00000000,"shell32.dll" +;HKCR,"CLSID\{09799AFB-AD67-11d1-ABCD-00C04FC30936}\InProcServer32","ThreadingModel",0x00000000,"Apartment" +;HKCR,"CLSID\{09799AFB-AD67-11d1-ABCD-00C04FC30936}\shellex\MayChangeDefaultMenu","",0x00000000,"" +;HKCR,"SystemFileAssociations","",0x00000000,"" + ; Recycle bin is not implemented ;HKCR,"CLSID\{645FF040-5081-101B-9F08-00AA002F954E}","",0x00000000,"Recycle Bin" Modified: trunk/reactos/boot/bootdata/hivedef.inf URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/bootdata/hivedef.inf?…
============================================================================== --- trunk/reactos/boot/bootdata/hivedef.inf (original) +++ trunk/reactos/boot/bootdata/hivedef.inf Tue Oct 30 19:00:50 2007 @@ -47,6 +47,7 @@ HKCU,"SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer",,0x00000012 HKCU,"SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders",,0x00000012 HKCU,"SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders",,0x00000012 +;HKCU,"SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileExts",,0x00000012 HKCU,"SOFTWARE\Microsoft\Windows NT",,0x00000012
17 years, 1 month
1
0
0
0
[dreimer] 29979: Some more fixes
by dreimer@svn.reactos.org
Author: dreimer Date: Tue Oct 30 17:43:38 2007 New Revision: 29979 URL:
http://svn.reactos.org/svn/reactos?rev=29979&view=rev
Log: Some more fixes Modified: trunk/tools/RosBE-Windows/Tools/config/options.c Modified: trunk/tools/RosBE-Windows/Tools/config/options.c URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE-Windows/Tools/config/o…
============================================================================== --- trunk/tools/RosBE-Windows/Tools/config/options.c (original) +++ trunk/tools/RosBE-Windows/Tools/config/options.c Tue Oct 30 17:43:38 2007 @@ -56,15 +56,15 @@ showtime = (SendDlgItemMessage(hwnd, ID_SHOWBUILDTIME, BM_GETCHECK, 0, 0) == BST_CHECKED); writelog = (SendDlgItemMessage(hwnd, ID_SAVELOGS, BM_GETCHECK, 0, 0) == BST_CHECKED); useccache = (SendDlgItemMessage(hwnd, ID_USECCACHE, BM_GETCHECK, 0, 0) == BST_CHECKED); - strip = (SendDlgItemMessage(hwnd, ID_STRIP, BM_GETCHECK, 0, 0) == BST_CHECKED); - otherobj = (SendDlgItemMessage(hwnd, ID_OTHEROBJ, BM_GETCHECK, 0, 0) == BST_CHECKED); - otherout = (SendDlgItemMessage(hwnd, ID_OTHEROUT, BM_GETCHECK, 0, 0) == BST_CHECKED); - foreground = (UINT)SendDlgItemMessage(hwnd, IDC_FONT, CB_GETCURSEL, 0, 0); - background = (UINT)SendDlgItemMessage(hwnd, IDC_BACK, CB_GETCURSEL, 0, 0); - GetDlgItemText(hwnd, ID_LOGDIR, logdir, MAX_PATH); - GetDlgItemText(hwnd, ID_MGWDIR, mingwpath, MAX_PATH); - GetDlgItemText(hwnd, ID_OBJDIR, objdir, MAX_PATH); - GetDlgItemText(hwnd, ID_OUTDIR, outdir, MAX_PATH); + strip = (SendDlgItemMessageW(hwnd, ID_STRIP, BM_GETCHECK, 0, 0) == BST_CHECKED); + otherobj = (SendDlgItemMessageW(hwnd, ID_OTHEROBJ, BM_GETCHECK, 0, 0) == BST_CHECKED); + otherout = (SendDlgItemMessageW(hwnd, ID_OTHEROUT, BM_GETCHECK, 0, 0) == BST_CHECKED); + foreground = (UINT)SendDlgItemMessageW(hwnd, IDC_FONT, CB_GETCURSEL, 0, 0); + background = (UINT)SendDlgItemMessageW(hwnd, IDC_BACK, CB_GETCURSEL, 0, 0); + GetDlgItemTextW(hwnd, ID_LOGDIR, logdir, MAX_PATH); + GetDlgItemTextW(hwnd, ID_MGWDIR, mingwpath, MAX_PATH); + GetDlgItemTextW(hwnd, ID_OBJDIR, objdir, MAX_PATH); + GetDlgItemTextW(hwnd, ID_OUTDIR, outdir, MAX_PATH); if (writelog) { @@ -150,11 +150,11 @@ for(UINT i = 0; i < sizeof(Colors) / sizeof(char *); i++) { - SendDlgItemMessage(Dlg, IDC_BACK, CB_ADDSTRING, 0, (LPARAM) (Colors[i])); - SendDlgItemMessage(Dlg, IDC_FONT, CB_ADDSTRING, 0, (LPARAM) (Colors[i])); - } - SendDlgItemMessage(Dlg, IDC_FONT, CB_SETCURSEL, 0xa, 0); - SendDlgItemMessage(Dlg, IDC_BACK, CB_SETCURSEL, 0, 0); + SendDlgItemMessageW(Dlg, IDC_BACK, CB_ADDSTRING, 0, (LPARAM) (Colors[i])); + SendDlgItemMessageW(Dlg, IDC_FONT, CB_ADDSTRING, 0, (LPARAM) (Colors[i])); + } + SendDlgItemMessageW(Dlg, IDC_FONT, CB_SETCURSEL, 0xa, 0); + SendDlgItemMessageW(Dlg, IDC_BACK, CB_SETCURSEL, 0, 0); GetCurrentDirectory(MAX_PATH, Path); if ((wcslen(Path) + wcslen(MINGWVERSION)) < MAX_PATH) wcscat(Path, MINGWVERSION); @@ -222,7 +222,7 @@ ILCreateFromPathW = (ILCREATEFROMPATHW)GetProcAddress(hDLL, "ILCreateFromPathW"); if (ILCreateFromPathW) { - GetDlgItemText(Dlg, Control, path, MAX_PATH); + GetDlgItemTextW(Dlg, Control, path, MAX_PATH); PathInfo.pidlRoot = ILCreateFromPathW(path); } FreeLibrary(hDLL); @@ -249,7 +249,7 @@ INT Dialog1, Dialog2; Dialog1 = ID_BROWSE; Dialog2 = ID_LOGDIR; - WriteLogSet = SendDlgItemMessage(Dlg, wParam, BM_GETCHECK, 0, 0) == BST_CHECKED; + WriteLogSet = SendDlgItemMessageW(Dlg, wParam, BM_GETCHECK, 0, 0) == BST_CHECKED; if (wParam == ID_OTHEROBJ) { Dialog1 = ID_BROWSEOBJ; @@ -276,9 +276,9 @@ if((HWND)lParam == GetDlgItem(Dlg, ID_EXAMPLE)) { hFontOld = SelectObject((HDC)wParam, hFont); - SetTextColor((HDC)wParam, ColorsRGB[SendDlgItemMessage(Dlg, IDC_FONT, CB_GETCURSEL, 0, 0)]); - SetBkColor((HDC)wParam, ColorsRGB[SendDlgItemMessage(Dlg, IDC_BACK, CB_GETCURSEL, 0, 0)]); - return (LONG)CreateSolidBrush(ColorsRGB[SendDlgItemMessage(Dlg, IDC_BACK, CB_GETCURSEL, 0, 0)]); + SetTextColor((HDC)wParam, ColorsRGB[SendDlgItemMessageW(Dlg, IDC_FONT, CB_GETCURSEL, 0, 0)]); + SetBkColor((HDC)wParam, ColorsRGB[SendDlgItemMessageW(Dlg, IDC_BACK, CB_GETCURSEL, 0, 0)]); + return (LONG)CreateSolidBrush(ColorsRGB[SendDlgItemMessageW(Dlg, IDC_BACK, CB_GETCURSEL, 0, 0)]); } break; }
17 years, 1 month
1
0
0
0
[dreimer] 29978: Cleanup Code. (Thx to Ged Murphy) Update Info.txt
by dreimer@svn.reactos.org
Author: dreimer Date: Tue Oct 30 17:34:27 2007 New Revision: 29978 URL:
http://svn.reactos.org/svn/reactos?rev=29978&view=rev
Log: Cleanup Code. (Thx to Ged Murphy) Update Info.txt Modified: trunk/tools/RosBE-Windows/Tools/config/options.c trunk/tools/RosBE-Windows/Tools/info.txt Modified: trunk/tools/RosBE-Windows/Tools/config/options.c URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE-Windows/Tools/config/o…
============================================================================== --- trunk/tools/RosBE-Windows/Tools/config/options.c (original) +++ trunk/tools/RosBE-Windows/Tools/config/options.c Tue Oct 30 17:34:27 2007 @@ -68,23 +68,18 @@ if (writelog) { - GetCurrentDirectory(MAX_PATH, checklog); - if (SetCurrentDirectory(logdir)) - { - SetCurrentDirectory(checklog); - } - else - { - wcscpy(checklog, logdir); - if (wcslen(checklog) < 1) - { - SetCurrentDirectory(checklog); - } - else if (!CreateDirectory(logdir, NULL)) - { - LoadString(hInstance, MSG_DIREFAILED, msgerror, 256); - MessageBox(NULL, msgerror, NULL, MB_ICONERROR); - return FALSE; + if (logdir[0] != 0) + { + DWORD ret = GetCurrentDirectoryW(MAX_PATH, checklog); + if (ret != 0 && ret < MAX_PATH) + { + if (!SetCurrentDirectoryW(logdir)) + { + SetCurrentDirectoryW(checklog); + if (LoadStringW(hInstance, MSG_DIREFAILED, msgerror, 256)) + MessageBoxW(NULL, msgerror, NULL, MB_ICONERROR); + return FALSE; + } } } } Modified: trunk/tools/RosBE-Windows/Tools/info.txt URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE-Windows/Tools/info.txt…
============================================================================== --- trunk/tools/RosBE-Windows/Tools/info.txt (original) +++ trunk/tools/RosBE-Windows/Tools/info.txt Tue Oct 30 17:34:27 2007 @@ -3,7 +3,6 @@ sed:
http://gnuwin32.sourceforge.net/packages/sed.htm
grep:
http://gnuwin32.sourceforge.net/packages/grep.htm
svn:
http://subversion.tigris.org/servlets/ProjectDocumentList?folderID=91
-svnversion:
http://subversion.tigris.org/servlets/ProjectDocumentList?folderID=91
Additional Libs needed: LibIntl:
http://gnuwin32.sourceforge.net/packages/libintl.htm
17 years, 1 month
1
0
0
0
[janderwald] 29977: - fix a bug in ShellView_DoContextMenu which made shell extensions crash on click - pass the pidl of the parent folder to IShellExtInit function. - shell extension dont run yet due SHGetPathFromIDList[A/W] cant return right information
by janderwald@svn.reactos.org
Author: janderwald Date: Tue Oct 30 15:05:24 2007 New Revision: 29977 URL:
http://svn.reactos.org/svn/reactos?rev=29977&view=rev
Log: - fix a bug in ShellView_DoContextMenu which made shell extensions crash on click - pass the pidl of the parent folder to IShellExtInit function. - shell extension dont run yet due SHGetPathFromIDList[A/W] cant return right information Modified: trunk/reactos/dll/win32/shell32/shlview.c trunk/reactos/dll/win32/shell32/shv_item_cmenu.c Modified: trunk/reactos/dll/win32/shell32/shlview.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/shlview.…
============================================================================== --- trunk/reactos/dll/win32/shell32/shlview.c (original) +++ trunk/reactos/dll/win32/shell32/shlview.c Tue Oct 30 15:05:24 2007 @@ -948,7 +948,6 @@ HMENU hMenu; BOOL fExplore = FALSE; HWND hwndTree = 0; - LPCONTEXTMENU pContextMenu = NULL; CMINVOKECOMMANDINFO cmi; TRACE("(%p)->(0x%08x 0x%08x 0x%08x) stub\n",This, x, y, bDefault); @@ -1011,7 +1010,7 @@ cmi.cbSize = sizeof(cmi); cmi.hwnd = This->hWndParent; /* this window has to answer CWM_GETISHELLBROWSER */ cmi.lpVerb = (LPCSTR)MAKEINTRESOURCEA(uCommand); - IContextMenu_InvokeCommand(pContextMenu, &cmi); + IContextMenu_InvokeCommand(This->pCM, &cmi); } } DestroyMenu(hMenu); Modified: trunk/reactos/dll/win32/shell32/shv_item_cmenu.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/shv_item…
============================================================================== --- trunk/reactos/dll/win32/shell32/shv_item_cmenu.c (original) +++ trunk/reactos/dll/win32/shell32/shv_item_cmenu.c Tue Oct 30 15:05:24 2007 @@ -62,7 +62,7 @@ } ItemCmImpl; UINT -SH_EnumerateDynamicContextHandlerForKey(LPWSTR szFileClass, ItemCmImpl *This, IDataObject * pDataObj); +SH_EnumerateDynamicContextHandlerForKey(LPWSTR szFileClass, ItemCmImpl *This, IDataObject * pDataObj, LPITEMIDLIST pidlFolder); static const IContextMenu2Vtbl cmvt; @@ -310,7 +310,7 @@ UINT idCmdLast = 0xFFF0; static WCHAR szAny[] = { '*',0}; - SH_EnumerateDynamicContextHandlerForKey(szAny, This, pDataObj); + SH_EnumerateDynamicContextHandlerForKey(szAny, This, pDataObj, This->pidl); for (i = 0; i < This->cidl; i++) { @@ -324,7 +324,7 @@ if (hr == S_OK) { memcpy(&buffer[6], pwszCLSID, 38 * sizeof(WCHAR)); - SH_EnumerateDynamicContextHandlerForKey(buffer, This, pDataObj); + SH_EnumerateDynamicContextHandlerForKey(buffer, This, pDataObj, This->pidl); } } @@ -333,7 +333,7 @@ ebuf[0] = L'.'; buffer[0] = L'\0'; if (MultiByteToWideChar(CP_ACP, 0, ebuf, -1, buffer, 111)) - SH_EnumerateDynamicContextHandlerForKey(buffer, This, pDataObj); + SH_EnumerateDynamicContextHandlerForKey(buffer, This, pDataObj, This->pidl); } } @@ -778,12 +778,12 @@ }; HRESULT -SH_LoadDynamicContextMenuHandler(HKEY hKey, const CLSID * szClass, IContextMenu** ppv, IDataObject * pDataObj) +SH_LoadDynamicContextMenuHandler(HKEY hKey, const CLSID * szClass, IContextMenu** ppv, IDataObject * pDataObj, LPITEMIDLIST pidlFolder) { HRESULT hr; IContextMenu * cmobj; IShellExtInit *shext; - + TRACE("SH_LoadDynamicContextMenuHandler entered with %s\n",wine_dbgstr_guid(szClass)); hr = SHCoCreateInstance(NULL, szClass, NULL, &IID_IContextMenu, (void**)&cmobj); @@ -800,8 +800,7 @@ cmobj->lpVtbl->Release(cmobj); return FALSE; } - - hr = shext->lpVtbl->Initialize(shext, NULL, pDataObj, hKey); + hr = shext->lpVtbl->Initialize(shext, pidlFolder, pDataObj, hKey); if (hr != S_OK) { TRACE("Failed to initialize shell extension\n"); @@ -817,7 +816,7 @@ } UINT -SH_EnumerateDynamicContextHandlerForKey(const LPWSTR szFileClass, ItemCmImpl *This, IDataObject * pDataObj) +SH_EnumerateDynamicContextHandlerForKey(const LPWSTR szFileClass, ItemCmImpl *This, IDataObject * pDataObj, LPITEMIDLIST pidlFolder) { HKEY hKey; WCHAR szKey[MAX_PATH] = {0}; @@ -861,7 +860,7 @@ TRACE("hResult %x szKey %s name %s\n",hResult, debugstr_w(szKey), debugstr_w(szName)); if (hResult == S_OK) { - hResult = SH_LoadDynamicContextMenuHandler(hKey, &clsid, &cmobj, pDataObj); + hResult = SH_LoadDynamicContextMenuHandler(hKey, &clsid, &cmobj, pDataObj, pidlFolder); } if (hResult == S_OK) {
17 years, 1 month
1
0
0
0
[hpoussin] 29976: Do not directly include psdk directory when building host tools
by hpoussin@svn.reactos.org
Author: hpoussin Date: Tue Oct 30 13:48:53 2007 New Revision: 29976 URL:
http://svn.reactos.org/svn/reactos?rev=29976&view=rev
Log: Do not directly include psdk directory when building host tools Modified: trunk/reactos/tools/tools.mak trunk/reactos/tools/widl/widl.mak Modified: trunk/reactos/tools/tools.mak URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/tools.mak?rev=29976&…
============================================================================== --- trunk/reactos/tools/tools.mak (original) +++ trunk/reactos/tools/tools.mak Tue Oct 30 13:48:53 2007 @@ -5,8 +5,8 @@ TOOLS_OUT = $(OUTPUT_)$(TOOLS_BASE) TOOLS_OUT_ = $(TOOLS_OUT)$(SEP) -TOOLS_CFLAGS = -Wall -Wpointer-arith -Wno-strict-aliasing $(HOST_CFLAGS) -TOOLS_CPPFLAGS = -Wall -Wpointer-arith $(HOST_CPPFLAGS) +TOOLS_CFLAGS = -Wall -Wpointer-arith -Wno-strict-aliasing -D__REACTOS__ $(HOST_CFLAGS) +TOOLS_CPPFLAGS = -Wall -Wpointer-arith -D__REACTOS__ $(HOST_CPPFLAGS) TOOLS_LFLAGS = $(HOST_LFLAGS) # HACK: Remove those lines once host tools don't use target headers anymore Modified: trunk/reactos/tools/widl/widl.mak URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/widl/widl.mak?rev=29…
============================================================================== --- trunk/reactos/tools/widl/widl.mak (original) +++ trunk/reactos/tools/widl/widl.mak Tue Oct 30 13:48:53 2007 @@ -57,9 +57,9 @@ $(addprefix $(INTERMEDIATE_), $(WIDL_SOURCES:.c=.o)) WIDL_HOST_CFLAGS = \ - -DINT16=SHORT -D__USE_W32API -DYYDEBUG=1 -D__REACTOS__=1 \ + -DINT16=SHORT -DYYDEBUG=1 \ -I$(WIDL_BASE) -I$(WPP_BASE) \ - -Iinclude/reactos/wine -Iinclude/reactos -Iinclude -Iinclude/psdk \ + -Iinclude/reactos/wine -Iinclude/reactos \ -I$(INTERMEDIATE_)include $(TOOLS_CFLAGS) WIDL_HOST_LFLAGS = $(TOOLS_LFLAGS)
17 years, 1 month
1
0
0
0
[hpoussin] 29975: Add missing constants in winnt.h Fix svn properties
by hpoussin@svn.reactos.org
Author: hpoussin Date: Tue Oct 30 13:47:24 2007 New Revision: 29975 URL:
http://svn.reactos.org/svn/reactos?rev=29975&view=rev
Log: Add missing constants in winnt.h Fix svn properties Added: trunk/reactos/include/reactos/wine/guiddef.h (with props) Modified: trunk/reactos/include/reactos/wine/cfgmgr32.h (props changed) trunk/reactos/include/reactos/wine/config.h (props changed) trunk/reactos/include/reactos/wine/dlgs.h (props changed) trunk/reactos/include/reactos/wine/exception.h (props changed) trunk/reactos/include/reactos/wine/itss.idl (contents, props changed) trunk/reactos/include/reactos/wine/library.h (contents, props changed) trunk/reactos/include/reactos/wine/lmbrowsr.h (props changed) trunk/reactos/include/reactos/wine/mmddk.h (props changed) trunk/reactos/include/reactos/wine/mmreg.h (props changed) trunk/reactos/include/reactos/wine/mmsystem.h (props changed) trunk/reactos/include/reactos/wine/msacm.h (props changed) trunk/reactos/include/reactos/wine/msacmdlg.h (props changed) trunk/reactos/include/reactos/wine/msacmdrv.h (props changed) trunk/reactos/include/reactos/wine/msvcrt/fcntl.h (props changed) trunk/reactos/include/reactos/wine/port.h (props changed) trunk/reactos/include/reactos/wine/prsht.h (props changed) trunk/reactos/include/reactos/wine/rpcfc.h (props changed) trunk/reactos/include/reactos/wine/rpcss_shared.h (props changed) trunk/reactos/include/reactos/wine/unicode.h (props changed) trunk/reactos/include/reactos/wine/winbase16.h (props changed) trunk/reactos/include/reactos/wine/windef.h (contents, props changed) trunk/reactos/include/reactos/wine/windef16.h (props changed) trunk/reactos/include/reactos/wine/wine_common_ver.rc (props changed) trunk/reactos/include/reactos/wine/wingdi16.h (props changed) trunk/reactos/include/reactos/wine/winnetwk.h (contents, props changed) trunk/reactos/include/reactos/wine/winnt.h (contents, props changed) trunk/reactos/include/reactos/wine/winsock16.h (contents, props changed) trunk/reactos/include/reactos/wine/winuser.h (props changed) trunk/reactos/include/reactos/wine/winuser16.h (props changed) trunk/reactos/include/reactos/wine/wownt32.h (props changed) trunk/reactos/include/reactos/wine/wpp.h (props changed) Propchange: trunk/reactos/include/reactos/wine/cfgmgr32.h ------------------------------------------------------------------------------ --- svn:keywords (original) +++ svn:keywords (removed) @@ -1,1 +1,0 @@ -Author Date Id Revision Propchange: trunk/reactos/include/reactos/wine/config.h ------------------------------------------------------------------------------ --- svn:keywords (original) +++ svn:keywords (removed) @@ -1,1 +1,0 @@ -author date id revision Propchange: trunk/reactos/include/reactos/wine/dlgs.h ------------------------------------------------------------------------------ --- svn:keywords (original) +++ svn:keywords (removed) @@ -1,1 +1,0 @@ -author date id revision Propchange: trunk/reactos/include/reactos/wine/exception.h ------------------------------------------------------------------------------ --- svn:keywords (original) +++ svn:keywords (removed) @@ -1,1 +1,0 @@ -author date id revision Added: trunk/reactos/include/reactos/wine/guiddef.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/wine/guidd…
============================================================================== --- trunk/reactos/include/reactos/wine/guiddef.h (added) +++ trunk/reactos/include/reactos/wine/guiddef.h Tue Oct 30 13:47:24 2007 @@ -1,0 +1,1 @@ +#include "../../psdk/guiddef.h" Propchange: trunk/reactos/include/reactos/wine/guiddef.h ------------------------------------------------------------------------------ svn:eol-style = native Modified: trunk/reactos/include/reactos/wine/itss.idl URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/wine/itss.…
============================================================================== --- trunk/reactos/include/reactos/wine/itss.idl (original) +++ trunk/reactos/include/reactos/wine/itss.idl Tue Oct 30 13:47:24 2007 @@ -1,95 +1,95 @@ -/* - * Copyright (C) 2004 Mike McCormack - * - * 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - */ - -import "oaidl.idl"; - -typedef struct _ITS_Control_Data -{ - UINT cdwControlData; - UINT adwControlData[1]; - -} ITS_Control_Data, *PITS_Control_Data; - -typedef enum ECompactionLev { - COMPACT_DATA = 0, - COMPACT_DATA_AND_PATH -} ECompactionLev; - -[ - object, - uuid(88cc31de-27ab-11d0-9df9-00a0c922e6ec), - pointer_default(unique) -] -interface IITStorage : IUnknown -{ - HRESULT StgCreateDocfile( - [in] const WCHAR * pwcsName, - [in] DWORD grfMode, - [in] DWORD reserved, - [out] IStorage ** ppstgOpen); - - HRESULT StgCreateDocfileOnILockBytes( - [in] ILockBytes * plkbyt, - [in] DWORD grfMode, - [in] DWORD reserved, - [out] IStorage ** ppstgOpen); - - - HRESULT StgIsStorageFile( - [in] const WCHAR * pwcsName); - - HRESULT StgIsStorageILockBytes( - [in] ILockBytes * plkbyt); - - HRESULT StgOpenStorage( - [in] const WCHAR * pwcsName, - [in] IStorage * pstgPriority, - [in] DWORD grfMode, - [in] SNB snbExclude, - [in] DWORD reserved, - [out] IStorage ** ppstgOpen); - - HRESULT StgOpenStorageOnILockBytes( - [in] ILockBytes * plkbyt, - [in] IStorage * pStgPriority, - [in] DWORD grfMode, - [in] SNB snbExclude, - [in] DWORD reserved, - [out] IStorage ** ppstgOpen); - - HRESULT StgSetTimes( - [in] WCHAR const * lpszName, - [in] FILETIME const * pctime, - [in] FILETIME const * patime, - [in] FILETIME const * pmtime); - - HRESULT SetControlData( - [in] PITS_Control_Data pControlData); - - HRESULT DefaultControlData( - [out] PITS_Control_Data * ppControlData); - - HRESULT Compact( - [in] const WCHAR * pwcsName, - [in] ECompactionLev iLev); -} - -cpp_quote("DEFINE_GUID(CLSID_ITStorage,0x5d02926a,0x212e,0x11d0,0x9d,0xf9,0x00,0xa0,0xc9,0x22,0xe6,0xec);") -cpp_quote("DEFINE_GUID(CLSID_MSFSStore,0xd54eee56,0xaaab,0x11d0,0x9e,0x1d,0x00,0xa0,0xc9,0x22,0xe6,0xec);") -cpp_quote("DEFINE_GUID(CLSID_MSITStore,0x9d148290,0xb9c8,0x11d0,0xa4,0xcc,0x00,0x00,0xf8,0x01,0x49,0xf6);") -cpp_quote("DEFINE_GUID(CLSID_ITSProtocol,0x9d148291,0xb9c8,0x11d0,0xa4,0xcc,0x00,0x00,0xf8,0x01,0x49,0xf6);") +/* + * Copyright (C) 2004 Mike McCormack + * + * 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +import "oaidl.idl"; + +typedef struct _ITS_Control_Data +{ + UINT cdwControlData; + UINT adwControlData[1]; + +} ITS_Control_Data, *PITS_Control_Data; + +typedef enum ECompactionLev { + COMPACT_DATA = 0, + COMPACT_DATA_AND_PATH +} ECompactionLev; + +[ + object, + uuid(88cc31de-27ab-11d0-9df9-00a0c922e6ec), + pointer_default(unique) +] +interface IITStorage : IUnknown +{ + HRESULT StgCreateDocfile( + [in] const WCHAR * pwcsName, + [in] DWORD grfMode, + [in] DWORD reserved, + [out] IStorage ** ppstgOpen); + + HRESULT StgCreateDocfileOnILockBytes( + [in] ILockBytes * plkbyt, + [in] DWORD grfMode, + [in] DWORD reserved, + [out] IStorage ** ppstgOpen); + + + HRESULT StgIsStorageFile( + [in] const WCHAR * pwcsName); + + HRESULT StgIsStorageILockBytes( + [in] ILockBytes * plkbyt); + + HRESULT StgOpenStorage( + [in] const WCHAR * pwcsName, + [in] IStorage * pstgPriority, + [in] DWORD grfMode, + [in] SNB snbExclude, + [in] DWORD reserved, + [out] IStorage ** ppstgOpen); + + HRESULT StgOpenStorageOnILockBytes( + [in] ILockBytes * plkbyt, + [in] IStorage * pStgPriority, + [in] DWORD grfMode, + [in] SNB snbExclude, + [in] DWORD reserved, + [out] IStorage ** ppstgOpen); + + HRESULT StgSetTimes( + [in] WCHAR const * lpszName, + [in] FILETIME const * pctime, + [in] FILETIME const * patime, + [in] FILETIME const * pmtime); + + HRESULT SetControlData( + [in] PITS_Control_Data pControlData); + + HRESULT DefaultControlData( + [out] PITS_Control_Data * ppControlData); + + HRESULT Compact( + [in] const WCHAR * pwcsName, + [in] ECompactionLev iLev); +} + +cpp_quote("DEFINE_GUID(CLSID_ITStorage,0x5d02926a,0x212e,0x11d0,0x9d,0xf9,0x00,0xa0,0xc9,0x22,0xe6,0xec);") +cpp_quote("DEFINE_GUID(CLSID_MSFSStore,0xd54eee56,0xaaab,0x11d0,0x9e,0x1d,0x00,0xa0,0xc9,0x22,0xe6,0xec);") +cpp_quote("DEFINE_GUID(CLSID_MSITStore,0x9d148290,0xb9c8,0x11d0,0xa4,0xcc,0x00,0x00,0xf8,0x01,0x49,0xf6);") +cpp_quote("DEFINE_GUID(CLSID_ITSProtocol,0x9d148291,0xb9c8,0x11d0,0xa4,0xcc,0x00,0x00,0xf8,0x01,0x49,0xf6);") Propchange: trunk/reactos/include/reactos/wine/itss.idl ------------------------------------------------------------------------------ svn:eol-style = native Modified: trunk/reactos/include/reactos/wine/library.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/wine/libra…
============================================================================== --- trunk/reactos/include/reactos/wine/library.h (original) +++ trunk/reactos/include/reactos/wine/library.h Tue Oct 30 13:47:24 2007 @@ -1,210 +1,210 @@ -/* - * Definitions for the Wine library - * - * Copyright 2000 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_WINE_LIBRARY_H -#define __WINE_WINE_LIBRARY_H - -#include <stdarg.h> -#include <sys/types.h> - -#include <windef.h> -#include <winbase.h> - -/* configuration */ - -extern const char *wine_get_config_dir(void); -extern const char *wine_get_server_dir(void); -extern const char *wine_get_user_name(void); -extern void wine_init_argv0_path( const char *argv0 ); -extern void wine_exec_wine_binary( const char *name, char **argv, char **envp, int use_preloader ); - -/* dll loading */ - -typedef void (*load_dll_callback_t)( void *, const char * ); - -extern void *wine_dlopen( const char *filename, int flag, char *error, int errorsize ); -extern void *wine_dlsym( void *handle, const char *symbol, char *error, int errorsize ); -extern int wine_dlclose( void *handle, char *error, int errorsize ); -extern void wine_dll_set_callback( load_dll_callback_t load ); -extern void *wine_dll_load( const char *filename, char *error, int errorsize, int *file_exists ); -extern void *wine_dll_load_main_exe( const char *name, char *error, int errorsize, - int test_only, int *file_exists ); -extern void wine_dll_unload( void *handle ); -extern int wine_dll_get_owner( const char *name, char *buffer, int size, int *file_exists ); - -extern int __wine_main_argc; -extern char **__wine_main_argv; -extern WCHAR **__wine_main_wargv; -extern char **__wine_main_environ; -extern void wine_init( int argc, char *argv[], char *error, int error_size ); - -/* debugging */ - -extern const char * (*__wine_dbgstr_an)( const char * s, int n ); -extern const char * (*__wine_dbgstr_wn)( const WCHAR *s, int n ); -extern const char * (*__wine_dbg_vsprintf)( const char *format, va_list args ); -extern int (*__wine_dbg_vprintf)( const char *format, va_list args ); -extern int (*__wine_dbg_vlog)( unsigned int cls, const char *channel, - const char *function, const char *format, va_list args ); - -extern void wine_dbg_add_option( const char *name, unsigned char set, unsigned char clear ); -extern int wine_dbg_parse_options( const char *str ); - -/* portability */ - -extern void DECLSPEC_NORETURN wine_switch_to_stack( void (*func)(void *), void *arg, void *stack ); -extern void wine_set_pe_load_area( void *base, size_t size ); -extern void wine_free_pe_load_area(void); - -/* memory mappings */ - -extern void *wine_anon_mmap( void *start, size_t size, int prot, int flags ); -extern void wine_mmap_add_reserved_area( void *addr, size_t size ); -extern void wine_mmap_remove_reserved_area( void *addr, size_t size, int unmap ); -extern int wine_mmap_is_in_reserved_area( void *addr, size_t size ); - -/* LDT management */ - -extern void wine_ldt_init_locking( void (*lock_func)(void), void (*unlock_func)(void) ); -extern void wine_ldt_get_entry( unsigned short sel, LDT_ENTRY *entry ); -extern int wine_ldt_set_entry( unsigned short sel, const LDT_ENTRY *entry ); -extern int wine_ldt_is_system( unsigned short sel ); -extern void *wine_ldt_get_ptr( unsigned short sel, unsigned int offset ); -extern unsigned short wine_ldt_alloc_entries( int count ); -extern unsigned short wine_ldt_realloc_entries( unsigned short sel, int oldcount, int newcount ); -extern void wine_ldt_free_entries( unsigned short sel, int count ); -#ifdef __i386__ -extern unsigned short wine_ldt_alloc_fs(void); -extern void wine_ldt_init_fs( unsigned short sel, const LDT_ENTRY *entry ); -extern void wine_ldt_free_fs( unsigned short sel ); -#else /* __i386__ */ -static inline unsigned short wine_ldt_alloc_fs(void) { return 0x0b; /* pseudo GDT selector */ } -static inline void wine_ldt_init_fs( unsigned short sel, const LDT_ENTRY *entry ) { } -static inline void wine_ldt_free_fs( unsigned short sel ) { } -#endif /* __i386__ */ - - -/* the local copy of the LDT */ -#ifdef __CYGWIN__ -# ifdef WINE_EXPORT_LDT_COPY -# define WINE_LDT_EXTERN __declspec(dllexport) -# else -# define WINE_LDT_EXTERN __declspec(dllimport) -# endif -#else -# define WINE_LDT_EXTERN extern -#endif - -WINE_LDT_EXTERN struct __wine_ldt_copy -{ - void *base[8192]; /* base address or 0 if entry is free */ - unsigned long limit[8192]; /* limit in bytes or 0 if entry is free */ - unsigned char flags[8192]; /* flags (defined below) */ -} wine_ldt_copy; - -#define WINE_LDT_FLAGS_DATA 0x13 /* Data segment */ -#define WINE_LDT_FLAGS_STACK 0x17 /* Stack segment */ -#define WINE_LDT_FLAGS_CODE 0x1b /* Code segment */ -#define WINE_LDT_FLAGS_TYPE_MASK 0x1f /* Mask for segment type */ -#define WINE_LDT_FLAGS_32BIT 0x40 /* Segment is 32-bit (code or stack) */ -#define WINE_LDT_FLAGS_ALLOCATED 0x80 /* Segment is allocated (no longer free) */ - -/* helper functions to manipulate the LDT_ENTRY structure */ -inline static void wine_ldt_set_base( LDT_ENTRY *ent, const void *base ) -{ - ent->BaseLow = (WORD)(unsigned long)base; - ent->HighWord.Bits.BaseMid = (BYTE)((unsigned long)base >> 16); - ent->HighWord.Bits.BaseHi = (BYTE)((unsigned long)base >> 24); -} -inline static void wine_ldt_set_limit( LDT_ENTRY *ent, unsigned int limit ) -{ - if ((ent->HighWord.Bits.Granularity = (limit >= 0x100000))) limit >>= 12; - ent->LimitLow = (WORD)limit; - ent->HighWord.Bits.LimitHi = (limit >> 16); -} -inline static void *wine_ldt_get_base( const LDT_ENTRY *ent ) -{ - return (void *)(ent->BaseLow | - (unsigned long)ent->HighWord.Bits.BaseMid << 16 | - (unsigned long)ent->HighWord.Bits.BaseHi << 24); -} -inline static unsigned int wine_ldt_get_limit( const LDT_ENTRY *ent ) -{ - unsigned int limit = ent->LimitLow | (ent->HighWord.Bits.LimitHi << 16); - if (ent->HighWord.Bits.Granularity) limit = (limit << 12) | 0xfff; - return limit; -} -inline static void wine_ldt_set_flags( LDT_ENTRY *ent, unsigned char flags ) -{ - ent->HighWord.Bits.Dpl = 3; - ent->HighWord.Bits.Pres = 1; - ent->HighWord.Bits.Type = flags; - ent->HighWord.Bits.Sys = 0; - ent->HighWord.Bits.Reserved_0 = 0; - ent->HighWord.Bits.Default_Big = (flags & WINE_LDT_FLAGS_32BIT) != 0; -} -inline static unsigned char wine_ldt_get_flags( const LDT_ENTRY *ent ) -{ - unsigned char ret = ent->HighWord.Bits.Type; - if (ent->HighWord.Bits.Default_Big) ret |= WINE_LDT_FLAGS_32BIT; - return ret; -} -inline static int wine_ldt_is_empty( const LDT_ENTRY *ent ) -{ - const DWORD *dw = (const DWORD *)ent; - return (dw[0] | dw[1]) == 0; -} - -/* segment register access */ - -#ifdef __i386__ -# ifdef __GNUC__ -# define __DEFINE_GET_SEG(seg) \ - extern inline unsigned short wine_get_##seg(void) \ - { unsigned short res; __asm__("movw %%" #seg ",%w0" : "=r"(res)); return res; } -# define __DEFINE_SET_SEG(seg) \ - extern inline void wine_set_##seg(int val) { __asm__("movw %w0,%%" #seg : : "r" (val)); } -# elif defined(_MSC_VER) -# define __DEFINE_GET_SEG(seg) \ - extern inline unsigned short wine_get_##seg(void) \ - { unsigned short res; __asm { mov res, seg } return res; } -# define __DEFINE_SET_SEG(seg) \ - extern inline void wine_set_##seg(unsigned short val) { __asm { mov seg, val } } -# else /* __GNUC__ || _MSC_VER */ -# define __DEFINE_GET_SEG(seg) extern unsigned short wine_get_##seg(void); -# define __DEFINE_SET_SEG(seg) extern void wine_set_##seg(unsigned int); -# endif /* __GNUC__ || _MSC_VER */ -#else /* __i386__ */ -# define __DEFINE_GET_SEG(seg) inline static unsigned short wine_get_##seg(void) { return 0; } -# define __DEFINE_SET_SEG(seg) inline static void wine_set_##seg(int val) { /* nothing */ } -#endif /* __i386__ */ - -__DEFINE_GET_SEG(cs) -__DEFINE_GET_SEG(ds) -__DEFINE_GET_SEG(es) -__DEFINE_GET_SEG(fs) -__DEFINE_GET_SEG(gs) -__DEFINE_GET_SEG(ss) -__DEFINE_SET_SEG(fs) -__DEFINE_SET_SEG(gs) -#undef __DEFINE_GET_SEG -#undef __DEFINE_SET_SEG - -#endif /* __WINE_WINE_LIBRARY_H */ +/* + * Definitions for the Wine library + * + * Copyright 2000 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_WINE_LIBRARY_H +#define __WINE_WINE_LIBRARY_H + +#include <stdarg.h> +#include <sys/types.h> + +#include <windef.h> +#include <winbase.h> + +/* configuration */ + +extern const char *wine_get_config_dir(void); +extern const char *wine_get_server_dir(void); +extern const char *wine_get_user_name(void); +extern void wine_init_argv0_path( const char *argv0 ); +extern void wine_exec_wine_binary( const char *name, char **argv, char **envp, int use_preloader ); + +/* dll loading */ + +typedef void (*load_dll_callback_t)( void *, const char * ); + +extern void *wine_dlopen( const char *filename, int flag, char *error, int errorsize ); +extern void *wine_dlsym( void *handle, const char *symbol, char *error, int errorsize ); +extern int wine_dlclose( void *handle, char *error, int errorsize ); +extern void wine_dll_set_callback( load_dll_callback_t load ); +extern void *wine_dll_load( const char *filename, char *error, int errorsize, int *file_exists ); +extern void *wine_dll_load_main_exe( const char *name, char *error, int errorsize, + int test_only, int *file_exists ); +extern void wine_dll_unload( void *handle ); +extern int wine_dll_get_owner( const char *name, char *buffer, int size, int *file_exists ); + +extern int __wine_main_argc; +extern char **__wine_main_argv; +extern WCHAR **__wine_main_wargv; +extern char **__wine_main_environ; +extern void wine_init( int argc, char *argv[], char *error, int error_size ); + +/* debugging */ + +extern const char * (*__wine_dbgstr_an)( const char * s, int n ); +extern const char * (*__wine_dbgstr_wn)( const WCHAR *s, int n ); +extern const char * (*__wine_dbg_vsprintf)( const char *format, va_list args ); +extern int (*__wine_dbg_vprintf)( const char *format, va_list args ); +extern int (*__wine_dbg_vlog)( unsigned int cls, const char *channel, + const char *function, const char *format, va_list args ); + +extern void wine_dbg_add_option( const char *name, unsigned char set, unsigned char clear ); +extern int wine_dbg_parse_options( const char *str ); + +/* portability */ + +extern void DECLSPEC_NORETURN wine_switch_to_stack( void (*func)(void *), void *arg, void *stack ); +extern void wine_set_pe_load_area( void *base, size_t size ); +extern void wine_free_pe_load_area(void); + +/* memory mappings */ + +extern void *wine_anon_mmap( void *start, size_t size, int prot, int flags ); +extern void wine_mmap_add_reserved_area( void *addr, size_t size ); +extern void wine_mmap_remove_reserved_area( void *addr, size_t size, int unmap ); +extern int wine_mmap_is_in_reserved_area( void *addr, size_t size ); + +/* LDT management */ + +extern void wine_ldt_init_locking( void (*lock_func)(void), void (*unlock_func)(void) ); +extern void wine_ldt_get_entry( unsigned short sel, LDT_ENTRY *entry ); +extern int wine_ldt_set_entry( unsigned short sel, const LDT_ENTRY *entry ); +extern int wine_ldt_is_system( unsigned short sel ); +extern void *wine_ldt_get_ptr( unsigned short sel, unsigned int offset ); +extern unsigned short wine_ldt_alloc_entries( int count ); +extern unsigned short wine_ldt_realloc_entries( unsigned short sel, int oldcount, int newcount ); +extern void wine_ldt_free_entries( unsigned short sel, int count ); +#ifdef __i386__ +extern unsigned short wine_ldt_alloc_fs(void); +extern void wine_ldt_init_fs( unsigned short sel, const LDT_ENTRY *entry ); +extern void wine_ldt_free_fs( unsigned short sel ); +#else /* __i386__ */ +static inline unsigned short wine_ldt_alloc_fs(void) { return 0x0b; /* pseudo GDT selector */ } +static inline void wine_ldt_init_fs( unsigned short sel, const LDT_ENTRY *entry ) { } +static inline void wine_ldt_free_fs( unsigned short sel ) { } +#endif /* __i386__ */ + + +/* the local copy of the LDT */ +#ifdef __CYGWIN__ +# ifdef WINE_EXPORT_LDT_COPY +# define WINE_LDT_EXTERN __declspec(dllexport) +# else +# define WINE_LDT_EXTERN __declspec(dllimport) +# endif +#else +# define WINE_LDT_EXTERN extern +#endif + +WINE_LDT_EXTERN struct __wine_ldt_copy +{ + void *base[8192]; /* base address or 0 if entry is free */ + unsigned long limit[8192]; /* limit in bytes or 0 if entry is free */ + unsigned char flags[8192]; /* flags (defined below) */ +} wine_ldt_copy; + +#define WINE_LDT_FLAGS_DATA 0x13 /* Data segment */ +#define WINE_LDT_FLAGS_STACK 0x17 /* Stack segment */ +#define WINE_LDT_FLAGS_CODE 0x1b /* Code segment */ +#define WINE_LDT_FLAGS_TYPE_MASK 0x1f /* Mask for segment type */ +#define WINE_LDT_FLAGS_32BIT 0x40 /* Segment is 32-bit (code or stack) */ +#define WINE_LDT_FLAGS_ALLOCATED 0x80 /* Segment is allocated (no longer free) */ + +/* helper functions to manipulate the LDT_ENTRY structure */ +inline static void wine_ldt_set_base( LDT_ENTRY *ent, const void *base ) +{ + ent->BaseLow = (WORD)(unsigned long)base; + ent->HighWord.Bits.BaseMid = (BYTE)((unsigned long)base >> 16); + ent->HighWord.Bits.BaseHi = (BYTE)((unsigned long)base >> 24); +} +inline static void wine_ldt_set_limit( LDT_ENTRY *ent, unsigned int limit ) +{ + if ((ent->HighWord.Bits.Granularity = (limit >= 0x100000))) limit >>= 12; + ent->LimitLow = (WORD)limit; + ent->HighWord.Bits.LimitHi = (limit >> 16); +} +inline static void *wine_ldt_get_base( const LDT_ENTRY *ent ) +{ + return (void *)(ent->BaseLow | + (unsigned long)ent->HighWord.Bits.BaseMid << 16 | + (unsigned long)ent->HighWord.Bits.BaseHi << 24); +} +inline static unsigned int wine_ldt_get_limit( const LDT_ENTRY *ent ) +{ + unsigned int limit = ent->LimitLow | (ent->HighWord.Bits.LimitHi << 16); + if (ent->HighWord.Bits.Granularity) limit = (limit << 12) | 0xfff; + return limit; +} +inline static void wine_ldt_set_flags( LDT_ENTRY *ent, unsigned char flags ) +{ + ent->HighWord.Bits.Dpl = 3; + ent->HighWord.Bits.Pres = 1; + ent->HighWord.Bits.Type = flags; + ent->HighWord.Bits.Sys = 0; + ent->HighWord.Bits.Reserved_0 = 0; + ent->HighWord.Bits.Default_Big = (flags & WINE_LDT_FLAGS_32BIT) != 0; +} +inline static unsigned char wine_ldt_get_flags( const LDT_ENTRY *ent ) +{ + unsigned char ret = ent->HighWord.Bits.Type; + if (ent->HighWord.Bits.Default_Big) ret |= WINE_LDT_FLAGS_32BIT; + return ret; +} +inline static int wine_ldt_is_empty( const LDT_ENTRY *ent ) +{ + const DWORD *dw = (const DWORD *)ent; + return (dw[0] | dw[1]) == 0; +} + +/* segment register access */ + +#ifdef __i386__ +# ifdef __GNUC__ +# define __DEFINE_GET_SEG(seg) \ + extern inline unsigned short wine_get_##seg(void) \ + { unsigned short res; __asm__("movw %%" #seg ",%w0" : "=r"(res)); return res; } +# define __DEFINE_SET_SEG(seg) \ + extern inline void wine_set_##seg(int val) { __asm__("movw %w0,%%" #seg : : "r" (val)); } +# elif defined(_MSC_VER) +# define __DEFINE_GET_SEG(seg) \ + extern inline unsigned short wine_get_##seg(void) \ + { unsigned short res; __asm { mov res, seg } return res; } +# define __DEFINE_SET_SEG(seg) \ + extern inline void wine_set_##seg(unsigned short val) { __asm { mov seg, val } } +# else /* __GNUC__ || _MSC_VER */ +# define __DEFINE_GET_SEG(seg) extern unsigned short wine_get_##seg(void); +# define __DEFINE_SET_SEG(seg) extern void wine_set_##seg(unsigned int); +# endif /* __GNUC__ || _MSC_VER */ +#else /* __i386__ */ +# define __DEFINE_GET_SEG(seg) inline static unsigned short wine_get_##seg(void) { return 0; } +# define __DEFINE_SET_SEG(seg) inline static void wine_set_##seg(int val) { /* nothing */ } +#endif /* __i386__ */ + +__DEFINE_GET_SEG(cs) +__DEFINE_GET_SEG(ds) +__DEFINE_GET_SEG(es) +__DEFINE_GET_SEG(fs) +__DEFINE_GET_SEG(gs) +__DEFINE_GET_SEG(ss) +__DEFINE_SET_SEG(fs) +__DEFINE_SET_SEG(gs) +#undef __DEFINE_GET_SEG +#undef __DEFINE_SET_SEG + +#endif /* __WINE_WINE_LIBRARY_H */ Propchange: trunk/reactos/include/reactos/wine/library.h ------------------------------------------------------------------------------ svn:eol-style = native Propchange: trunk/reactos/include/reactos/wine/lmbrowsr.h ------------------------------------------------------------------------------ --- svn:keywords (original) +++ svn:keywords (removed) @@ -1,1 +1,0 @@ -Author Date Id Revision Propchange: trunk/reactos/include/reactos/wine/mmddk.h ------------------------------------------------------------------------------ --- svn:keywords (original) +++ svn:keywords (removed) @@ -1,1 +1,0 @@ -author date id revision Propchange: trunk/reactos/include/reactos/wine/mmreg.h ------------------------------------------------------------------------------ --- svn:keywords (original) +++ svn:keywords (removed) @@ -1,1 +1,0 @@ -author date id revision Propchange: trunk/reactos/include/reactos/wine/mmsystem.h ------------------------------------------------------------------------------ --- svn:keywords (original) +++ svn:keywords (removed) @@ -1,1 +1,0 @@ -author date id revision Propchange: trunk/reactos/include/reactos/wine/msacm.h ------------------------------------------------------------------------------ --- svn:keywords (original) +++ svn:keywords (removed) @@ -1,1 +1,0 @@ -author date id revision Propchange: trunk/reactos/include/reactos/wine/msacmdlg.h ------------------------------------------------------------------------------ --- svn:keywords (original) +++ svn:keywords (removed) @@ -1,1 +1,0 @@ -author date id revision Propchange: trunk/reactos/include/reactos/wine/msacmdrv.h ------------------------------------------------------------------------------ --- svn:keywords (original) +++ svn:keywords (removed) @@ -1,1 +1,0 @@ -author date id revision Propchange: trunk/reactos/include/reactos/wine/msvcrt/fcntl.h ------------------------------------------------------------------------------ --- svn:keywords (original) +++ svn:keywords (removed) @@ -1,1 +1,0 @@ -Author Date Id Revision Propchange: trunk/reactos/include/reactos/wine/port.h ------------------------------------------------------------------------------ --- svn:keywords (original) +++ svn:keywords (removed) @@ -1,1 +1,0 @@ -author date id revision Propchange: trunk/reactos/include/reactos/wine/prsht.h ------------------------------------------------------------------------------ --- svn:keywords (original) +++ svn:keywords (removed) @@ -1,1 +1,0 @@ -author date id revision Propchange: trunk/reactos/include/reactos/wine/rpcfc.h ------------------------------------------------------------------------------ --- svn:keywords (original) +++ svn:keywords (removed) @@ -1,1 +1,0 @@ -author date id revision Propchange: trunk/reactos/include/reactos/wine/rpcss_shared.h ------------------------------------------------------------------------------ --- svn:keywords (original) +++ svn:keywords (removed) @@ -1,1 +1,0 @@ -author date id revision Propchange: trunk/reactos/include/reactos/wine/unicode.h ------------------------------------------------------------------------------ --- svn:keywords (original) +++ svn:keywords (removed) @@ -1,1 +1,0 @@ -author date id revision Propchange: trunk/reactos/include/reactos/wine/winbase16.h ------------------------------------------------------------------------------ --- svn:keywords (original) +++ svn:keywords (removed) @@ -1,1 +1,0 @@ -author date id revision Modified: trunk/reactos/include/reactos/wine/windef.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/wine/winde…
============================================================================== --- trunk/reactos/include/reactos/wine/windef.h (original) +++ trunk/reactos/include/reactos/wine/windef.h Tue Oct 30 13:47:24 2007 @@ -1,3 +1,1 @@ -#include "../../psdk/windef.h" - - +#include "../../psdk/windef.h" Propchange: trunk/reactos/include/reactos/wine/windef.h ------------------------------------------------------------------------------ svn:eol-style = native Propchange: trunk/reactos/include/reactos/wine/windef16.h ------------------------------------------------------------------------------ --- svn:keywords (original) +++ svn:keywords (removed) @@ -1,1 +1,0 @@ -author date id revision Propchange: trunk/reactos/include/reactos/wine/wine_common_ver.rc ------------------------------------------------------------------------------ --- svn:keywords (original) +++ svn:keywords (removed) @@ -1,1 +1,0 @@ -author date id revision Propchange: trunk/reactos/include/reactos/wine/wingdi16.h ------------------------------------------------------------------------------ --- svn:keywords (original) +++ svn:keywords (removed) @@ -1,1 +1,0 @@ -author date id revision Modified: trunk/reactos/include/reactos/wine/winnetwk.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/wine/winne…
============================================================================== --- trunk/reactos/include/reactos/wine/winnetwk.h (original) +++ trunk/reactos/include/reactos/wine/winnetwk.h Tue Oct 30 13:47:24 2007 @@ -1,4 +1,4 @@ -/* $Id$ +/* $Id: winnetwk.h 20909 2006-01-15 22:25:16Z gvg $ * * Compatibility header * Propchange: trunk/reactos/include/reactos/wine/winnetwk.h ------------------------------------------------------------------------------ --- svn:keywords (original) +++ svn:keywords (removed) @@ -1,1 +1,0 @@ -author date id revision Modified: trunk/reactos/include/reactos/wine/winnt.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/wine/winnt…
============================================================================== --- trunk/reactos/include/reactos/wine/winnt.h (original) +++ trunk/reactos/include/reactos/wine/winnt.h Tue Oct 30 13:47:24 2007 @@ -22,12 +22,10 @@ #define __WINE_WINNT_H #include_next <winnt.h> -#include <w32api.h> -#include <stddef.h> /* non standard; keep the number high enough (but < 0xff) */ -#define LANG_ESPERANTO 0x8f -#define LANG_WALON 0x90 +#define LANG_ESPERANTO 0x8f +#define LANG_WALON 0x90 #define LANG_CORNISH 0x91 #define LANG_WELSH 0x92 #define LANG_BRETON 0x93 @@ -35,12 +33,12 @@ /* FIXME: these are not in the Windows header */ #define LANG_GAELIC 0x94 #define LANG_MALTESE 0x3a -#define LANG_RHAETO_ROMANCE 0x17 +#define LANG_ROMANSH 0x17 #define LANG_SAAMI 0x3b -#define LANG_SORBIAN 0x2e #define LANG_LOWER_SORBIAN 0x2e #define LANG_UPPER_SORBIAN 0x2e #define LANG_SUTU 0x30 +#define LANG_TAJIK 0x28 #define LANG_TSONGA 0x31 #define LANG_TSWANA 0x32 #define LANG_VENDA 0x33 Propchange: trunk/reactos/include/reactos/wine/winnt.h ------------------------------------------------------------------------------ --- svn:keywords (original) +++ svn:keywords (removed) @@ -1,1 +1,0 @@ -author date id revision Modified: trunk/reactos/include/reactos/wine/winsock16.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/wine/winso…
============================================================================== --- trunk/reactos/include/reactos/wine/winsock16.h (original) +++ trunk/reactos/include/reactos/wine/winsock16.h Tue Oct 30 13:47:24 2007 @@ -1,110 +1,110 @@ -/* - * Copyright (C) the Wine project - * - * 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#ifndef __WINE_WINE_WINSOCK16_H -#define __WINE_WINE_WINSOCK16_H - -#include <stdarg.h> -#include <windef.h> -#include <winbase.h> -#include <pshpack1.h> - -typedef UINT16 SOCKET16; - -typedef struct -{ - UINT16 fd_count; /* how many are SET? */ - SOCKET16 fd_array[WS_FD_SETSIZE]; /* an array of SOCKETs */ -} ws_fd_set16; - -/* ws_hostent16, ws_protoent16, ws_servent16, ws_netent16 - * are 1-byte aligned here ! */ -typedef struct ws_hostent16 -{ - SEGPTR h_name; /* official name of host */ - SEGPTR h_aliases; /* alias list */ - INT16 h_addrtype; /* host address type */ - INT16 h_length; /* length of address */ - SEGPTR h_addr_list; /* list of addresses from name server */ -} _ws_hostent16; - -typedef struct ws_protoent16 -{ - SEGPTR p_name; /* official protocol name */ - SEGPTR p_aliases; /* alias list */ - INT16 p_proto; /* protocol # */ -} _ws_protoent16; - -typedef struct ws_servent16 -{ - SEGPTR s_name; /* official service name */ - SEGPTR s_aliases; /* alias list */ - INT16 s_port; /* port # */ - SEGPTR s_proto; /* protocol to use */ -} _ws_servent16; - -typedef struct ws_netent16 -{ - SEGPTR n_name; /* official name of net */ - SEGPTR n_aliases; /* alias list */ - INT16 n_addrtype; /* net address type */ - INT n_net; /* network # */ -} _ws_netent16; - -typedef struct WSAData16 -{ - WORD wVersion; - WORD wHighVersion; - char szDescription[WSADESCRIPTION_LEN+1]; - char szSystemStatus[WSASYS_STATUS_LEN+1]; - WORD iMaxSockets; - WORD iMaxUdpDg; - SEGPTR lpVendorInfo; -} WSADATA16, *LPWSADATA16; - -#include <poppack.h> - -#define WS_FD_CLR16(fd, set) __WS_FD_CLR((fd),(set), ws_fd_set16) -#define WS_FD_SET16(fd, set) __WS_FD_SET1((fd),(set), ws_fd_set16) -#define WS_FD_ZERO16(set) (((ws_fd_set16*)(set))->fd_count=0) -#define WS_FD_ISSET16(fd, set) __WSAFDIsSet16((SOCKET16)(fd), (ws_fd_set16*)(set)) - -#define INVALID_SOCKET16 ((SOCKET16)(~0)) - -INT16 WINAPI __WSAFDIsSet16( SOCKET16, ws_fd_set16 * ); -INT16 WINAPI WSAStartup16(UINT16 wVersionRequired, LPWSADATA16 lpWSAData); -void WINAPI WSASetLastError16(INT16 iError); -INT16 WINAPI WSAUnhookBlockingHook16(void); -FARPROC16 WINAPI WSASetBlockingHook16(FARPROC16 lpBlockFunc); -HANDLE16 WINAPI WSAAsyncGetServByName16(HWND16 hWnd, UINT16 wMsg, LPCSTR name, LPCSTR proto, - SEGPTR buf, INT16 buflen); -HANDLE16 WINAPI WSAAsyncGetServByPort16(HWND16 hWnd, UINT16 wMsg, INT16 port, - LPCSTR proto, SEGPTR buf, INT16 buflen); -HANDLE16 WINAPI WSAAsyncGetProtoByName16(HWND16 hWnd, UINT16 wMsg, - LPCSTR name, SEGPTR buf, INT16 buflen); -HANDLE16 WINAPI WSAAsyncGetProtoByNumber16(HWND16 hWnd, UINT16 wMsg, - INT16 number, SEGPTR buf, INT16 buflen); -HANDLE16 WINAPI WSAAsyncGetHostByName16(HWND16 hWnd, UINT16 wMsg, - LPCSTR name, SEGPTR buf, INT16 buflen); -HANDLE16 WINAPI WSAAsyncGetHostByAddr16(HWND16 hWnd, UINT16 wMsg, LPCSTR addr, - INT16 len, INT16 type, SEGPTR buf, INT16 buflen); -INT16 WINAPI WSACancelAsyncRequest16(HANDLE16 hAsyncTaskHandle); -INT16 WINAPI WSAAsyncSelect16(SOCKET16 s, HWND16 hWnd, UINT16 wMsg, LONG lEvent); -INT16 WINAPI WSARecvEx16(SOCKET16 s, char *buf, INT16 len, INT16 *flags); - -#endif /* __WINE_WINE_WINSOCK16_H */ +/* + * Copyright (C) the Wine project + * + * 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#ifndef __WINE_WINE_WINSOCK16_H +#define __WINE_WINE_WINSOCK16_H + +#include <stdarg.h> +#include <windef.h> +#include <winbase.h> +#include <pshpack1.h> + +typedef UINT16 SOCKET16; + +typedef struct +{ + UINT16 fd_count; /* how many are SET? */ + SOCKET16 fd_array[WS_FD_SETSIZE]; /* an array of SOCKETs */ +} ws_fd_set16; + +/* ws_hostent16, ws_protoent16, ws_servent16, ws_netent16 + * are 1-byte aligned here ! */ +typedef struct ws_hostent16 +{ + SEGPTR h_name; /* official name of host */ + SEGPTR h_aliases; /* alias list */ + INT16 h_addrtype; /* host address type */ + INT16 h_length; /* length of address */ + SEGPTR h_addr_list; /* list of addresses from name server */ +} _ws_hostent16; + +typedef struct ws_protoent16 +{ + SEGPTR p_name; /* official protocol name */ + SEGPTR p_aliases; /* alias list */ + INT16 p_proto; /* protocol # */ +} _ws_protoent16; + +typedef struct ws_servent16 +{ + SEGPTR s_name; /* official service name */ + SEGPTR s_aliases; /* alias list */ + INT16 s_port; /* port # */ + SEGPTR s_proto; /* protocol to use */ +} _ws_servent16; + +typedef struct ws_netent16 +{ + SEGPTR n_name; /* official name of net */ + SEGPTR n_aliases; /* alias list */ + INT16 n_addrtype; /* net address type */ + INT n_net; /* network # */ +} _ws_netent16; + +typedef struct WSAData16 +{ + WORD wVersion; + WORD wHighVersion; + char szDescription[WSADESCRIPTION_LEN+1]; + char szSystemStatus[WSASYS_STATUS_LEN+1]; + WORD iMaxSockets; + WORD iMaxUdpDg; + SEGPTR lpVendorInfo; +} WSADATA16, *LPWSADATA16; + +#include <poppack.h> + +#define WS_FD_CLR16(fd, set) __WS_FD_CLR((fd),(set), ws_fd_set16) +#define WS_FD_SET16(fd, set) __WS_FD_SET1((fd),(set), ws_fd_set16) +#define WS_FD_ZERO16(set) (((ws_fd_set16*)(set))->fd_count=0) +#define WS_FD_ISSET16(fd, set) __WSAFDIsSet16((SOCKET16)(fd), (ws_fd_set16*)(set)) + +#define INVALID_SOCKET16 ((SOCKET16)(~0)) + +INT16 WINAPI __WSAFDIsSet16( SOCKET16, ws_fd_set16 * ); +INT16 WINAPI WSAStartup16(UINT16 wVersionRequired, LPWSADATA16 lpWSAData); +void WINAPI WSASetLastError16(INT16 iError); +INT16 WINAPI WSAUnhookBlockingHook16(void); +FARPROC16 WINAPI WSASetBlockingHook16(FARPROC16 lpBlockFunc); +HANDLE16 WINAPI WSAAsyncGetServByName16(HWND16 hWnd, UINT16 wMsg, LPCSTR name, LPCSTR proto, + SEGPTR buf, INT16 buflen); +HANDLE16 WINAPI WSAAsyncGetServByPort16(HWND16 hWnd, UINT16 wMsg, INT16 port, + LPCSTR proto, SEGPTR buf, INT16 buflen); +HANDLE16 WINAPI WSAAsyncGetProtoByName16(HWND16 hWnd, UINT16 wMsg, + LPCSTR name, SEGPTR buf, INT16 buflen); +HANDLE16 WINAPI WSAAsyncGetProtoByNumber16(HWND16 hWnd, UINT16 wMsg, + INT16 number, SEGPTR buf, INT16 buflen); +HANDLE16 WINAPI WSAAsyncGetHostByName16(HWND16 hWnd, UINT16 wMsg, + LPCSTR name, SEGPTR buf, INT16 buflen); +HANDLE16 WINAPI WSAAsyncGetHostByAddr16(HWND16 hWnd, UINT16 wMsg, LPCSTR addr, + INT16 len, INT16 type, SEGPTR buf, INT16 buflen); +INT16 WINAPI WSACancelAsyncRequest16(HANDLE16 hAsyncTaskHandle); +INT16 WINAPI WSAAsyncSelect16(SOCKET16 s, HWND16 hWnd, UINT16 wMsg, LONG lEvent); +INT16 WINAPI WSARecvEx16(SOCKET16 s, char *buf, INT16 len, INT16 *flags); + +#endif /* __WINE_WINE_WINSOCK16_H */ Propchange: trunk/reactos/include/reactos/wine/winsock16.h ------------------------------------------------------------------------------ svn:eol-style = native Propchange: trunk/reactos/include/reactos/wine/winuser.h ------------------------------------------------------------------------------ --- svn:keywords (original) +++ svn:keywords (removed) @@ -1,1 +1,0 @@ -author date id revision Propchange: trunk/reactos/include/reactos/wine/winuser16.h ------------------------------------------------------------------------------ --- svn:keywords (original) +++ svn:keywords (removed) @@ -1,1 +1,0 @@ -author date id revision Propchange: trunk/reactos/include/reactos/wine/wownt32.h ------------------------------------------------------------------------------ --- svn:keywords (original) +++ svn:keywords (removed) @@ -1,1 +1,0 @@ -author date id revision Propchange: trunk/reactos/include/reactos/wine/wpp.h ------------------------------------------------------------------------------ --- svn:keywords (original) +++ svn:keywords (removed) @@ -1,1 +1,0 @@ -author date id revision
17 years, 1 month
1
0
0
0
[fireball] 29974: - Yes, this is the last fix, really!!
by fireball@svn.reactos.org
Author: fireball Date: Tue Oct 30 11:53:06 2007 New Revision: 29974 URL:
http://svn.reactos.org/svn/reactos?rev=29974&view=rev
Log: - Yes, this is the last fix, really!! Modified: trunk/reactos/base/applications/screensavers/3dtext/3dtext.c Modified: trunk/reactos/base/applications/screensavers/3dtext/3dtext.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/screensa…
============================================================================== --- trunk/reactos/base/applications/screensavers/3dtext/3dtext.c (original) +++ trunk/reactos/base/applications/screensavers/3dtext/3dtext.c Tue Oct 30 11:53:06 2007 @@ -394,7 +394,7 @@ DialogBox(hInstance, MAKEINTRESOURCE(IDD_CONFIG), NULL , (DLGPROC)ConfigDlgProc); } -int CALLBACK tWinMain (HINSTANCE hInst, +int CALLBACK _tWinMain (HINSTANCE hInst, HINSTANCE hPrev, LPTSTR lpCmdLine, int iCmdShow)
17 years, 1 month
1
0
0
0
[fireball] 29973: - Forgot to add 't'.
by fireball@svn.reactos.org
Author: fireball Date: Tue Oct 30 11:50:40 2007 New Revision: 29973 URL:
http://svn.reactos.org/svn/reactos?rev=29973&view=rev
Log: - Forgot to add 't'. Modified: trunk/reactos/base/applications/screensavers/3dtext/3dtext.c Modified: trunk/reactos/base/applications/screensavers/3dtext/3dtext.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/screensa…
============================================================================== --- trunk/reactos/base/applications/screensavers/3dtext/3dtext.c (original) +++ trunk/reactos/base/applications/screensavers/3dtext/3dtext.c Tue Oct 30 11:50:40 2007 @@ -394,7 +394,7 @@ DialogBox(hInstance, MAKEINTRESOURCE(IDD_CONFIG), NULL , (DLGPROC)ConfigDlgProc); } -int CALLBACK WinMain (HINSTANCE hInst, +int CALLBACK tWinMain (HINSTANCE hInst, HINSTANCE hPrev, LPTSTR lpCmdLine, int iCmdShow)
17 years, 1 month
1
0
0
0
[fireball] 29972: - More fixes, leaving what's unfixed yet to Marc. 3dtext now compiles fine.
by fireball@svn.reactos.org
Author: fireball Date: Tue Oct 30 11:37:54 2007 New Revision: 29972 URL:
http://svn.reactos.org/svn/reactos?rev=29972&view=rev
Log: - More fixes, leaving what's unfixed yet to Marc. 3dtext now compiles fine. Modified: trunk/reactos/base/applications/screensavers/3dtext/3dtext.c Modified: trunk/reactos/base/applications/screensavers/3dtext/3dtext.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/screensa…
============================================================================== --- trunk/reactos/base/applications/screensavers/3dtext/3dtext.c (original) +++ trunk/reactos/base/applications/screensavers/3dtext/3dtext.c Tue Oct 30 11:37:54 2007 @@ -84,7 +84,15 @@ glPushAttrib(GL_LIST_BIT); // Pushes The Display List Bits glListBase(base); // Sets The Base Character to 32 - glCallLists(_tcslen(text), GL_UNSIGNED_SHORT, text); // Draws The Display List Text + + glCallLists(_tcslen(text), +#ifdef UNICODE + GL_UNSIGNED_SHORT +#else + GL_UNSIGNED_BYTE +#endif + , text); // Draws The Display List Text + glPopAttrib(); // Pops The Display List Bits } @@ -320,28 +328,28 @@ // -p <hwnd> (preview) // -c <hwnd> (configure) // -VOID ParseCommandLine(LPWSTR szCmdLine, UCHAR *chOption, HWND *hwndParent) -{ - UCHAR ch = *szCmdLine++; - - if(ch == '-' || ch == '/') +VOID ParseCommandLine(LPTSTR szCmdLine, UCHAR *chOption, HWND *hwndParent) +{ + TCHAR ch = *szCmdLine++; + + if(ch == _T('-') || ch == _T('/')) ch = *szCmdLine++; - if(ch >= 'A' && ch <= 'Z') - ch += 'a' - 'A'; //convert to lower case + if(ch >= _T('A') && ch <= _T('Z')) + ch += _T('a') - _T('A'); //convert to lower case *chOption = ch; ch = *szCmdLine++; - if(ch == ':') + if(ch == _T(':')) ch = *szCmdLine++; - while(ch == ' ' || ch == '\t') + while(ch == _T(' ') || ch == _T('\t')) ch = *szCmdLine++; if(isdigit(ch)) { - unsigned int i = _wtoi(szCmdLine - 1); + unsigned int i = _ttoi(szCmdLine - 1); *hwndParent = (HWND)i; } else @@ -386,10 +394,10 @@ DialogBox(hInstance, MAKEINTRESOURCE(IDD_CONFIG), NULL , (DLGPROC)ConfigDlgProc); } -int CALLBACK wWinMain (HINSTANCE hInst, - HINSTANCE hPrev, - LPWSTR lpCmdLine, - int iCmdShow) +int CALLBACK WinMain (HINSTANCE hInst, + HINSTANCE hPrev, + LPTSTR lpCmdLine, + int iCmdShow) { HWND hwndParent = 0; UCHAR chOption;
17 years, 1 month
1
0
0
0
← Newer
1
2
3
4
5
6
7
8
9
...
71
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
Results per page:
10
25
50
100
200