Author: cfinck Date: Thu Oct 30 16:13:29 2008 New Revision: 37109
URL: http://svn.reactos.org/svn/reactos?rev=37109&view=rev Log: Merge in 37063, 37071, 37080, 37106-37108
Modified: branches/ros-branch-0_3_7/reactos/dll/win32/iphlpapi/iphlpapi_main.c branches/ros-branch-0_3_7/reactos/dll/win32/iphlpapi/resinfo_reactos.c branches/ros-branch-0_3_7/reactos/dll/win32/netshell/lanstatusui.c branches/ros-branch-0_3_7/reactos/dll/win32/shell32/shlview.c branches/ros-branch-0_3_7/reactos/dll/win32/shell32/shv_def_cmenu.c
Modified: branches/ros-branch-0_3_7/reactos/dll/win32/iphlpapi/iphlpapi_main.c URL: http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_7/reactos/dll/win... ============================================================================== --- branches/ros-branch-0_3_7/reactos/dll/win32/iphlpapi/iphlpapi_main.c [iso-8859-1] (original) +++ branches/ros-branch-0_3_7/reactos/dll/win32/iphlpapi/iphlpapi_main.c [iso-8859-1] Thu Oct 30 16:13:29 2008 @@ -1388,8 +1388,32 @@ CopyMemory(&pFixedInfo->DnsServerList, resInfo->DnsList, sizeof(IP_ADDR_STRING)); if (resInfo->riCount > 1) { - pFixedInfo->DnsServerList.Next = (struct _IP_ADDR_STRING*)((char*)pFixedInfo + sizeof(FIXED_INFO)); - CopyMemory(pFixedInfo->DnsServerList.Next, resInfo->DnsList->Next, sizeof(IP_ADDR_STRING) * (resInfo->riCount-1)); + IP_ADDR_STRING *pSrc = resInfo->DnsList->Next; + IP_ADDR_STRING *pTarget = (struct _IP_ADDR_STRING*)((char*)pFixedInfo + sizeof(FIXED_INFO)); + + pFixedInfo->DnsServerList.Next = pTarget; + + do + { + CopyMemory(pTarget, pSrc, sizeof(IP_ADDR_STRING)); + resInfo->riCount--; + if (resInfo->riCount > 1) + { + pTarget->Next = (IP_ADDR_STRING*)((char*)pTarget + sizeof(IP_ADDR_STRING)); + pTarget = pTarget->Next; + pSrc = pSrc->Next; + } + else + { + pTarget->Next = NULL; + break; + } + } + while(TRUE); + } + else + { + pFixedInfo->DnsServerList.Next = NULL; } }
Modified: branches/ros-branch-0_3_7/reactos/dll/win32/iphlpapi/resinfo_reactos.c URL: http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_7/reactos/dll/win... ============================================================================== --- branches/ros-branch-0_3_7/reactos/dll/win32/iphlpapi/resinfo_reactos.c [iso-8859-1] (original) +++ branches/ros-branch-0_3_7/reactos/dll/win32/iphlpapi/resinfo_reactos.c [iso-8859-1] Thu Oct 30 16:13:29 2008 @@ -244,6 +244,6 @@
VOID disposeResInfo( PIPHLP_RES_INFO InfoPtr ) { + HeapFree(GetProcessHeap(), 0, InfoPtr->DnsList); RtlFreeHeap( GetProcessHeap(), 0, InfoPtr ); - HeapFree(GetProcessHeap(), 0, InfoPtr->DnsList); -} +}
Modified: branches/ros-branch-0_3_7/reactos/dll/win32/netshell/lanstatusui.c URL: http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_7/reactos/dll/win... ============================================================================== --- branches/ros-branch-0_3_7/reactos/dll/win32/netshell/lanstatusui.c [iso-8859-1] (original) +++ branches/ros-branch-0_3_7/reactos/dll/win32/netshell/lanstatusui.c [iso-8859-1] Thu Oct 30 16:13:29 2008 @@ -429,9 +429,11 @@ { li.iItem = InsertItemToListView(hDlgCtrl, IDS_PHYSICAL_ADDRESS); if (li.iItem >= 0) - if (MultiByteToWideChar(CP_ACP, 0, (LPCSTR)pCurAdapter->Address, -1, szBuffer, sizeof(szBuffer)/sizeof(WCHAR))) - SendMessageW(hDlgCtrl, LVM_SETITEMW, 0, (LPARAM)&li); - + { + swprintf(szBuffer, L"%02x-%02x-%02x-%02x-%02x-%02x",pCurAdapter->Address[0], pCurAdapter->Address[1], + pCurAdapter->Address[2], pCurAdapter->Address[3], pCurAdapter->Address[4], pCurAdapter->Address[5]); + SendMessageW(hDlgCtrl, LVM_SETITEMW, 0, (LPARAM)&li); + } li.iItem = InsertItemToListView(hDlgCtrl, IDS_IP_ADDRESS); if (li.iItem >= 0) if (MultiByteToWideChar(CP_ACP, 0, pCurAdapter->IpAddressList.IpAddress.String, -1, szBuffer, sizeof(szBuffer)/sizeof(WCHAR)))
Modified: branches/ros-branch-0_3_7/reactos/dll/win32/shell32/shlview.c URL: http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_7/reactos/dll/win... ============================================================================== --- branches/ros-branch-0_3_7/reactos/dll/win32/shell32/shlview.c [iso-8859-1] (original) +++ branches/ros-branch-0_3_7/reactos/dll/win32/shell32/shlview.c [iso-8859-1] Thu Oct 30 16:13:29 2008 @@ -835,6 +835,8 @@ static UINT CF_IDLIST = 0; HRESULT hr; IDataObject* selection; + IContextMenu * cm; + HMENU hmenu; FORMATETC fetc; STGMEDIUM stgm; LPIDA pIDList; @@ -843,14 +845,68 @@ LPCWSTR parent_dir = NULL; SFGAOF attribs; int i; + CMINVOKECOMMANDINFOEX ici; + MENUITEMINFOW info;
if (0 == ShellView_GetSelections(This)) { return S_OK; } + + hr = IShellFolder_GetUIObjectOf(This->pSFParent, This->hWnd, This->cidl, + (LPCITEMIDLIST*)This->apidl, &IID_IContextMenu, + 0, (LPVOID *)&cm); + + if (SUCCEEDED(hr)) + { + hmenu = CreatePopupMenu(); + if (hmenu) + { + if (SUCCEEDED(IContextMenu_QueryContextMenu( cm, hmenu, 0, 0x20, 0x7fff, CMF_DEFAULTONLY))) + { + INT def = -1, n = GetMenuItemCount(hmenu); + + for ( i = 0; i < n; i++ ) + { + memset( &info, 0, sizeof info ); + info.cbSize = sizeof info; + info.fMask = MIIM_FTYPE | MIIM_STATE | MIIM_ID; + if (GetMenuItemInfoW( hmenu, i, TRUE, &info)) + { + if (info.fState & MFS_DEFAULT) + { + def = info.wID; + break; + } + } + } + if (def != -1) + { + memset( &ici, 0, sizeof ici ); + ici.cbSize = sizeof ici; + ici.lpVerb = MAKEINTRESOURCEA( def ); + ici.hwnd = This->hWnd; + + IContextMenu_InvokeCommand(cm, (LPCMINVOKECOMMANDINFO) &ici ); + IContextMenu_Release(cm); + DestroyMenu( hmenu ); + return S_OK; + } + + } + DestroyMenu( hmenu ); + } + IContextMenu_Release(cm); + } + + + hr = IShellFolder_GetUIObjectOf(This->pSFParent, This->hWnd, This->cidl, (LPCITEMIDLIST*)This->apidl, &IID_IDataObject, 0, (LPVOID *)&selection); + + + if (FAILED(hr)) return hr;
Modified: branches/ros-branch-0_3_7/reactos/dll/win32/shell32/shv_def_cmenu.c URL: http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_7/reactos/dll/win... ============================================================================== --- branches/ros-branch-0_3_7/reactos/dll/win32/shell32/shv_def_cmenu.c [iso-8859-1] (original) +++ branches/ros-branch-0_3_7/reactos/dll/win32/shell32/shv_def_cmenu.c [iso-8859-1] Thu Oct 30 16:13:29 2008 @@ -1404,10 +1404,10 @@ } else if (_ILIsNetHood(This->dcm.apidl[0])) { - /* FIXME - * implement nethood properties - */ - FIXME("implement network connection shell folder\n"); + //FIXME path! + ShellExecuteW(NULL, L"open", L"explorer.exe", + L"/n,::{20D04FE0-3AEA-1069-A2D8-08002B30309D}\::{7007ACC7-3202-11D1-AAD2-00805FC1270E}", + NULL, SW_SHOWDEFAULT); return S_OK; } else if (_ILIsBitBucket(This->dcm.apidl[0]))