Autosyncing with Wine HEAD
authorAleksey Bragin <aleksey@reactos.org>
Mon, 7 Jul 2008 12:32:35 +0000 (12:32 +0000)
committerAleksey Bragin <aleksey@reactos.org>
Mon, 7 Jul 2008 12:32:35 +0000 (12:32 +0000)
svn path=/trunk/; revision=34354

24 files changed:
reactos/dll/win32/hhctrl.ocx/Da.rc [new file with mode: 0644]
reactos/dll/win32/hhctrl.ocx/En.rc
reactos/dll/win32/hhctrl.ocx/Ru.rc
reactos/dll/win32/hhctrl.ocx/Si.rc [new file with mode: 0644]
reactos/dll/win32/hhctrl.ocx/Sv.rc
reactos/dll/win32/hhctrl.ocx/chm.c
reactos/dll/win32/hhctrl.ocx/help.c
reactos/dll/win32/hhctrl.ocx/hhctrl.c
reactos/dll/win32/hhctrl.ocx/hhctrl.rc
reactos/dll/win32/hlink/extserv.c
reactos/dll/win32/hlink/hlink_main.c
reactos/dll/win32/inetcomm/inetcomm.rbuild
reactos/dll/win32/inetcomm/mimeole.c
reactos/dll/win32/inetmib1/inetmib1.rbuild
reactos/dll/win32/inetmib1/main.c
reactos/dll/win32/mapi32/prop.c
reactos/dll/win32/mlang/mlang.c
reactos/dll/win32/mpr/mpr.rc
reactos/dll/win32/mpr/mpr_Da.rc [moved from reactos/dll/win32/mpr/mpr_Uk.rc with 68% similarity]
reactos/dll/win32/mpr/mpr_Ro.rc [new file with mode: 0644]
reactos/dll/win32/mpr/mpr_Si.rc [new file with mode: 0644]
reactos/dll/win32/mpr/mpr_Sv.rc
reactos/dll/win32/mpr/nps.c
reactos/dll/win32/mpr/wnet.c

