From 22d098ac49819e576453e7fb225bc5dd94d3fac4 Mon Sep 17 00:00:00 2001 From: Aleksey Bragin Date: Mon, 7 Jul 2008 12:32:35 +0000 Subject: [PATCH] Autosyncing with Wine HEAD svn path=/trunk/; revision=34354 --- reactos/dll/win32/hhctrl.ocx/Da.rc | 58 +++++ reactos/dll/win32/hhctrl.ocx/En.rc | 2 +- reactos/dll/win32/hhctrl.ocx/Ru.rc | 6 +- reactos/dll/win32/hhctrl.ocx/Si.rc | 62 +++++ reactos/dll/win32/hhctrl.ocx/Sv.rc | 2 +- reactos/dll/win32/hhctrl.ocx/chm.c | 7 +- reactos/dll/win32/hhctrl.ocx/help.c | 14 +- reactos/dll/win32/hhctrl.ocx/hhctrl.c | 30 ++- reactos/dll/win32/hhctrl.ocx/hhctrl.rc | 2 + reactos/dll/win32/hlink/extserv.c | 117 +++++++-- reactos/dll/win32/hlink/hlink_main.c | 4 +- reactos/dll/win32/inetcomm/inetcomm.rbuild | 47 ++-- reactos/dll/win32/inetcomm/mimeole.c | 4 +- reactos/dll/win32/inetmib1/inetmib1.rbuild | 34 +-- reactos/dll/win32/inetmib1/main.c | 225 ++++++++++++++---- reactos/dll/win32/mapi32/prop.c | 6 +- reactos/dll/win32/mlang/mlang.c | 3 + reactos/dll/win32/mpr/mpr.rc | 3 + .../dll/win32/mpr/{mpr_Uk.rc => mpr_Da.rc} | 24 +- reactos/dll/win32/mpr/mpr_Ro.rc | 48 ++++ reactos/dll/win32/mpr/mpr_Si.rc | 50 ++++ reactos/dll/win32/mpr/mpr_Sv.rc | 2 +- reactos/dll/win32/mpr/nps.c | 6 +- reactos/dll/win32/mpr/wnet.c | 2 + 24 files changed, 607 insertions(+), 151 deletions(-) create mode 100644 reactos/dll/win32/hhctrl.ocx/Da.rc create mode 100644 reactos/dll/win32/hhctrl.ocx/Si.rc rename reactos/dll/win32/mpr/{mpr_Uk.rc => mpr_Da.rc} (68%) create mode 100644 reactos/dll/win32/mpr/mpr_Ro.rc create mode 100644 reactos/dll/win32/mpr/mpr_Si.rc diff --git a/reactos/dll/win32/hhctrl.ocx/Da.rc b/reactos/dll/win32/hhctrl.ocx/Da.rc new file mode 100644 index 00000000000..e425ef0e567 --- /dev/null +++ b/reactos/dll/win32/hhctrl.ocx/Da.rc @@ -0,0 +1,58 @@ +/* + * HTML Help resources + * Danish Language Support + * + * Copyright 2008 Jens Albretsen + * + * 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 + */ + +LANGUAGE LANG_DANISH, SUBLANG_DEFAULT + +STRINGTABLE +BEGIN + IDS_CONTENTS "&Indhold" + IDS_INDEX "I&ndeks" + IDS_SEARCH "&Sg" + IDS_FAVORITES "Favor&itter" +END + +STRINGTABLE +BEGIN + IDTB_EXPAND "Vis" + IDTB_CONTRACT "Skjul" + IDTB_STOP "Stop" + IDTB_REFRESH "Opdatr" + IDTB_BACK "Tilbage" + IDTB_HOME "Hjem" + IDTB_SYNC "Synkroniser" + IDTB_PRINT "Udskriv" + IDTB_OPTIONS "Indstillinger" + IDTB_FORWARD "Frem" + IDTB_NOTES "IDTB_NOTES" + IDTB_BROWSE_FWD "IDTB_BROWSE_FWD" + IDTB_BROWSE_BACK "IDT_BROWSE_BACK" + IDTB_CONTENTS "IDTB_CONTENTS" + IDTB_INDEX "IDTB_INDEX" + IDTB_SEARCH "IDTB_SEARCH" + IDTB_HISTORY "IDTB_HISTORY" + IDTB_FAVORITES "IDTB_FAVORITES" + IDTB_JUMP1 "Jump1" + IDTB_JUMP2 "Jump2" + IDTB_CUSTOMIZE "Tilpas" + IDTB_ZOOM "Forstr" + IDTB_TOC_NEXT "IDTB_TOC_NEXT" + IDTB_TOC_PREV "IDTB_TOC_PREV" +END diff --git a/reactos/dll/win32/hhctrl.ocx/En.rc b/reactos/dll/win32/hhctrl.ocx/En.rc index e55162adfe0..83917f6e3d6 100644 --- a/reactos/dll/win32/hhctrl.ocx/En.rc +++ b/reactos/dll/win32/hhctrl.ocx/En.rc @@ -19,7 +19,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US +LANGUAGE LANG_ENGLISH, SUBLANG_DEFAULT STRINGTABLE BEGIN diff --git a/reactos/dll/win32/hhctrl.ocx/Ru.rc b/reactos/dll/win32/hhctrl.ocx/Ru.rc index 43330336d2e..a530f80b637 100644 --- a/reactos/dll/win32/hhctrl.ocx/Ru.rc +++ b/reactos/dll/win32/hhctrl.ocx/Ru.rc @@ -38,11 +38,11 @@ BEGIN IDTB_BACK "" IDTB_HOME " " IDTB_SYNC "" - IDTB_PRINT "" + IDTB_PRINT "" IDTB_OPTIONS "" - IDTB_FORWARD " " + IDTB_FORWARD "" IDTB_NOTES "" - IDTB_BROWSE_FWD " " + IDTB_BROWSE_FWD " " IDTB_BROWSE_BACK " " IDTB_CONTENTS "" IDTB_INDEX "" diff --git a/reactos/dll/win32/hhctrl.ocx/Si.rc b/reactos/dll/win32/hhctrl.ocx/Si.rc new file mode 100644 index 00000000000..c8ea447f5ed --- /dev/null +++ b/reactos/dll/win32/hhctrl.ocx/Si.rc @@ -0,0 +1,62 @@ +/* + * HTML Help resources + * Slovenian Language Support + * + * Copyright 2008 Rok Mandeljc + * + * 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 + */ + +#pragma code_page(65001) + +LANGUAGE LANG_SLOVENIAN, SUBLANG_DEFAULT + +STRINGTABLE +BEGIN + IDS_CONTENTS "&Vsebina" + IDS_INDEX "I&ndeks" + IDS_SEARCH "&Iskanje" + IDS_FAVORITES "&Priljubljene" +END + +STRINGTABLE +BEGIN + IDTB_EXPAND "Pokaži" + IDTB_CONTRACT "Skrij" + IDTB_STOP "Ustavi" + IDTB_REFRESH "Osveži" + IDTB_BACK "Nazaj" + IDTB_HOME "Domov" + IDTB_SYNC "Sinhroniziraj" + IDTB_PRINT "Natisni" + IDTB_OPTIONS "Možnosti" + IDTB_FORWARD "Naprej" + IDTB_NOTES "IDTB_NOTES" + IDTB_BROWSE_FWD "IDTB_BROWSE_FWD" + IDTB_BROWSE_BACK "IDT_BROWSE_BACK" + IDTB_CONTENTS "IDTB_CONTENTS" + IDTB_INDEX "IDTB_INDEX" + IDTB_SEARCH "IDTB_SEARCH" + IDTB_HISTORY "IDTB_HISTORY" + IDTB_FAVORITES "IDTB_FAVORITES" + IDTB_JUMP1 "Skok1" + IDTB_JUMP2 "Skok2" + IDTB_CUSTOMIZE "Prilagodi" + IDTB_ZOOM "Zoom" + IDTB_TOC_NEXT "IDTB_TOC_NEXT" + IDTB_TOC_PREV "IDTB_TOC_PREV" +END + +#pragma code_page(default) diff --git a/reactos/dll/win32/hhctrl.ocx/Sv.rc b/reactos/dll/win32/hhctrl.ocx/Sv.rc index 43b421c2ffb..cb3e4e26a5d 100644 --- a/reactos/dll/win32/hhctrl.ocx/Sv.rc +++ b/reactos/dll/win32/hhctrl.ocx/Sv.rc @@ -19,7 +19,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -LANGUAGE LANG_SWEDISH, SUBLANG_DEFAULT +LANGUAGE LANG_SWEDISH, SUBLANG_NEUTRAL STRINGTABLE BEGIN diff --git a/reactos/dll/win32/hhctrl.ocx/chm.c b/reactos/dll/win32/hhctrl.ocx/chm.c index ece05f06202..699fa04727f 100644 --- a/reactos/dll/win32/hhctrl.ocx/chm.c +++ b/reactos/dll/win32/hhctrl.ocx/chm.c @@ -229,7 +229,7 @@ BOOL LoadWinTypeFromCHM(HHInfo *info) info->WinType.cbStruct=sizeof(info->WinType); info->WinType.fUniCodeStrings=TRUE; info->WinType.pszType=strdupW(defaultwinW); - info->WinType.pszToc = strdupW(info->pCHMInfo->defToc); + info->WinType.pszToc = strdupW(info->pCHMInfo->defToc ? info->pCHMInfo->defToc : null); info->WinType.pszIndex = strdupW(null); info->WinType.fsValidMembers=0; info->WinType.fsWinProperties=HHWIN_PROP_TRI_PANE; @@ -363,14 +363,13 @@ IStream *GetChmStream(CHMInfo *info, LPCWSTR parent_chm, ChmPath *chm_file) CHMInfo *OpenCHM(LPCWSTR szFile) { WCHAR file[MAX_PATH] = {0}; - DWORD res; HRESULT hres; static const WCHAR wszSTRINGS[] = {'#','S','T','R','I','N','G','S',0}; CHMInfo *ret = heap_alloc_zero(sizeof(CHMInfo)); - res = GetFullPathNameW(szFile, sizeof(file)/sizeof(file[0]), file, NULL); + GetFullPathNameW(szFile, sizeof(file)/sizeof(file[0]), file, NULL); ret->szFile = strdupW(file); hres = CoCreateInstance(&CLSID_ITStorage, NULL, CLSCTX_INPROC_SERVER, @@ -391,7 +390,7 @@ CHMInfo *OpenCHM(LPCWSTR szFile) &ret->strings_stream); if(FAILED(hres)) { WARN("Could not open #STRINGS stream: %08x\n", hres); - return CloseCHM(ret); + /* It's not critical, so we pass */ } if(!ReadChmSystem(ret)) { diff --git a/reactos/dll/win32/hhctrl.ocx/help.c b/reactos/dll/win32/hhctrl.ocx/help.c index 3ee522ef92f..a2081cef94f 100644 --- a/reactos/dll/win32/hhctrl.ocx/help.c +++ b/reactos/dll/win32/hhctrl.ocx/help.c @@ -89,9 +89,15 @@ BOOL NavigateToUrl(HHInfo *info, LPCWSTR surl) BOOL ret; HRESULT hres; - hres = navigate_url(info, surl); - if(SUCCEEDED(hres)) - return TRUE; + static const WCHAR url_indicator[] = {':', '/', '/'}; + + TRACE("%s\n", debugstr_w(surl)); + + if (strstrW(surl, url_indicator)) { + hres = navigate_url(info, surl); + if(SUCCEEDED(hres)) + return TRUE; + } /* look up in chm if it doesn't look like a full url */ SetChmPath(&chm_path, info->pCHMInfo->szFile, surl); ret = NavigateToChm(info, chm_path.chm_file, chm_path.chm_index); @@ -575,7 +581,7 @@ static BOOL HH_AddToolbar(HHInfo *pHHInfo) { LPWSTR szBuf = HH_LoadString(buttons[dwIndex].idCommand); DWORD dwLen = strlenW(szBuf); - szBuf[dwLen + 2] = 0; /* Double-null terminate */ + szBuf[dwLen + 1] = 0; /* Double-null terminate */ buttons[dwIndex].iString = (DWORD)SendMessageW(hToolbar, TB_ADDSTRINGW, 0, (LPARAM)szBuf); heap_free(szBuf); diff --git a/reactos/dll/win32/hhctrl.ocx/hhctrl.c b/reactos/dll/win32/hhctrl.ocx/hhctrl.c index 472b7cfc310..a224b64e1e5 100644 --- a/reactos/dll/win32/hhctrl.ocx/hhctrl.c +++ b/reactos/dll/win32/hhctrl.ocx/hhctrl.c @@ -108,6 +108,9 @@ HWND WINAPI HtmlHelpW(HWND caller, LPCWSTR filename, UINT command, DWORD_PTR dat FIXME("Not all HH cases handled correctly\n"); + if (!filename) + return NULL; + index = strstrW(filename, delimW); if (index) { @@ -123,34 +126,41 @@ HWND WINAPI HtmlHelpW(HWND caller, LPCWSTR filename, UINT command, DWORD_PTR dat } info = CreateHelpViewer(filename); + if(!info) + return NULL; - if (info) + if(!index) + index = info->WinType.pszFile; + + res = NavigateToChm(info, info->pCHMInfo->szFile, index); + if(!res) { - if (!index) - index = info->WinType.pszFile; - res = NavigateToChm(info, info->pCHMInfo->szFile, index); - if(!res) - ReleaseHelpViewer(info); + ReleaseHelpViewer(info); + return NULL; } - - return NULL; /* FIXME */ + return info->WinType.hwndHelp; } case HH_HELP_CONTEXT: { HHInfo *info; LPWSTR url; + if (!filename) + return NULL; + info = CreateHelpViewer(filename); if(!info) return NULL; url = FindContextAlias(info->pCHMInfo, data); if(!url) + { + ReleaseHelpViewer(info); return NULL; + } NavigateToUrl(info, url); heap_free(url); - - return NULL; /* FIXME */ + return info->WinType.hwndHelp; } case HH_PRETRANSLATEMESSAGE: { static BOOL warned = FALSE; diff --git a/reactos/dll/win32/hhctrl.ocx/hhctrl.rc b/reactos/dll/win32/hhctrl.ocx/hhctrl.rc index 2c195d43d44..08d9648caa0 100644 --- a/reactos/dll/win32/hhctrl.ocx/hhctrl.rc +++ b/reactos/dll/win32/hhctrl.ocx/hhctrl.rc @@ -30,6 +30,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL #include "version.rc" #include "Cs.rc" +#include "Da.rc" #include "De.rc" #include "El.rc" #include "En.rc" @@ -41,5 +42,6 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL #include "No.rc" #include "Pl.rc" #include "Ru.rc" +#include "Si.rc" #include "Sv.rc" #include "Tr.rc" diff --git a/reactos/dll/win32/hlink/extserv.c b/reactos/dll/win32/hlink/extserv.c index daedf9eac74..c4e95abe5f3 100644 --- a/reactos/dll/win32/hlink/extserv.c +++ b/reactos/dll/win32/hlink/extserv.c @@ -26,9 +26,10 @@ WINE_DEFAULT_DEBUG_CHANNEL(hlink); #define DEFINE_THIS(cls,ifc,iface) ((cls*)((BYTE*)(iface)-offsetof(cls,lp ## ifc ## Vtbl))) typedef struct { - const IUnknownVtbl *lpIUnknownVtbl; - const IAuthenticateVtbl *lpIAuthenticateVtbl; - const IHttpNegotiateVtbl *lpIHttpNegotiateVtbl; + const IUnknownVtbl *lpIUnknownVtbl; + const IAuthenticateVtbl *lpIAuthenticateVtbl; + const IHttpNegotiateVtbl *lpIHttpNegotiateVtbl; + const IExtensionServicesVtbl *lpIExtensionServicesVtbl; LONG ref; IUnknown *outer; @@ -42,6 +43,7 @@ typedef struct { #define EXTSERVUNK(x) ((IUnknown*) &(x)->lpIUnknownVtbl) #define AUTHENTICATE(x) ((IAuthenticate*) &(x)->lpIAuthenticateVtbl) #define HTTPNEGOTIATE(x) ((IHttpNegotiate*) &(x)->lpIHttpNegotiateVtbl) +#define EXTENSIONSERVICES(x) ((IExtensionServices*) &(x)->lpIExtensionServicesVtbl) #define EXTSERVUNK_THIS(iface) DEFINE_THIS(ExtensionService, IUnknown, iface) @@ -60,6 +62,9 @@ static HRESULT WINAPI ExtServUnk_QueryInterface(IUnknown *iface, REFIID riid, vo }else if(IsEqualGUID(&IID_IHttpNegotiate, riid)) { TRACE("(%p)->(IID_IHttpNegotiate %p)\n", This, ppv); *ppv = HTTPNEGOTIATE(This); + }else if(IsEqualGUID(&IID_IExtensionServices, riid)) { + TRACE("(%p)->(IID_IExtensionServices %p)\n", This, ppv); + *ppv = EXTENSIONSERVICES(This); } if(*ppv) { @@ -209,6 +214,90 @@ static const IHttpNegotiateVtbl HttpNegotiateVtbl = { HttpNegotiate_OnResponse }; +#define EXTENSIONSERVICES_THIS(iface) DEFINE_THIS(ExtensionService, IExtensionServices, iface) + +static HRESULT WINAPI ExtServ_QueryInterface(IExtensionServices *iface, REFIID riid, void **ppv) +{ + ExtensionService *This = EXTENSIONSERVICES_THIS(iface); + return IUnknown_QueryInterface(This->outer, riid, ppv); +} + +static ULONG WINAPI ExtServ_AddRef(IExtensionServices *iface) +{ + ExtensionService *This = EXTENSIONSERVICES_THIS(iface); + return IUnknown_AddRef(This->outer); +} + +static ULONG WINAPI ExtServ_Release(IExtensionServices *iface) +{ + ExtensionService *This = EXTENSIONSERVICES_THIS(iface); + return IUnknown_Release(This->outer); +} + +static HRESULT ExtServ_ImplSetAdditionalHeaders(ExtensionService* This, LPCWSTR pwzAdditionalHeaders) +{ + int len = 0; + + heap_free(This->headers); + This->headers = NULL; + + if (!pwzAdditionalHeaders) + return S_OK; + + len = strlenW(pwzAdditionalHeaders); + + if(len && pwzAdditionalHeaders[len-1] != '\n' && pwzAdditionalHeaders[len-1] != '\r') { + static const WCHAR endlW[] = {'\r','\n',0}; + This->headers = heap_alloc(len*sizeof(WCHAR) + sizeof(endlW)); + memcpy(This->headers, pwzAdditionalHeaders, len*sizeof(WCHAR)); + memcpy(This->headers+len, endlW, sizeof(endlW)); + }else { + This->headers = hlink_strdupW(pwzAdditionalHeaders); + } + + return S_OK; +} + +static HRESULT WINAPI ExtServ_SetAdditionalHeaders(IExtensionServices* iface, LPCWSTR pwzAdditionalHeaders) +{ + ExtensionService *This = EXTENSIONSERVICES_THIS(iface); + + TRACE("(%p)->(%s)\n", This, debugstr_w(pwzAdditionalHeaders)); + + return ExtServ_ImplSetAdditionalHeaders(This,pwzAdditionalHeaders); +} + +static HRESULT ExtServ_ImplSetAuthenticateData(ExtensionService* This, HWND phwnd, LPCWSTR pwzUsername, LPCWSTR pwzPassword) +{ + heap_free(This->username); + heap_free(This->password); + + This->hwnd = phwnd; + This->username = hlink_strdupW(pwzUsername); + This->password = hlink_strdupW(pwzPassword); + + return S_OK; +} + +static HRESULT WINAPI ExtServ_SetAuthenticateData(IExtensionServices* iface, HWND phwnd, LPCWSTR pwzUsername, LPCWSTR pwzPassword) +{ + ExtensionService *This = EXTENSIONSERVICES_THIS(iface); + + TRACE("(%p)->(%p %s %s)\n", This, phwnd, debugstr_w(pwzUsername), debugstr_w(pwzPassword)); + + return ExtServ_ImplSetAuthenticateData(This, phwnd, pwzUsername, pwzPassword); +} + +#undef EXTENSIONSERVICES_THIS + +static const IExtensionServicesVtbl ExtServVtbl = { + ExtServ_QueryInterface, + ExtServ_AddRef, + ExtServ_Release, + ExtServ_SetAdditionalHeaders, + ExtServ_SetAuthenticateData +}; + /*********************************************************************** * HlinkCreateExtensionServices (HLINK.@) */ @@ -217,7 +306,6 @@ HRESULT WINAPI HlinkCreateExtensionServices(LPCWSTR pwzAdditionalHeaders, IUnknown *punkOuter, REFIID riid, void** ppv) { ExtensionService *ret; - int len = 0; HRESULT hres = S_OK; TRACE("%s %p %s %s %p %s %p\n",debugstr_w(pwzAdditionalHeaders), @@ -229,22 +317,15 @@ HRESULT WINAPI HlinkCreateExtensionServices(LPCWSTR pwzAdditionalHeaders, ret->lpIUnknownVtbl = &ExtServUnkVtbl; ret->lpIAuthenticateVtbl = &AuthenticateVtbl; ret->lpIHttpNegotiateVtbl = &HttpNegotiateVtbl; + ret->lpIExtensionServicesVtbl= &ExtServVtbl; ret->ref = 1; - ret->hwnd = phwnd; - ret->username = hlink_strdupW(pszUsername); - ret->password = hlink_strdupW(pszPassword); + ret->headers = NULL; + ret->hwnd = NULL; + ret->username = NULL; + ret->password = NULL; - if(pwzAdditionalHeaders) - len = strlenW(pwzAdditionalHeaders); - - if(len && pwzAdditionalHeaders[len-1] != '\n' && pwzAdditionalHeaders[len-1] != '\r') { - static const WCHAR endlW[] = {'\r','\n',0}; - ret->headers = heap_alloc(len*sizeof(WCHAR) + sizeof(endlW)); - memcpy(ret->headers, pwzAdditionalHeaders, len*sizeof(WCHAR)); - memcpy(ret->headers+len, endlW, sizeof(endlW)); - }else { - ret->headers = hlink_strdupW(pwzAdditionalHeaders); - } + ExtServ_ImplSetAuthenticateData(ret, phwnd, pszUsername, pszPassword); + ExtServ_ImplSetAdditionalHeaders(ret, pwzAdditionalHeaders); if(!punkOuter) { ret->outer = EXTSERVUNK(ret); diff --git a/reactos/dll/win32/hlink/hlink_main.c b/reactos/dll/win32/hlink/hlink_main.c index 43e9e7f3b3d..213506e15f1 100644 --- a/reactos/dll/win32/hlink/hlink_main.c +++ b/reactos/dll/win32/hlink/hlink_main.c @@ -481,8 +481,8 @@ static const IClassFactoryVtbl hlcfvt = HLinkCF_fnLockServer }; -static CFImpl HLink_cf = { &hlcfvt, &HLink_Constructor }; -static CFImpl HLinkBrowseContext_cf = { &hlcfvt, &HLinkBrowseContext_Constructor }; +static CFImpl HLink_cf = { &hlcfvt, HLink_Constructor }; +static CFImpl HLinkBrowseContext_cf = { &hlcfvt, HLinkBrowseContext_Constructor }; /*********************************************************************** * DllGetClassObject (HLINK.@) diff --git a/reactos/dll/win32/inetcomm/inetcomm.rbuild b/reactos/dll/win32/inetcomm/inetcomm.rbuild index a01db12b7e1..428f45bed9d 100644 --- a/reactos/dll/win32/inetcomm/inetcomm.rbuild +++ b/reactos/dll/win32/inetcomm/inetcomm.rbuild @@ -1,23 +1,26 @@ - - - . - include/reactos/wine - - - 0x600 - 0x600 - 0x600 - wine - uuid - ole32 - ws2_32 - user32 - advapi32 - kernel32 - ntdll - inetcomm_main.c - internettransport.c - mimeole.c - regsvr.c - inetcomm.spec + + + + + + + . + include/reactos/wine + + 0x600 + 0x600 + inetcomm_main.c + internettransport.c + mimeole.c + regsvr.c + inetcomm.spec + wine + uuid + ole32 + ws2_32 + user32 + advapi32 + kernel32 + ntdll + diff --git a/reactos/dll/win32/inetcomm/mimeole.c b/reactos/dll/win32/inetcomm/mimeole.c index ee03e92f951..7e9d709f5ce 100644 --- a/reactos/dll/win32/inetcomm/mimeole.c +++ b/reactos/dll/win32/inetcomm/mimeole.c @@ -1629,8 +1629,8 @@ static body_t *create_sub_body(MimeMessage *msg, IStream *pStm, BODYOFFSETS *off IStream *sub_stream; ULARGE_INTEGER start, length; - start.u.LowPart = cur->offsets.cbHeaderStart; - length.u.LowPart = cur->offsets.cbBodyEnd - cur->offsets.cbHeaderStart; + start.QuadPart = cur->offsets.cbHeaderStart; + length.QuadPart = cur->offsets.cbBodyEnd - cur->offsets.cbHeaderStart; create_sub_stream(pStm, start, length, &sub_stream); sub_body = create_sub_body(msg, sub_stream, &cur->offsets, body); IStream_Release(sub_stream); diff --git a/reactos/dll/win32/inetmib1/inetmib1.rbuild b/reactos/dll/win32/inetmib1/inetmib1.rbuild index 080c4661fb2..ad685b8fcc2 100644 --- a/reactos/dll/win32/inetmib1/inetmib1.rbuild +++ b/reactos/dll/win32/inetmib1/inetmib1.rbuild @@ -1,17 +1,19 @@ - - - . - include/reactos/wine - - - 0x600 - 0x501 - 0x501 - wine - snmpapi - kernel32 - iphlpapi - ntdll - main.c - inetmib1.spec + + + + + + . + include/reactos/wine + + 0x600 + 0x600 + main.c + inetmib1.spec + wine + snmpapi + kernel32 + iphlpapi + ntdll + diff --git a/reactos/dll/win32/inetmib1/main.c b/reactos/dll/win32/inetmib1/main.c index 20fc0b99284..09b408c252e 100644 --- a/reactos/dll/win32/inetmib1/main.c +++ b/reactos/dll/win32/inetmib1/main.c @@ -29,26 +29,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(inetmib1); -BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) -{ - TRACE("(0x%p, %d, %p)\n", hinstDLL, fdwReason, lpvReserved); - - switch (fdwReason) - { - case DLL_WINE_PREATTACH: - return FALSE; /* prefer native version */ - case DLL_PROCESS_ATTACH: - DisableThreadLibraryCalls(hinstDLL); - break; - case DLL_PROCESS_DETACH: - break; - default: - break; - } - - return TRUE; -} - /** * Utility functions */ @@ -115,6 +95,7 @@ struct mibImplementation AsnObjectIdentifier name; void (*init)(void); varqueryfunc query; + void (*cleanup)(void); }; static UINT mib2IfNumber[] = { 1,3,6,1,2,1,2,1 }; @@ -132,6 +113,11 @@ static void mib2IfNumberInit(void) } } +static void mib2IfNumberCleanup(void) +{ + HeapFree(GetProcessHeap(), 0, ifTable); +} + static BOOL mib2IfNumberQuery(BYTE bPduType, SnmpVarBind *pVarBind, AsnInteger32 *pErrorStatus) { @@ -352,18 +338,18 @@ static UINT findValueInTable(AsnObjectIdentifier *oid, } /* Given an OID and a base OID that it must begin with, finds the item and - * element of the table whose IP address matches the instance from the OID. - * E.g., given an OID foo.1.2.3.4.5 and a base OID foo, returns item 1 and the - * index of the entry in the table whose IP address is 2.3.4.5. + * element of the table whose value matches the instance from the OID. + * The OID is converted to a key with the function makeKey, and compared + * against entries in the table with the function compare. * If bPduType is not SNMP_PDU_GETNEXT and either the item or instance is * missing, returns SNMP_ERRORSTATUS_NOSUCHNAME. * If bPduType is SNMP_PDU_GETNEXT, returns the successor to the item and * instance, or item 1, instance 1 if either is missing. */ -static AsnInteger32 getItemAndIpAddressInstanceFromOid(AsnObjectIdentifier *oid, - AsnObjectIdentifier *base, BYTE bPduType, struct GenericTable *table, - size_t tableEntrySize, oidToKeyFunc makeKey, compareFunc compare, - UINT *item, UINT *instance) +static AsnInteger32 getItemAndInstanceFromTable(AsnObjectIdentifier *oid, + AsnObjectIdentifier *base, UINT instanceLen, BYTE bPduType, + struct GenericTable *table, size_t tableEntrySize, oidToKeyFunc makeKey, + compareFunc compare, UINT *item, UINT *instance) { AsnInteger32 ret = SNMP_ERRORSTATUS_NOERROR; @@ -380,7 +366,7 @@ static AsnInteger32 getItemAndIpAddressInstanceFromOid(AsnObjectIdentifier *oid, *instance = 1; } else if (!SnmpUtilOidNCmp(oid, base, base->idLength) && - oid->idLength < base->idLength + 5) + oid->idLength < base->idLength + instanceLen + 1) { /* Either the table or an item is specified, but the instance is * not. @@ -396,7 +382,7 @@ static AsnInteger32 getItemAndIpAddressInstanceFromOid(AsnObjectIdentifier *oid, *item = 1; } else if (!SnmpUtilOidNCmp(oid, base, base->idLength) && - oid->idLength == base->idLength + 5) + oid->idLength == base->idLength + instanceLen + 1) { *item = oid->ids[base->idLength]; if (!*item) @@ -406,8 +392,8 @@ static AsnInteger32 getItemAndIpAddressInstanceFromOid(AsnObjectIdentifier *oid, } else { - AsnObjectIdentifier ipOid = { 4, oid->ids + base->idLength + 1 - }; + AsnObjectIdentifier ipOid = { instanceLen, + oid->ids + base->idLength + 1 }; *instance = findValueInTable(&ipOid, table, tableEntrySize, makeKey, compare) + 1; @@ -420,15 +406,15 @@ static AsnInteger32 getItemAndIpAddressInstanceFromOid(AsnObjectIdentifier *oid, break; default: if (!SnmpUtilOidNCmp(oid, base, base->idLength) && - oid->idLength == base->idLength + 5) + oid->idLength == base->idLength + instanceLen + 1) { *item = oid->ids[base->idLength]; if (!*item) ret = SNMP_ERRORSTATUS_NOSUCHNAME; else { - AsnObjectIdentifier ipOid = { 4, oid->ids + base->idLength + 1 - }; + AsnObjectIdentifier ipOid = { instanceLen, + oid->ids + base->idLength + 1 }; *instance = findValueInTable(&ipOid, table, tableEntrySize, makeKey, compare); @@ -653,6 +639,11 @@ static void mib2IpAddrInit(void) } } +static void mib2IpAddrCleanup(void) +{ + HeapFree(GetProcessHeap(), 0, ipAddrTable); +} + static void oidToIpAddrRow(AsnObjectIdentifier *oid, void *dst) { MIB_IPADDRROW *row = dst; @@ -680,8 +671,8 @@ static BOOL mib2IpAddrQuery(BYTE bPduType, SnmpVarBind *pVarBind, { case SNMP_PDU_GET: case SNMP_PDU_GETNEXT: - *pErrorStatus = getItemAndIpAddressInstanceFromOid(&pVarBind->name, - &myOid, bPduType, (struct GenericTable *)ipAddrTable, + *pErrorStatus = getItemAndInstanceFromTable(&pVarBind->name, + &myOid, 4, bPduType, (struct GenericTable *)ipAddrTable, sizeof(MIB_IPADDRROW), oidToIpAddrRow, compareIpAddrRow, &item, &tableIndex); if (!*pErrorStatus) @@ -736,6 +727,11 @@ static void mib2IpRouteInit(void) } } +static void mib2IpRouteCleanup(void) +{ + HeapFree(GetProcessHeap(), 0, ipRouteTable); +} + static void oidToIpForwardRow(AsnObjectIdentifier *oid, void *dst) { MIB_IPFORWARDROW *row = dst; @@ -763,8 +759,8 @@ static BOOL mib2IpRouteQuery(BYTE bPduType, SnmpVarBind *pVarBind, { case SNMP_PDU_GET: case SNMP_PDU_GETNEXT: - *pErrorStatus = getItemAndIpAddressInstanceFromOid(&pVarBind->name, - &myOid, bPduType, (struct GenericTable *)ipRouteTable, + *pErrorStatus = getItemAndInstanceFromTable(&pVarBind->name, + &myOid, 4, bPduType, (struct GenericTable *)ipRouteTable, sizeof(MIB_IPFORWARDROW), oidToIpForwardRow, compareIpForwardRow, &item, &tableIndex); if (!*pErrorStatus) @@ -811,6 +807,11 @@ static void mib2IpNetInit(void) } } +static void mib2IpNetCleanup(void) +{ + HeapFree(GetProcessHeap(), 0, ipNetTable); +} + static BOOL mib2IpNetQuery(BYTE bPduType, SnmpVarBind *pVarBind, AsnInteger32 *pErrorStatus) { @@ -1037,17 +1038,119 @@ static BOOL mib2UdpQuery(BYTE bPduType, SnmpVarBind *pVarBind, return TRUE; } +static UINT mib2UdpEntry[] = { 1,3,6,1,2,1,7,5,1 }; +static PMIB_UDPTABLE udpTable; + +static void mib2UdpEntryInit(void) +{ + DWORD size = 0, ret = GetUdpTable(NULL, &size, TRUE); + + if (ret == ERROR_INSUFFICIENT_BUFFER) + { + udpTable = HeapAlloc(GetProcessHeap(), 0, size); + if (udpTable) + GetUdpTable(udpTable, &size, TRUE); + } +} + +static void mib2UdpEntryCleanup(void) +{ + HeapFree(GetProcessHeap(), 0, udpTable); +} + +static struct structToAsnValue mib2UdpEntryMap[] = { + { FIELD_OFFSET(MIB_UDPROW, dwLocalAddr), copyIpAddr }, + { FIELD_OFFSET(MIB_UDPROW, dwLocalPort), copyInt }, +}; + +static void oidToUdpRow(AsnObjectIdentifier *oid, void *dst) +{ + MIB_UDPROW *row = dst; + + assert(oid && oid->idLength >= 5); + row->dwLocalAddr = oidToIpAddr(oid); + row->dwLocalPort = oid->ids[4]; +} + +static int compareUdpRow(const void *a, const void *b) +{ + const MIB_UDPROW *key = a, *value = b; + int ret; + + ret = key->dwLocalAddr - value->dwLocalAddr; + if (ret == 0) + ret = key->dwLocalPort - value->dwLocalPort; + return ret; +} + +static BOOL mib2UdpEntryQuery(BYTE bPduType, SnmpVarBind *pVarBind, + AsnInteger32 *pErrorStatus) +{ + AsnObjectIdentifier myOid = DEFINE_OID(mib2UdpEntry); + + TRACE("(0x%02x, %s, %p)\n", bPduType, SnmpUtilOidToA(&pVarBind->name), + pErrorStatus); + + switch (bPduType) + { + case SNMP_PDU_GET: + case SNMP_PDU_GETNEXT: + if (!udpTable) + *pErrorStatus = SNMP_ERRORSTATUS_NOSUCHNAME; + else + { + UINT tableIndex = 0, item = 0; + + *pErrorStatus = getItemAndInstanceFromTable(&pVarBind->name, &myOid, + 5, bPduType, (struct GenericTable *)udpTable, + sizeof(MIB_UDPROW), oidToUdpRow, compareUdpRow, &item, + &tableIndex); + if (!*pErrorStatus) + { + assert(tableIndex); + assert(item); + *pErrorStatus = mapStructEntryToValue(mib2UdpEntryMap, + DEFINE_SIZEOF(mib2UdpEntryMap), + &udpTable->table[tableIndex - 1], item, bPduType, pVarBind); + if (!*pErrorStatus && bPduType == SNMP_PDU_GETNEXT) + { + AsnObjectIdentifier oid; + + setOidWithItemAndIpAddr(&pVarBind->name, &myOid, item, + udpTable->table[tableIndex - 1].dwLocalAddr); + oid.idLength = 1; + oid.ids = &udpTable->table[tableIndex - 1].dwLocalPort; + SnmpUtilOidAppend(&pVarBind->name, &oid); + } + } + } + break; + case SNMP_PDU_SET: + *pErrorStatus = SNMP_ERRORSTATUS_READONLY; + break; + default: + FIXME("0x%02x: unsupported PDU type\n", bPduType); + *pErrorStatus = SNMP_ERRORSTATUS_NOSUCHNAME; + } + return TRUE; +} + /* This list MUST BE lexicographically sorted */ static struct mibImplementation supportedIDs[] = { - { DEFINE_OID(mib2IfNumber), mib2IfNumberInit, mib2IfNumberQuery }, - { DEFINE_OID(mib2IfEntry), NULL, mib2IfEntryQuery }, - { DEFINE_OID(mib2Ip), mib2IpStatsInit, mib2IpStatsQuery }, - { DEFINE_OID(mib2IpAddr), mib2IpAddrInit, mib2IpAddrQuery }, - { DEFINE_OID(mib2IpRoute), mib2IpRouteInit, mib2IpRouteQuery }, - { DEFINE_OID(mib2IpNet), mib2IpNetInit, mib2IpNetQuery }, - { DEFINE_OID(mib2Icmp), mib2IcmpInit, mib2IcmpQuery }, - { DEFINE_OID(mib2Tcp), mib2TcpInit, mib2TcpQuery }, - { DEFINE_OID(mib2Udp), mib2UdpInit, mib2UdpQuery }, + { DEFINE_OID(mib2IfNumber), mib2IfNumberInit, mib2IfNumberQuery, + mib2IfNumberCleanup }, + { DEFINE_OID(mib2IfEntry), NULL, mib2IfEntryQuery, NULL }, + { DEFINE_OID(mib2Ip), mib2IpStatsInit, mib2IpStatsQuery, NULL }, + { DEFINE_OID(mib2IpAddr), mib2IpAddrInit, mib2IpAddrQuery, + mib2IpAddrCleanup }, + { DEFINE_OID(mib2IpRoute), mib2IpRouteInit, mib2IpRouteQuery, + mib2IpRouteCleanup }, + { DEFINE_OID(mib2IpNet), mib2IpNetInit, mib2IpNetQuery, mib2IpNetCleanup }, + { DEFINE_OID(mib2Icmp), mib2IcmpInit, mib2IcmpQuery, NULL }, + { DEFINE_OID(mib2Tcp), mib2TcpInit, mib2TcpQuery, NULL }, + { DEFINE_OID(mib2Udp), mib2UdpInit, mib2UdpQuery, NULL }, + { DEFINE_OID(mib2UdpEntry), mib2UdpEntryInit, mib2UdpEntryQuery, + mib2UdpEntryCleanup }, }; static UINT minSupportedIDLength; @@ -1073,6 +1176,15 @@ BOOL WINAPI SnmpExtensionInit(DWORD dwUptimeReference, return TRUE; } +static void cleanup(void) +{ + UINT i; + + for (i = 0; i < sizeof(supportedIDs) / sizeof(supportedIDs[0]); i++) + if (supportedIDs[i].cleanup) + supportedIDs[i].cleanup(); +} + static struct mibImplementation *findSupportedQuery(UINT *ids, UINT idLength, UINT *matchingIndex) { @@ -1169,3 +1281,22 @@ BOOL WINAPI SnmpExtensionQuery(BYTE bPduType, SnmpVarBindList *pVarBindList, *pErrorIndex = errorIndex; return TRUE; } + +BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) +{ + TRACE("(0x%p, %d, %p)\n", hinstDLL, fdwReason, lpvReserved); + + switch (fdwReason) + { + case DLL_PROCESS_ATTACH: + DisableThreadLibraryCalls(hinstDLL); + break; + case DLL_PROCESS_DETACH: + cleanup(); + break; + default: + break; + } + + return TRUE; +} diff --git a/reactos/dll/win32/mapi32/prop.c b/reactos/dll/win32/mapi32/prop.c index e30a83bb311..bd907911c82 100644 --- a/reactos/dll/win32/mapi32/prop.c +++ b/reactos/dll/win32/mapi32/prop.c @@ -1579,7 +1579,7 @@ static inline ULONG WINAPI IMAPIProp_fnRelease(LPMAPIPROP iface) * NOTES * - If this function succeeds, the returned information in *lppError must be * freed using MAPIFreeBuffer() once the caller is finished with it. - * - It is possible for this function to suceed and set *lppError to NULL, + * - It is possible for this function to succeed and set *lppError to NULL, * if there is no further information to report about hRes. */ static inline HRESULT WINAPI @@ -1598,7 +1598,7 @@ IMAPIProp_fnGetLastError(LPMAPIPROP iface, HRESULT hRes, /************************************************************************** * IMAPIProp_SaveChanges {MAPI32} * - * Update any changes made to a tansactional IMAPIProp object. + * Update any changes made to a transactional IMAPIProp object. * * PARAMS * iface [I] IMAPIProp object to update @@ -1701,7 +1701,7 @@ IMAPIProp_fnGetProps(LPMAPIPROP iface, LPSPropTagArray lpTags, * iface [I] IMAPIProp object to get the property tag list from * ulFlags [I] Return 0=Ascii MAPI_UNICODE=Unicode strings for * unspecified types - * lppTags [O] Destination for the retrieved peoperty tag list + * lppTags [O] Destination for the retrieved property tag list * * RETURNS * Success: S_OK. *lppTags contains the tags for all available properties. diff --git a/reactos/dll/win32/mlang/mlang.c b/reactos/dll/win32/mlang/mlang.c index a60ad706c6b..2f73f1f71a6 100644 --- a/reactos/dll/win32/mlang/mlang.c +++ b/reactos/dll/win32/mlang/mlang.c @@ -704,10 +704,13 @@ static inline INT lcid_to_rfc1766A( LCID lcid, LPSTR rfc1766, INT len ) static inline INT lcid_to_rfc1766W( LCID lcid, LPWSTR rfc1766, INT len ) { INT n = GetLocaleInfoW( lcid, LOCALE_SISO639LANGNAME, rfc1766, len ); + INT save = n; if (n) { rfc1766[n - 1] = '-'; n += GetLocaleInfoW( lcid, LOCALE_SISO3166CTRYNAME, rfc1766 + n, len - n ); + if (n == save) + rfc1766[n - 1] = '\0'; LCMapStringW( LOCALE_USER_DEFAULT, LCMAP_LOWERCASE, rfc1766, n, rfc1766, len ); return n; } diff --git a/reactos/dll/win32/mpr/mpr.rc b/reactos/dll/win32/mpr/mpr.rc index b866e6ee23a..1f1e32325f4 100644 --- a/reactos/dll/win32/mpr/mpr.rc +++ b/reactos/dll/win32/mpr/mpr.rc @@ -26,6 +26,7 @@ #include "mpr_Bg.rc" #include "mpr_Cs.rc" +#include "mpr_Da.rc" #include "mpr_De.rc" #include "mpr_En.rc" #include "mpr_Eo.rc" @@ -39,7 +40,9 @@ #include "mpr_No.rc" #include "mpr_Pl.rc" #include "mpr_Pt.rc" +#include "mpr_Ro.rc" #include "mpr_Ru.rc" +#include "mpr_Si.rc" #include "mpr_Sv.rc" #include "mpr_Tr.rc" #include "mpr_Uk.rc" diff --git a/reactos/dll/win32/mpr/mpr_Uk.rc b/reactos/dll/win32/mpr/mpr_Da.rc similarity index 68% rename from reactos/dll/win32/mpr/mpr_Uk.rc rename to reactos/dll/win32/mpr/mpr_Da.rc index c5181f11208..5b6f99fbd04 100644 --- a/reactos/dll/win32/mpr/mpr_Uk.rc +++ b/reactos/dll/win32/mpr/mpr_Da.rc @@ -1,7 +1,7 @@ /* - * MPR dll resources (Ukrainian) + * MPR dll resources for Danish * - * Copyright 2006 Artem Reznikov + * Copyright (C) 2008 Jens Albretsen * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -15,32 +15,32 @@ * * 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 + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT +LANGUAGE LANG_DANISH, SUBLANG_DEFAULT STRINGTABLE DISCARDABLE { - IDS_ENTIRENETWORK " " + IDS_ENTIRENETWORK "Hele netvrket" } IDD_PROXYDLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 250, 154 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION " " +CAPTION "Skriv netvrkskodeord" FONT 8, "MS Shell Dlg" { - LTEXT " , ' :", IDC_EXPLAIN, 40, 6, 150, 15 - LTEXT "", -1, 40, 26, 50, 10 + LTEXT "Skriv dit brugernavn og kodeord:", IDC_EXPLAIN, 40, 6, 150, 15 + LTEXT "Proxy", -1, 40, 26, 50, 10 /* LTEXT "Realm", -1, 40, 46, 50, 10 */ - LTEXT "", -1, 40, 66, 50, 10 - LTEXT "", -1, 40, 86, 50, 10 + LTEXT "Brugernavn", -1, 40, 66, 50, 10 + LTEXT "Kodeord", -1, 40, 86, 50, 10 LTEXT "" IDC_PROXY, 80, 26, 150, 14, 0 LTEXT "" IDC_REALM, 80, 46, 150, 14, 0 EDITTEXT IDC_USERNAME, 80, 66, 150, 14, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP EDITTEXT IDC_PASSWORD, 80, 86, 150, 14, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP | ES_PASSWORD - CHECKBOX "& ()", IDC_SAVEPASSWORD, + CHECKBOX "Gem dette ko&deord (usikkert)", IDC_SAVEPASSWORD, 80, 106, 150, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP PUSHBUTTON "OK", IDOK, 98, 126, 56, 14, WS_GROUP | WS_TABSTOP | BS_DEFPUSHBUTTON - PUSHBUTTON "", IDCANCEL, 158, 126, 56, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "Annuller", IDCANCEL, 158, 126, 56, 14, WS_GROUP | WS_TABSTOP } diff --git a/reactos/dll/win32/mpr/mpr_Ro.rc b/reactos/dll/win32/mpr/mpr_Ro.rc new file mode 100644 index 00000000000..ce06328ef80 --- /dev/null +++ b/reactos/dll/win32/mpr/mpr_Ro.rc @@ -0,0 +1,48 @@ +/* + * Copyright (C) 2004 Juan Lang + * Copyright (C) 2008 Michael Stefaniuc + * + * 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 + */ + +LANGUAGE LANG_ROMANIAN, SUBLANG_NEUTRAL + +#pragma code_page(65001) + +STRINGTABLE DISCARDABLE +{ + IDS_ENTIRENETWORK "Toată rețeaua" +} + +IDD_PROXYDLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 250, 154 +STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Introducere parolă de rețea" +FONT 8, "MS Shell Dlg" +{ + LTEXT "Introduceți numele de utilizator și parola:", IDC_EXPLAIN, 40, 6, 150, 15 + LTEXT "Proxy", -1, 40, 26, 50, 10 + LTEXT "Utilizator", -1, 40, 66, 50, 10 + LTEXT "Parolă", -1, 40, 86, 50, 10 + LTEXT "" IDC_PROXY, 80, 26, 150, 14, 0 + LTEXT "" IDC_REALM, 80, 46, 150, 14, 0 + EDITTEXT IDC_USERNAME, 80, 66, 150, 14, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP + EDITTEXT IDC_PASSWORD, 80, 86, 150, 14, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP | ES_PASSWORD + CHECKBOX "&Salvează această parolă (nesigur)", IDC_SAVEPASSWORD, + 80, 106, 150, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP + PUSHBUTTON "OK", IDOK, 98, 126, 56, 14, WS_GROUP | WS_TABSTOP | BS_DEFPUSHBUTTON + PUSHBUTTON "Renunță", IDCANCEL, 158, 126, 56, 14, WS_GROUP | WS_TABSTOP +} + +#pragma code_page(default) diff --git a/reactos/dll/win32/mpr/mpr_Si.rc b/reactos/dll/win32/mpr/mpr_Si.rc new file mode 100644 index 00000000000..064bf525978 --- /dev/null +++ b/reactos/dll/win32/mpr/mpr_Si.rc @@ -0,0 +1,50 @@ +/* + * MPR dll resources + * + * Copyright (C) 2008 Rok Mandeljc + * + * 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 + */ + +#pragma code_page(65001) + +LANGUAGE LANG_SLOVENIAN, SUBLANG_DEFAULT + +STRINGTABLE DISCARDABLE +{ + IDS_ENTIRENETWORK "Celotno omrežje" +} + +IDD_PROXYDLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 250, 154 +STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Vnesite omrežno geslo" +FONT 8, "MS Shell Dlg" +{ + LTEXT "Vnesite uporabniško ime in geslo:", IDC_EXPLAIN, 40, 6, 150, 15 + LTEXT "Proksi", -1, 40, 26, 50, 10 +/* LTEXT "Kraljestvo", -1, 40, 46, 50, 10 */ + LTEXT "Uporabniško ime", -1, 40, 66, 50, 10 + LTEXT "Geslo", -1, 40, 86, 50, 10 + LTEXT "" IDC_PROXY, 80, 26, 150, 14, 0 + LTEXT "" IDC_REALM, 80, 46, 150, 14, 0 + EDITTEXT IDC_USERNAME, 80, 66, 150, 14, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP + EDITTEXT IDC_PASSWORD, 80, 86, 150, 14, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP | ES_PASSWORD + CHECKBOX "&Shrani geslo (nezaščiteno)", IDC_SAVEPASSWORD, + 80, 106, 150, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP + PUSHBUTTON "V redu", IDOK, 98, 126, 56, 14, WS_GROUP | WS_TABSTOP | BS_DEFPUSHBUTTON + PUSHBUTTON "Prekliči", IDCANCEL, 158, 126, 56, 14, WS_GROUP | WS_TABSTOP +} + +#pragma code_page(default) diff --git a/reactos/dll/win32/mpr/mpr_Sv.rc b/reactos/dll/win32/mpr/mpr_Sv.rc index 3a0e4236da6..ef6a685c44d 100644 --- a/reactos/dll/win32/mpr/mpr_Sv.rc +++ b/reactos/dll/win32/mpr/mpr_Sv.rc @@ -18,7 +18,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -LANGUAGE LANG_SWEDISH, SUBLANG_DEFAULT +LANGUAGE LANG_SWEDISH, SUBLANG_NEUTRAL STRINGTABLE DISCARDABLE { diff --git a/reactos/dll/win32/mpr/nps.c b/reactos/dll/win32/mpr/nps.c index 2f75674b903..f8a143363f2 100644 --- a/reactos/dll/win32/mpr/nps.c +++ b/reactos/dll/win32/mpr/nps.c @@ -76,14 +76,10 @@ static INT_PTR WINAPI NPS_ProxyPasswordDialog( case WM_COMMAND: if( wParam == IDOK ) { - WCHAR username[0x20], password[0x20]; - - username[0] = 0; hitem = GetDlgItem( hdlg, IDC_USERNAME ); if( hitem ) GetWindowTextA( hitem, lpAuthDlgStruct->lpUsername, lpAuthDlgStruct->cbUsername ); - - password[0] = 0; + hitem = GetDlgItem( hdlg, IDC_PASSWORD ); if( hitem ) GetWindowTextA( hitem, lpAuthDlgStruct->lpPassword, lpAuthDlgStruct->cbPassword ); diff --git a/reactos/dll/win32/mpr/wnet.c b/reactos/dll/win32/mpr/wnet.c index 32bc255820c..bf4ddb85807 100644 --- a/reactos/dll/win32/mpr/wnet.c +++ b/reactos/dll/win32/mpr/wnet.c @@ -1312,6 +1312,7 @@ DWORD WINAPI WNetGetResourceInformationA( LPNETRESOURCEA lpNetResource, ret = _thunkNetResourceArrayAToW(lpNetResource, &count, lpNetResourceW, &size); if (ret == WN_MORE_DATA) { + HeapFree(GetProcessHeap(), 0, lpNetResourceW); lpNetResourceW = HeapAlloc(GetProcessHeap(), 0, size); if (lpNetResourceW) ret = _thunkNetResourceArrayAToW(lpNetResource, @@ -1343,6 +1344,7 @@ DWORD WINAPI WNetGetResourceInformationA( LPNETRESOURCEA lpNetResource, { ret = _thunkNetResourceArrayWToA(lpBufferW, &count, lpBuffer, cbBuffer); + HeapFree(GetProcessHeap(), 0, lpNetResourceW); lpNetResourceW = lpBufferW; size = sizeof(NETRESOURCEA); size += WideCharToMultiByte(CP_ACP, 0, lpNetResourceW->lpRemoteName,