diff --git a/reactos/dll/win32/hhctrl.ocx/Da.rc b/reactos/dll/win32/hhctrl.ocx/Da.rc
new file mode 100644 (file)
index 0000000..e425ef0
--- /dev/null
@@ -0,0 +1,58 @@
+/*
+ * HTML Help resources
+ * Danish Language Support
+ *
+ * Copyright 2008 Jens Albretsen <jens@albretsen.dk>
+ *
+ * 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       "&Søg"
+    IDS_FAVORITES    "Favor&itter"
+END
+
+STRINGTABLE
+BEGIN
+    IDTB_EXPAND      "Vis"
+    IDTB_CONTRACT    "Skjul"
+    IDTB_STOP        "Stop"
+    IDTB_REFRESH     "Opdatér"
+    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        "Forstør"
+    IDTB_TOC_NEXT    "IDTB_TOC_NEXT"
+    IDTB_TOC_PREV    "IDTB_TOC_PREV"
+END
index e55162a..83917f6 100644 (file)
@@ -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
index 4333033..a530f80 100644 (file)
@@ -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 (file)
index 0000000..c8ea447
--- /dev/null
@@ -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)
index 43b421c..cb3e4e2 100644 (file)
@@ -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
index ece05f0..699fa04 100644 (file)
@@ -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)) {
index 3ee522e..a2081ce 100644 (file)
@@ -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);
index 472b7cf..a224b64 100644 (file)
@@ -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(!index)
+            index = info->WinType.pszFile;
 
-        if (info)
+        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;
index 2c195d4..08d9648 100644 (file)
@@ -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"
index daedf9e..c4e95ab 100644 (file)
@@ -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);
-
-    if(pwzAdditionalHeaders)
-        len = strlenW(pwzAdditionalHeaders);
+    ret->headers = NULL;
+    ret->hwnd = NULL;
+    ret->username = NULL;
+    ret->password = NULL;
 
-    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);
index 43e9e7f..213506e 100644 (file)
@@ -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.@)
index a01db12..428f45b 100644 (file)
@@ -1,23 +1,26 @@
-<module name="inetcomm" type="win32dll" baseaddress="${BASEADDRESS_INETCOMM}" installbase="system32" installname="inetcomm.dll" allowwarnings="true" entrypoint="0">
-        <importlibrary definition="inetcomm.spec.def" />
-        <include base="inetcomm">.</include>
-        <include base="ReactOS">include/reactos/wine</include>
-        <define name="__WINESRC__" />
-        <define name="__USE_W32API" />
-        <define name="_WIN32_IE">0x600</define>
-        <define name="_WIN32_WINNT">0x600</define>
-        <define name="WINVER">0x600</define>
-        <library>wine</library>
-        <library>uuid</library>
-        <library>ole32</library>
-        <library>ws2_32</library>
-        <library>user32</library>
-        <library>advapi32</library>
-        <library>kernel32</library>
-        <library>ntdll</library>
-        <file>inetcomm_main.c</file>
-        <file>internettransport.c</file>
-        <file>mimeole.c</file>
-        <file>regsvr.c</file>
-        <file>inetcomm.spec</file>
+<?xml version="1.0"?>
+<!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd">
+<group>
+<module name="inetcomm" type="win32dll" baseaddress="${BASEADDRESS_INETCOMM}" installbase="system32" installname="inetcomm.dll" allowwarnings="true">
+       <autoregister infsection="OleControlDlls" type="DllRegisterServer" />
+       <importlibrary definition="inetcomm.spec.def" />
+       <include base="inetcomm">.</include>
+       <include base="ReactOS">include/reactos/wine</include>
+       <define name="__WINESRC__" />
+       <define name="WINVER">0x600</define>
+       <define name="_WIN32_WINNT">0x600</define>
+       <file>inetcomm_main.c</file>
+       <file>internettransport.c</file>
+       <file>mimeole.c</file>
+       <file>regsvr.c</file>
+       <file>inetcomm.spec</file>
+       <library>wine</library>
+       <library>uuid</library>
+       <library>ole32</library>
+       <library>ws2_32</library>
+       <library>user32</library>
+       <library>advapi32</library>
+       <library>kernel32</library>
+       <library>ntdll</library>
 </module>
+</group>
index ee03e92..7e9d709 100644 (file)
@@ -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);
index 080c466..ad685b8 100644 (file)
@@ -1,17 +1,19 @@
-<module name="inetmib1" type="win32dll" baseaddress="${BASEADDRESS_INETMIB1}" installbase="system32" installname="inetmib1.dll" allowwarnings="true" entrypoint="0">
-        <importlibrary definition="inetmib1.spec.def" />
-        <include base="inetmib1">.</include>
-        <include base="ReactOS">include/reactos/wine</include>
-        <define name="__WINESRC__" />
-        <define name="__USE_W32API" />
-        <define name="_WIN32_IE">0x600</define>
-        <define name="_WIN32_WINNT">0x501</define>
-        <define name="WINVER">0x501</define>
-        <library>wine</library>
-        <library>snmpapi</library>
-        <library>kernel32</library>
-        <library>iphlpapi</library>
-        <library>ntdll</library>
-        <file>main.c</file>
-        <file>inetmib1.spec</file>
+<?xml version="1.0"?>
+<!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd">
+<group>
+<module name="inetmib1" type="win32dll" baseaddress="${BASEADDRESS_INETMIB1}" installbase="system32" installname="inetmib1.dll" allowwarnings="true">
+       <importlibrary definition="inetmib1.spec.def" />
+       <include base="inetmib1">.</include>
+       <include base="ReactOS">include/reactos/wine</include>
+       <define name="__WINESRC__" />
+       <define name="WINVER">0x600</define>
+       <define name="_WIN32_WINNT">0x600</define>
+       <file>main.c</file>
+       <file>inetmib1.spec</file>
+       <library>wine</library>
+       <library>snmpapi</library>
+       <library>kernel32</library>
+       <library>iphlpapi</library>
+       <library>ntdll</library>
 </module>
+</group>
index 20fc0b9..09b408c 100644 (file)
 
 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;
+}
index e30a83b..bd90791 100644 (file)
@@ -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.
index a60ad70..2f73f1f 100644 (file)
@@ -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;
     }
index b866e6e..1f1e323 100644 (file)
@@ -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"
similarity index 68%
rename from reactos/dll/win32/mpr/mpr_Uk.rc
rename to reactos/dll/win32/mpr/mpr_Da.rc
index c5181f1..5b6f99f 100644 (file)
@@ -1,7 +1,7 @@
 /*
- * MPR dll resources (Ukrainian)
+ * MPR dll resources for Danish
  *
- * Copyright 2006 Artem Reznikov
+ * Copyright (C) 2008 Jens Albretsen <jens@albretsen.dk>
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
  *
  * 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 netværket"
 }
 
 IDD_PROXYDLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 250, 154
 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
-CAPTION "Ââåä³òü Ìåðåæíèé Ïàðîëü"
+CAPTION "Skriv netværkskodeord"
 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 (file)
index 0000000..ce06328
--- /dev/null
@@ -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 (file)
index 0000000..064bf52
--- /dev/null
@@ -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)
index 3a0e423..ef6a685 100644 (file)
@@ -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
 {
index 2f75674..f8a1433 100644 (file)
@@ -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 );
index 32bc255..bf4ddb8 100644 (file)
@@ -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,