Author: hbelusca
Date: Sat Jun 3 16:35:45 2017
New Revision: 74767
URL:
http://svn.reactos.org/svn/reactos?rev=74767&view=rev
Log:
Sync to trunk r74766.
Modified:
branches/setup_improvements/ (props changed)
branches/setup_improvements/boot/bootdata/hivesys.inf
branches/setup_improvements/dll/win32/kernel32/client/appcache.c
branches/setup_improvements/dll/win32/mswsock/mswhelper.c
branches/setup_improvements/dll/win32/mswsock/mswhelper.h
branches/setup_improvements/dll/win32/mswsock/nsplookup.c
branches/setup_improvements/dll/win32/netapi32/netapi32.spec
branches/setup_improvements/dll/win32/netapi32/share.c
branches/setup_improvements/dll/win32/netapi32/srvsvc.c
branches/setup_improvements/dll/win32/shell32/shellmenu/CMenuDeskBar.cpp
branches/setup_improvements/dll/win32/shell32/shellmenu/CMenuDeskBar.h
branches/setup_improvements/sdk/include/psdk/asptlb.idl
branches/setup_improvements/win32ss/printing/providers/localspl/printers.c
Propchange: branches/setup_improvements/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Jun 3 16:35:45 2017
@@ -23,4 +23,4 @@
/branches/usb-bringup:51335,51337,51341-51343,51348,51350,51353,51355,51365-51369,51372,51384-54388,54396-54398,54736-54737,54752-54754,54756-54760,54762,54764-54765,54767-54768,54772,54774-54777,54781,54787,54790-54792,54797-54798,54806,54808,54834-54838,54843,54850,54852,54856,54858-54859
/branches/usb-bringup-trunk:55019-55543,55548-55554,55556-55567
/branches/wlan-bringup:54809-54998
-/trunk/reactos:74526-74743
+/trunk/reactos:74526-74766
Modified: branches/setup_improvements/boot/bootdata/hivesys.inf
URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/boot/bootdat…
==============================================================================
--- branches/setup_improvements/boot/bootdata/hivesys.inf [iso-8859-1] (original)
+++ branches/setup_improvements/boot/bootdata/hivesys.inf [iso-8859-1] Sat Jun 3 16:35:45
2017
@@ -338,6 +338,23 @@
HKLM,"SYSTEM\CurrentControlSet\Control\FileSystem","Win95TruncatedExtensions",0x00010001,1
; Device classes (this list is incomplete... and should be generated from .inf files
during installation)
+HKLM,"SYSTEM\CurrentControlSet\Control\Class\{36FC9E60-C465-11CF-8056-444553540000}",,0x00000000,"Universal
Serial Bus controllers"
+HKLM,"SYSTEM\CurrentControlSet\Control\Class\{36FC9E60-C465-11CF-8056-444553540000}","Class",0x00000000,"USB"
+HKLM,"SYSTEM\CurrentControlSet\Control\Class\{36FC9E60-C465-11CF-8056-444553540000}","Icon",0x00000000,"-20"
+HKLM,"SYSTEM\CurrentControlSet\Control\Class\{36FC9E60-C465-11CF-8056-444553540000}","NoInstallClass",0x00000000,"1"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Class\{4D36E96B-E325-11CE-BFC1-08002BE10318}",,0x00000000,"Keyboard"
+HKLM,"SYSTEM\CurrentControlSet\Control\Class\{4D36E96B-E325-11CE-BFC1-08002BE10318}","Class",0x00000000,"Keyboard"
+HKLM,"SYSTEM\CurrentControlSet\Control\Class\{4D36E96B-E325-11CE-BFC1-08002BE10318}","Icon",0x00000000,"-3"
+HKLM,"SYSTEM\CurrentControlSet\Control\Class\{4D36E96B-E325-11CE-BFC1-08002BE10318}","Installer32",0x00000000,"SysSetup.Dll,KeyboardClassInstaller"
+HKLM,"SYSTEM\CurrentControlSet\Control\Class\{4D36E96B-E325-11CE-BFC1-08002BE10318}","NoInstallClass",0x00000000,"1"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Class\{4D36E96F-E325-11CE-BFC1-08002BE10318}",,0x00000000,"Mouse"
+HKLM,"SYSTEM\CurrentControlSet\Control\Class\{4D36E96F-E325-11CE-BFC1-08002BE10318}","Class",0x00000000,"Mouse"
+HKLM,"SYSTEM\CurrentControlSet\Control\Class\{4D36E96F-E325-11CE-BFC1-08002BE10318}","Icon",0x00000000,"-2"
+HKLM,"SYSTEM\CurrentControlSet\Control\Class\{4D36E96F-E325-11CE-BFC1-08002BE10318}","Installer32",0x00000000,"SysSetup.Dll,MouseClassInstaller"
+HKLM,"SYSTEM\CurrentControlSet\Control\Class\{4D36E96F-E325-11CE-BFC1-08002BE10318}","NoInstallClass",0x00000000,"1"
+
HKLM,"SYSTEM\CurrentControlSet\Control\Class\{4D36E973-E325-11CE-BFC1-08002BE10318}",,0x00000000,"Network
Client"
HKLM,"SYSTEM\CurrentControlSet\Control\Class\{4D36E973-E325-11CE-BFC1-08002BE10318}","Class",0x00000000,"NetClient"
HKLM,"SYSTEM\CurrentControlSet\Control\Class\{4D36E973-E325-11CE-BFC1-08002BE10318}","Icon",0x00000000,"-7"
@@ -358,6 +375,10 @@
HKLM,"SYSTEM\CurrentControlSet\Control\Class\{4D36E975-E325-11CE-BFC1-08002BE10318}","Installer32",0x00000000,"NetCfgx.dll,NetClassInstaller"
HKLM,"SYSTEM\CurrentControlSet\Control\Class\{4D36E975-E325-11CE-BFC1-08002BE10318}","NoDisplayClass",0x00000000,"1"
HKLM,"SYSTEM\CurrentControlSet\Control\Class\{4D36E975-E325-11CE-BFC1-08002BE10318}","NoInstallClass",0x00000000,"1"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Class\{4D36E97D-E325-11CE-BFC1-08002BE10318}",,0x00000000,"System
Devices"
+HKLM,"SYSTEM\CurrentControlSet\Control\Class\{4D36E97D-E325-11CE-BFC1-08002BE10318}","Class",0x00000000,"System"
+HKLM,"SYSTEM\CurrentControlSet\Control\Class\{4D36E97D-E325-11CE-BFC1-08002BE10318}","Icon",0x00000000,"-27"
HKLM,"SYSTEM\CurrentControlSet\Control\Class\{9D6D66A6-0B0C-4563-9077-A0E9A7955AE4}",,0x00000000,"Ramdisk"
HKLM,"SYSTEM\CurrentControlSet\Control\Class\{9D6D66A6-0B0C-4563-9077-A0E9A7955AE4}","Class",0x00000000,"Ramdisk"
Modified: branches/setup_improvements/dll/win32/kernel32/client/appcache.c
URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/dll/win32/ke…
==============================================================================
--- branches/setup_improvements/dll/win32/kernel32/client/appcache.c [iso-8859-1]
(original)
+++ branches/setup_improvements/dll/win32/kernel32/client/appcache.c [iso-8859-1] Sat Jun
3 16:35:45 2017
@@ -15,7 +15,7 @@
/* GLOBALS ********************************************************************/
-ULONG g_ShimsEnabled = -1;
+ULONG g_ShimsDisabled = -1;
static BOOL g_ApphelpInitialized = FALSE;
static PVOID g_pApphelpCheckRunAppEx;
static PVOID g_pSdbPackAppCompatData;
@@ -54,8 +54,10 @@
* This is a TROOLEAN, -1 means we haven't yet figured it out.
* 0 means shims are enabled, and 1 means shims are disabled!
*/
- if (g_ShimsEnabled == -1)
- {
+ if (g_ShimsDisabled == -1)
+ {
+ ULONG DisableShims = FALSE;
+
/* Open the safe mode key */
Status = NtOpenKey(&KeyHandle, KEY_QUERY_VALUE, &OptionKeyAttributes);
if (NT_SUCCESS(Status))
@@ -74,66 +76,63 @@
(KeyInfo.Data[0] == TRUE))
{
/* It is, so disable shims! */
- g_ShimsEnabled = TRUE;
+ DisableShims = TRUE;
}
- else
+ }
+
+ if (!DisableShims)
+ {
+ /* Open the app compatibility engine settings key */
+ Status = NtOpenKey(&KeyHandle, KEY_QUERY_VALUE,
&AppCompatKeyAttributes);
+ if (NT_SUCCESS(Status))
{
- /* Open the app compatibility engine settings key */
- Status = NtOpenKey(&KeyHandle, KEY_QUERY_VALUE,
&AppCompatKeyAttributes);
- if (NT_SUCCESS(Status))
+ /* Check if the app compat engine is turned off */
+ Status = NtQueryValueKey(KeyHandle,
+ &DisableAppCompat,
+ KeyValuePartialInformation,
+ &KeyInfo,
+ sizeof(KeyInfo),
+ &ResultLength);
+ NtClose(KeyHandle);
+ if ((NT_SUCCESS(Status)) &&
+ (KeyInfo.Type == REG_DWORD) &&
+ (KeyInfo.DataLength == sizeof(ULONG)) &&
+ (KeyInfo.Data[0] == TRUE))
{
- /* Check if the app compat engine is turned off */
- Status = NtQueryValueKey(KeyHandle,
- &DisableAppCompat,
- KeyValuePartialInformation,
- &KeyInfo,
- sizeof(KeyInfo),
- &ResultLength);
- NtClose(KeyHandle);
- if ((NT_SUCCESS(Status)) &&
- (KeyInfo.Type == REG_DWORD) &&
- (KeyInfo.DataLength == sizeof(ULONG)) &&
- (KeyInfo.Data[0] == TRUE))
- {
- /* It is, so disable shims! */
- g_ShimsEnabled = TRUE;
- }
- else
- {
- /* Finally, open the app compatibility policy key */
- Status = NtOpenKey(&KeyHandle, KEY_QUERY_VALUE,
&PolicyKeyAttributes);
- if (NT_SUCCESS(Status))
- {
- /* Check if the system policy disables app compat */
- Status = NtQueryValueKey(KeyHandle,
- &DisableEngine,
- KeyValuePartialInformation,
- &KeyInfo,
- sizeof(KeyInfo),
- &ResultLength);
- NtClose(KeyHandle);
- if ((NT_SUCCESS(Status)) &&
- (KeyInfo.Type == REG_DWORD) &&
- (KeyInfo.DataLength == sizeof(ULONG)) &&
- (KeyInfo.Data[0] == TRUE))
- {
- /* It does, so disable shims! */
- g_ShimsEnabled = TRUE;
- }
- else
- {
- /* No keys are set, so enable shims! */
- g_ShimsEnabled = FALSE;
- }
- }
- }
+ /* It is, so disable shims! */
+ DisableShims = TRUE;
}
}
}
+ if (!DisableShims)
+ {
+ /* Finally, open the app compatibility policy key */
+ Status = NtOpenKey(&KeyHandle, KEY_QUERY_VALUE,
&PolicyKeyAttributes);
+ if (NT_SUCCESS(Status))
+ {
+ /* Check if the system policy disables app compat */
+ Status = NtQueryValueKey(KeyHandle,
+ &DisableEngine,
+ KeyValuePartialInformation,
+ &KeyInfo,
+ sizeof(KeyInfo),
+ &ResultLength);
+ NtClose(KeyHandle);
+ if ((NT_SUCCESS(Status)) &&
+ (KeyInfo.Type == REG_DWORD) &&
+ (KeyInfo.DataLength == sizeof(ULONG)) &&
+ (KeyInfo.Data[0] == TRUE))
+ {
+ /* It does, so disable shims! */
+ DisableShims = TRUE;
+ }
+ }
+ }
+ g_ShimsDisabled = DisableShims;
}
/* Return if shims are disabled or not ("Enabled == 1" means disabled!) */
- return g_ShimsEnabled ? TRUE : FALSE;
+ return g_ShimsDisabled ? TRUE : FALSE;
}
/*
Modified: branches/setup_improvements/dll/win32/mswsock/mswhelper.c
URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/dll/win32/ms…
==============================================================================
--- branches/setup_improvements/dll/win32/mswsock/mswhelper.c [iso-8859-1] (original)
+++ branches/setup_improvements/dll/win32/mswsock/mswhelper.c [iso-8859-1] Sat Jun 3
16:35:45 2017
@@ -423,7 +423,7 @@
return NULL;
}
- ret = MultiByteToWideChar(1252,
+ ret = MultiByteToWideChar(CP_ACP,
0,
aStr,
aStrByteLen,
@@ -464,7 +464,7 @@
return NULL;
}
- ret = WideCharToMultiByte(1252,
+ ret = WideCharToMultiByte(CP_ACP,
0,
wStr,
charLen,
@@ -553,7 +553,7 @@
if (aCount >= MAX_ARRAY_SIZE)
return NULL;
- bItmLen = (strlen(*aSrcPtr) + 1) * sizeof(char);
+ bItmLen = strlen(*aSrcPtr) + 1;
aStrByteLen[aCount] = bItmLen;
bLen += sizeof(*aSrcPtr) + bItmLen;
@@ -591,3 +591,93 @@
return resA;
}
+
+char**
+StrAryCpyHeapAllocWToA(_In_opt_ HANDLE hHeap,
+ _In_ WCHAR** wStrAry)
+{
+ WCHAR** wSrcPtr;
+ char** aDstPtr;
+ char* aDstNextStr;
+ DWORD aStrByteLen[MAX_ARRAY_SIZE];
+ int bLen;
+ int bItmLen;
+ int aCount;
+ int i1;
+ char** resA;
+ int ret;
+ char* aStr;
+
+ if (hHeap == 0)
+ hHeap = GetProcessHeap();
+
+ /* Calculating size of array ... */
+ wSrcPtr = wStrAry;
+ bLen = 0;
+ aCount = 0;
+
+ while (*wSrcPtr != NULL)
+ {
+ if (aCount >= MAX_ARRAY_SIZE)
+ return NULL;
+
+ bItmLen = wcslen(*wSrcPtr) + 1;
+ aStrByteLen[aCount] = bItmLen;
+
+ bLen += sizeof(*wSrcPtr) + bItmLen;
+
+ wSrcPtr++;
+ aCount++;
+ }
+
+ /* size for NULL-terminator */
+ bLen += sizeof(*wSrcPtr);
+
+ /* get memory */
+ resA = HeapAlloc(hHeap, 0, bLen);
+
+ /* copy data */
+ wSrcPtr = wStrAry;
+ aDstPtr = resA;
+
+ /* pos for the first string */
+ aDstNextStr = (char*)(resA + aCount + 1);
+ for (i1 = 0; i1 < aCount; i1++)
+ {
+ bItmLen = aStrByteLen[i1];
+
+ *aDstPtr = aDstNextStr;
+
+ aStr = HeapAlloc(hHeap, 0, bItmLen);
+ if (aStr == NULL)
+ {
+ HeapFree(hHeap, 0, aStr);
+ return NULL;
+ }
+
+ ret = WideCharToMultiByte(CP_ACP,
+ 0,
+ *wSrcPtr,
+ bItmLen,
+ aStr,
+ bItmLen,
+ NULL,
+ NULL);
+ if (ret != bItmLen)
+ {
+ HeapFree(hHeap, 0, aStr);
+ return NULL;
+ }
+ RtlCopyMemory(*aDstPtr, aStr, bItmLen);
+ HeapFree(hHeap, 0, aStr);
+
+ aDstNextStr = (char*)((DWORD)aDstNextStr + (DWORD)bItmLen);
+ aDstPtr++;
+ wSrcPtr++;
+ }
+
+ /* terminate with NULL */
+ *aDstPtr = NULL;
+
+ return resA;
+}
Modified: branches/setup_improvements/dll/win32/mswsock/mswhelper.h
URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/dll/win32/ms…
==============================================================================
--- branches/setup_improvements/dll/win32/mswsock/mswhelper.h [iso-8859-1] (original)
+++ branches/setup_improvements/dll/win32/mswsock/mswhelper.h [iso-8859-1] Sat Jun 3
16:35:45 2017
@@ -117,4 +117,13 @@
_In_opt_ HANDLE hHeap,
_In_ char** aStrAry);
+/* strary:
+ ptr1 ... ptrn \0
+ data1 ... datan
+*/
+char**
+StrAryCpyHeapAllocWToA(
+ _In_opt_ HANDLE hHeap,
+ _In_ WCHAR** aStrAry);
+
#endif // _MSWHELPER_H
Modified: branches/setup_improvements/dll/win32/mswsock/nsplookup.c
URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/dll/win32/ms…
==============================================================================
--- branches/setup_improvements/dll/win32/mswsock/nsplookup.c [iso-8859-1] (original)
+++ branches/setup_improvements/dll/win32/mswsock/nsplookup.c [iso-8859-1] Sat Jun 3
16:35:45 2017
@@ -469,12 +469,14 @@
_Out_ PWSHOSTINFOINTERN hostinfo)
{
HANDLE hHeap = GetProcessHeap();
- DNS_STATUS dns_status = {0};
+ DNS_STATUS dns_status = { 0 };
/* include/WinDNS.h -- look up DNS_RECORD on MSDN */
- PDNS_RECORD dp;
- PDNS_RECORD curr;
+ PDNS_RECORDW dp;
+ PDNS_RECORDW curr;
INT result = ERROR_SUCCESS;
DWORD dwQueryFlags = DNS_QUERY_STANDARD;
+ PWCHAR Aliases[WS2_INTERNAL_MAX_ALIAS] = { 0 };
+ int AliasIndex = 0;
/* needed to be cleaned up if != NULL */
dp = NULL;
@@ -492,13 +494,12 @@
/* DNS_TYPE_A: include/WinDNS.h */
/* DnsQuery -- lib/dnsapi/dnsapi/query.c */
- dns_status = DnsQuery(data->hostnameW,
- DNS_TYPE_A,
- dwQueryFlags,
- /* extra dns servers */ 0,
- &dp,
- 0);
-
+ dns_status = DnsQuery_W(data->hostnameW,
+ DNS_TYPE_A,
+ dwQueryFlags,
+ NULL /* extra dns servers */,
+ &dp,
+ NULL);
if (dns_status == ERROR_INVALID_NAME)
{
WSASetLastError(WSAEFAULT);
@@ -517,7 +518,10 @@
curr = dp;
while ((curr->pNext != NULL) || (curr->wType != DNS_TYPE_A))
{
- /* FIXME build aliases list */
+ if (curr->wType == DNS_TYPE_CNAME)
+ {
+ Aliases[AliasIndex++] = curr->Data.Cname.pNameHost;
+ }
curr = curr->pNext;
}
@@ -526,10 +530,12 @@
result = WSASERVICE_NOT_FOUND;
goto cleanup;
}
-
hostinfo->hostnameW = StrCpyHeapAllocW(hHeap, curr->pName);
hostinfo->addr4 = curr->Data.A.IpAddress;
- /* FIXME attach built aliases list */
+ if (AliasIndex)
+ {
+ hostinfo->servaliasesA = StrAryCpyHeapAllocWToA(hHeap,
(WCHAR**)&Aliases);
+ }
result = ERROR_SUCCESS;
cleanup:
Modified: branches/setup_improvements/dll/win32/netapi32/netapi32.spec
URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/dll/win32/ne…
==============================================================================
--- branches/setup_improvements/dll/win32/netapi32/netapi32.spec [iso-8859-1] (original)
+++ branches/setup_improvements/dll/win32/netapi32/netapi32.spec [iso-8859-1] Sat Jun 3
16:35:45 2017
@@ -225,13 +225,13 @@
@ stub NetSessionGetInfo
@ stub NetSetPrimaryComputerName
@ stdcall NetShareAdd(wstr long ptr ptr)
-@ stub NetShareCheck
+@ stdcall NetShareCheck(wstr wstr ptr)
@ stdcall NetShareDel(wstr wstr long)
-@ stub NetShareDelSticky
+@ stdcall NetShareDelSticky(wstr wstr long)
@ stdcall NetShareEnum(wstr long ptr long ptr ptr ptr)
-@ stub NetShareEnumSticky
+@ stdcall NetShareEnumSticky(wstr long ptr long ptr ptr ptr)
@ stdcall NetShareGetInfo(wstr wstr long ptr)
-@ stub NetShareSetInfo
+@ stdcall NetShareSetInfo(wstr wstr long ptr ptr)
@ stdcall NetStatisticsGet(wstr wstr long long ptr)
@ stub NetUnjoinDomain
@ stub NetUnregisterDomainNameChangeNotification
Modified: branches/setup_improvements/dll/win32/netapi32/share.c
URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/dll/win32/ne…
==============================================================================
--- branches/setup_improvements/dll/win32/netapi32/share.c [iso-8859-1] (original)
+++ branches/setup_improvements/dll/win32/netapi32/share.c [iso-8859-1] Sat Jun 3
16:35:45 2017
@@ -57,62 +57,6 @@
}
/************************************************************
- * NetShareEnum (NETAPI32.@)
- *
- * PARAMS
- * servername [I] Pointer to a string with the name of the server
- * level [I] Data information level
- * bufptr [O] Buffer to the data
- * prefmaxlen [I] Preferred maximum length of the data
- * entriesread [O] Pointer to the number of entries enumerated
- * totalentries [O] Pointer to the possible number of entries
- * resume_handle [I/O] Pointer to a handle for subsequent searches
- *
- * RETURNS
- * If successful, the function returns NERR_Success
- * On failure it returns a system error code (FIXME: find out which)
- *
- */
-NET_API_STATUS WINAPI NetShareEnum( LMSTR servername, DWORD level, LPBYTE* bufptr,
- DWORD prefmaxlen, LPDWORD entriesread, LPDWORD totalentries, LPDWORD resume_handle)
-{
- FIXME("Stub (%s %d %p %d %p %p %p)\n", debugstr_w(servername), level,
bufptr,
- prefmaxlen, entriesread, totalentries, resume_handle);
-
- return ERROR_NOT_SUPPORTED;
-}
-
-/************************************************************
- * NetShareDel (NETAPI32.@)
- */
-NET_API_STATUS WINAPI NetShareDel(LMSTR servername, LMSTR netname, DWORD reserved)
-{
- FIXME("Stub (%s %s %d)\n", debugstr_w(servername), debugstr_w(netname),
reserved);
- return NERR_Success;
-}
-
-/************************************************************
- * NetShareGetInfo (NETAPI32.@)
- */
-NET_API_STATUS WINAPI NetShareGetInfo(LMSTR servername, LMSTR netname,
- DWORD level, LPBYTE *bufptr)
-{
- FIXME("Stub (%s %s %d %p)\n", debugstr_w(servername),
- debugstr_w(netname),level, bufptr);
- return NERR_NetNameNotFound;
-}
-
-/************************************************************
- * NetShareAdd (NETAPI32.@)
- */
-NET_API_STATUS WINAPI NetShareAdd(LMSTR servername,
- DWORD level, LPBYTE buf, LPDWORD parm_err)
-{
- FIXME("Stub (%s %d %p %p)\n", debugstr_w(servername), level, buf,
parm_err);
- return ERROR_NOT_SUPPORTED;
-}
-
-/************************************************************
* NetFileEnum (NETAPI32.@)
*/
NET_API_STATUS WINAPI NetFileEnum(
Modified: branches/setup_improvements/dll/win32/netapi32/srvsvc.c
URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/dll/win32/ne…
==============================================================================
--- branches/setup_improvements/dll/win32/netapi32/srvsvc.c [iso-8859-1] (original)
+++ branches/setup_improvements/dll/win32/netapi32/srvsvc.c [iso-8859-1] Sat Jun 3
16:35:45 2017
@@ -1,10 +1,9 @@
/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: NetAPI DLL
- * FILE: reactos/dll/win32/netapi32/schedule.c
+ * FILE: reactos/dll/win32/netapi32/srvsvc.c
* PURPOSE: Server service interface code
- *
- * PROGRAMMERS: Eric Kohl
+ * PROGRAMMERS: Eric Kohl <eric.kohl(a)reactos.org>
*/
/* INCLUDES ******************************************************************/
@@ -74,8 +73,8 @@
NET_API_STATUS
WINAPI
NetRemoteTOD(
- LPCWSTR UncServerName,
- LPBYTE *BufferPtr)
+ _In_ LPCWSTR UncServerName,
+ _Out_ LPBYTE *BufferPtr)
{
NET_API_STATUS status;
@@ -98,4 +97,406 @@
return status;
}
+
+NET_API_STATUS
+WINAPI
+NetShareAdd(
+ _In_ LMSTR servername,
+ _In_ DWORD level,
+ _In_ LPBYTE buf,
+ _Out_ LPDWORD parm_err)
+{
+ NET_API_STATUS status;
+
+ TRACE("NetShareAdd(%s %lu %p %p)\n",
+ debugstr_w(servername), level, buf, parm_err);
+
+ if (level != 2 && level != 502 && level != 503)
+ return ERROR_INVALID_LEVEL;
+
+ RpcTryExcept
+ {
+ status = NetrShareAdd(servername,
+ level,
+ (LPSHARE_INFO)&buf,
+ parm_err);
+ }
+ RpcExcept(EXCEPTION_EXECUTE_HANDLER)
+ {
+ status = I_RpcMapWin32Status(RpcExceptionCode());
+ }
+ RpcEndExcept;
+
+ return status;
+}
+
+
+NET_API_STATUS
+WINAPI
+NetShareCheck(
+ _In_ LMSTR servername,
+ _In_ LMSTR device,
+ _Out_ LPDWORD type)
+{
+ NET_API_STATUS status;
+
+ TRACE("NetShareCheck(%s %s %p)\n",
+ debugstr_w(servername), debugstr_w(device), type);
+
+ RpcTryExcept
+ {
+ status = NetrShareCheck(servername,
+ device,
+ type);
+ }
+ RpcExcept(EXCEPTION_EXECUTE_HANDLER)
+ {
+ status = I_RpcMapWin32Status(RpcExceptionCode());
+ }
+ RpcEndExcept;
+
+ return status;
+
+}
+
+
+NET_API_STATUS
+WINAPI
+NetShareDel(
+ _In_ LMSTR servername,
+ _In_ LMSTR netname,
+ _In_ DWORD reserved)
+{
+ NET_API_STATUS status;
+
+ TRACE("NetShareDel(%s %s %lu)\n",
+ debugstr_w(servername), debugstr_w(netname), reserved);
+
+ if (netname == NULL || (*netname == 0) || reserved != 0)
+ return ERROR_INVALID_PARAMETER;
+
+ RpcTryExcept
+ {
+ status = NetrShareDel(servername,
+ netname,
+ reserved);
+ }
+ RpcExcept(EXCEPTION_EXECUTE_HANDLER)
+ {
+ status = I_RpcMapWin32Status(RpcExceptionCode());
+ }
+ RpcEndExcept;
+
+ return status;
+}
+
+
+NET_API_STATUS
+WINAPI
+NetShareDelSticky(
+ _In_ LMSTR servername,
+ _In_ LMSTR netname,
+ _In_ DWORD reserved)
+{
+ NET_API_STATUS status;
+
+ TRACE("NetShareDelSticky(%s %s %lu)\n",
+ debugstr_w(servername), debugstr_w(netname), reserved);
+
+ if (netname == NULL || (*netname == 0) || reserved != 0)
+ return ERROR_INVALID_PARAMETER;
+
+ RpcTryExcept
+ {
+ status = NetrShareDelSticky(servername,
+ netname,
+ reserved);
+ }
+ RpcExcept(EXCEPTION_EXECUTE_HANDLER)
+ {
+ status = I_RpcMapWin32Status(RpcExceptionCode());
+ }
+ RpcEndExcept;
+
+ return status;
+}
+
+
+NET_API_STATUS
+WINAPI
+NetShareEnum(
+ _In_ LMSTR servername,
+ _In_ DWORD level,
+ _Out_ LPBYTE *bufptr,
+ _In_ DWORD prefmaxlen,
+ _Out_ LPDWORD entriesread,
+ _Out_ LPDWORD totalentries,
+ _Inout_ LPDWORD resume_handle)
+{
+ SHARE_ENUM_STRUCT EnumStruct;
+ SHARE_INFO_0_CONTAINER Level0Container = {0, NULL};
+ SHARE_INFO_1_CONTAINER Level1Container = {0, NULL};
+ SHARE_INFO_2_CONTAINER Level2Container = {0, NULL};
+ SHARE_INFO_502_CONTAINER Level502Container = {0, NULL};
+ NET_API_STATUS status;
+
+ TRACE("NetShareEnum(%s %lu %p %lu %p %p %p)\n",
+ debugstr_w(servername), level, bufptr, prefmaxlen,
+ entriesread, totalentries, resume_handle);
+
+ if (level > 2 && level != 502)
+ return ERROR_INVALID_LEVEL;
+
+ *bufptr = NULL;
+ *entriesread = 0;
+ *totalentries = 0;
+
+ EnumStruct.Level = level;
+ switch (level)
+ {
+ case 0:
+ EnumStruct.ShareInfo.Level0 = &Level0Container;
+ break;
+
+ case 1:
+ EnumStruct.ShareInfo.Level1 = &Level1Container;
+ break;
+
+ case 2:
+ EnumStruct.ShareInfo.Level2 = &Level2Container;
+ break;
+
+ case 502:
+ EnumStruct.ShareInfo.Level502 = &Level502Container;
+ break;
+ }
+
+ RpcTryExcept
+ {
+ status = NetrShareEnum(servername,
+ &EnumStruct,
+ prefmaxlen,
+ totalentries,
+ resume_handle);
+
+ switch (level)
+ {
+ case 0:
+ if (EnumStruct.ShareInfo.Level0->Buffer != NULL)
+ {
+ *bufptr = (LPBYTE)EnumStruct.ShareInfo.Level0->Buffer;
+ *entriesread = EnumStruct.ShareInfo.Level0->EntriesRead;
+ }
+ break;
+
+ case 1:
+ if (EnumStruct.ShareInfo.Level1->Buffer != NULL)
+ {
+ *bufptr = (LPBYTE)EnumStruct.ShareInfo.Level1->Buffer;
+ *entriesread = EnumStruct.ShareInfo.Level1->EntriesRead;
+ }
+ break;
+
+ case 2:
+ if (EnumStruct.ShareInfo.Level2->Buffer != NULL)
+ {
+ *bufptr = (LPBYTE)EnumStruct.ShareInfo.Level2->Buffer;
+ *entriesread = EnumStruct.ShareInfo.Level2->EntriesRead;
+ }
+ break;
+
+ case 502:
+ if (EnumStruct.ShareInfo.Level502->Buffer != NULL)
+ {
+ *bufptr = (LPBYTE)EnumStruct.ShareInfo.Level502->Buffer;
+ *entriesread = EnumStruct.ShareInfo.Level502->EntriesRead;
+ }
+ break;
+ }
+ }
+ RpcExcept(EXCEPTION_EXECUTE_HANDLER)
+ {
+ status = I_RpcMapWin32Status(RpcExceptionCode());
+ }
+ RpcEndExcept;
+
+ return status;
+}
+
+
+NET_API_STATUS
+WINAPI
+NetShareEnumSticky(
+ _In_ LMSTR servername,
+ _In_ DWORD level,
+ _Out_ LPBYTE *bufptr,
+ _In_ DWORD prefmaxlen,
+ _Out_ LPDWORD entriesread,
+ _Out_ LPDWORD totalentries,
+ _Inout_ LPDWORD resume_handle)
+{
+ SHARE_ENUM_STRUCT EnumStruct;
+ SHARE_INFO_0_CONTAINER Level0Container = {0, NULL};
+ SHARE_INFO_1_CONTAINER Level1Container = {0, NULL};
+ SHARE_INFO_2_CONTAINER Level2Container = {0, NULL};
+ SHARE_INFO_502_CONTAINER Level502Container = {0, NULL};
+ NET_API_STATUS status;
+
+ TRACE("NetShareEnumSticky(%s %lu %p %lu %p %p %p)\n",
+ debugstr_w(servername), level, bufptr, prefmaxlen,
+ entriesread, totalentries, resume_handle);
+
+ if (level > 2 && level != 502)
+ return ERROR_INVALID_LEVEL;
+
+ *bufptr = NULL;
+ *entriesread = 0;
+ *totalentries = 0;
+
+ EnumStruct.Level = level;
+ switch (level)
+ {
+ case 0:
+ EnumStruct.ShareInfo.Level0 = &Level0Container;
+ break;
+
+ case 1:
+ EnumStruct.ShareInfo.Level1 = &Level1Container;
+ break;
+
+ case 2:
+ EnumStruct.ShareInfo.Level2 = &Level2Container;
+ break;
+
+ case 502:
+ EnumStruct.ShareInfo.Level502 = &Level502Container;
+ break;
+ }
+
+ RpcTryExcept
+ {
+ status = NetrShareEnum(servername,
+ (LPSHARE_ENUM_STRUCT)&EnumStruct,
+ prefmaxlen,
+ totalentries,
+ resume_handle);
+
+ switch (level)
+ {
+ case 0:
+ if (EnumStruct.ShareInfo.Level0->Buffer != NULL)
+ {
+ *bufptr = (LPBYTE)EnumStruct.ShareInfo.Level0->Buffer;
+ *entriesread = EnumStruct.ShareInfo.Level0->EntriesRead;
+ }
+ break;
+
+ case 1:
+ if (EnumStruct.ShareInfo.Level1->Buffer != NULL)
+ {
+ *bufptr = (LPBYTE)EnumStruct.ShareInfo.Level1->Buffer;
+ *entriesread = EnumStruct.ShareInfo.Level1->EntriesRead;
+ }
+ break;
+
+ case 2:
+ if (EnumStruct.ShareInfo.Level2->Buffer != NULL)
+ {
+ *bufptr = (LPBYTE)EnumStruct.ShareInfo.Level2->Buffer;
+ *entriesread = EnumStruct.ShareInfo.Level2->EntriesRead;
+ }
+ break;
+
+ case 502:
+ if (EnumStruct.ShareInfo.Level502->Buffer != NULL)
+ {
+ *bufptr = (LPBYTE)EnumStruct.ShareInfo.Level502->Buffer;
+ *entriesread = EnumStruct.ShareInfo.Level502->EntriesRead;
+ }
+ break;
+ }
+ }
+ RpcExcept(EXCEPTION_EXECUTE_HANDLER)
+ {
+ status = I_RpcMapWin32Status(RpcExceptionCode());
+ }
+ RpcEndExcept;
+
+ return status;
+}
+
+
+NET_API_STATUS
+WINAPI
+NetShareGetInfo(
+ _In_ LMSTR servername,
+ _In_ LMSTR netname,
+ _In_ DWORD level,
+ _Out_ LPBYTE *bufptr)
+{
+ NET_API_STATUS status;
+
+ TRACE("NetShareGetInfo(%s %s %lu %p)\n",
+ debugstr_w(servername), debugstr_w(netname), level, bufptr);
+
+ if (level > 2 && level != 502 && level != 1005)
+ return ERROR_INVALID_LEVEL;
+
+ if (netname == NULL || *netname == 0)
+ return ERROR_INVALID_PARAMETER;
+
+ *bufptr = NULL;
+
+ RpcTryExcept
+ {
+ status = NetrShareGetInfo(servername,
+ netname,
+ level,
+ (LPSHARE_INFO)bufptr);
+ }
+ RpcExcept(EXCEPTION_EXECUTE_HANDLER)
+ {
+ status = I_RpcMapWin32Status(RpcExceptionCode());
+ }
+ RpcEndExcept;
+
+ return status;
+}
+
+
+NET_API_STATUS
+WINAPI
+NetShareSetInfo(
+ _In_ LPWSTR servername,
+ _In_ LPWSTR netname,
+ _In_ DWORD level,
+ _In_ LPBYTE buf,
+ _Out_ LPDWORD parm_err)
+{
+ NET_API_STATUS status;
+
+ TRACE("NetShareSetInfo(%s %s %lu %p %p)\n",
+ debugstr_w(servername), debugstr_w(netname), level, buf, parm_err);
+
+ if (level != 2 && level != 502 && level != 503 && level !=
1004 &&
+ level != 1005 && level != 1006 && level != 1501)
+ return ERROR_INVALID_LEVEL;
+
+ RpcTryExcept
+ {
+ status = NetrShareSetInfo(servername,
+ netname,
+ level,
+ (LPSHARE_INFO)&buf,
+ parm_err);
+ }
+ RpcExcept(EXCEPTION_EXECUTE_HANDLER)
+ {
+ status = I_RpcMapWin32Status(RpcExceptionCode());
+ }
+ RpcEndExcept;
+
+ return status;
+}
+
/* EOF */
Modified: branches/setup_improvements/dll/win32/shell32/shellmenu/CMenuDeskBar.cpp
URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/dll/win32/sh…
==============================================================================
--- branches/setup_improvements/dll/win32/shell32/shellmenu/CMenuDeskBar.cpp [iso-8859-1]
(original)
+++ branches/setup_improvements/dll/win32/shell32/shellmenu/CMenuDeskBar.cpp [iso-8859-1]
Sat Jun 3 16:35:45 2017
@@ -839,6 +839,12 @@
return 0;
}
+LRESULT CMenuDeskBar::_OnClose(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL
&bHandled)
+{
+ /* Prevent the CMenuDeskBar from destroying on being sent a WM_CLOSE */
+ return 0;
+}
+
HRESULT CMenuDeskBar::_AdjustForTheme(BOOL bFlatStyle)
{
DWORD style = bFlatStyle ? WS_BORDER : WS_CLIPCHILDREN|WS_DLGFRAME;
Modified: branches/setup_improvements/dll/win32/shell32/shellmenu/CMenuDeskBar.h
URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/dll/win32/sh…
==============================================================================
--- branches/setup_improvements/dll/win32/shell32/shellmenu/CMenuDeskBar.h [iso-8859-1]
(original)
+++ branches/setup_improvements/dll/win32/shell32/shellmenu/CMenuDeskBar.h [iso-8859-1]
Sat Jun 3 16:35:45 2017
@@ -74,6 +74,7 @@
MESSAGE_HANDLER(WM_MOUSEACTIVATE, _OnMouseActivate)
MESSAGE_HANDLER(WM_WININICHANGE , _OnWinIniChange)
MESSAGE_HANDLER(WM_NCPAINT, _OnNcPaint)
+ MESSAGE_HANDLER(WM_CLOSE, _OnClose)
END_MSG_MAP()
BEGIN_COM_MAP(CMenuDeskBar)
@@ -142,6 +143,7 @@
LRESULT _OnAppActivate(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled);
LRESULT _OnWinIniChange(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL
&bHandled);
LRESULT _OnNcPaint(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled);
+ LRESULT _OnClose(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled);
HRESULT _AdjustForTheme(BOOL bFlatStyle);
BOOL _IsSubMenuParent(HWND hwnd);
Modified: branches/setup_improvements/sdk/include/psdk/asptlb.idl
URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/sdk/include/…
==============================================================================
--- branches/setup_improvements/sdk/include/psdk/asptlb.idl [iso-8859-1] (original)
+++ branches/setup_improvements/sdk/include/psdk/asptlb.idl [iso-8859-1] Sat Jun 3
16:35:45 2017
@@ -23,22 +23,21 @@
[
object,
dual,
- uuid(D97A6DA0-A85F-11df-83AE-00A0C90C2BD8)
+ uuid(D97A6DA0-A864-11cf-83BE-00A0C90C2BD8)
]
interface IRequestDictionary : IDispatch
{
[propget]
- HRESULT Item(IRequestDictionary *iface, [in, optional] VARIANT Var,
- [retval, out] VARIANT *pVariantReturn);
+ HRESULT Item([in, optional] VARIANT Var, [retval, out] VARIANT *pVariantReturn);
[restricted, propget]
- HRESULT _NewEnum(IRequestDictionary *iface, [retval, out] IUnknown **ppEnumReturn);
+ HRESULT _NewEnum([retval, out] IUnknown **ppEnumReturn);
[propget]
- HRESULT Count(IRequestDictionary *iface, [retval, out] int *cStrRet);
+ HRESULT Count([retval, out] int *count);
[propget]
- HRESULT Key(IRequestDictionary *iface, [in] VARIANT VarKey, [retval, out]VARIANT
*pvar);
+ HRESULT Key([in] VARIANT key, [retval, out] VARIANT *value);
};
[
@@ -49,85 +48,85 @@
interface IResponse : IDispatch
{
[propget]
- HRESULT Buffer(IResponse *iface, [retval, out] VARIANT_BOOL *fIsBuffering);
+ HRESULT Buffer([retval, out] VARIANT_BOOL *is_buffering);
[propput]
- HRESULT Buffer(IResponse *iface, [in] VARIANT_BOOL fIsBuffering);
+ HRESULT Buffer([in] VARIANT_BOOL is_buffering);
[propget]
- HRESULT ContentType(IResponse *iface, [retval, out] BSTR *pbstrContentTypeRet);
+ HRESULT ContentType([retval, out] BSTR *content_type);
[propput]
- HRESULT ContentType(IResponse *iface, [in] BSTR bstrContentType);
+ HRESULT ContentType([in] BSTR content_type);
[propget]
- HRESULT Expires(IResponse *iface, [retval, out] VARIANT *pvarExpiresMinutesRet);
+ HRESULT Expires([retval, out] VARIANT *minutes);
[propput]
- HRESULT Expires(IResponse *iface, [in] long lExpiresMinutes);
+ HRESULT Expires([in] LONG minutes);
[propget]
- HRESULT ExpiresAbsolute(IResponse *iface, [retval, out] VARIANT *pvarExpiresRet);
+ HRESULT ExpiresAbsolute([retval, out] VARIANT *expires);
[propput]
- HRESULT ExpiresAbsolute(IResponse *iface, [in] DATE dtExpires);
+ HRESULT ExpiresAbsolute([in] DATE expires);
[propget]
- HRESULT Cookies(IResponse *iface, [retval, out] IRequestDictionary **ppCookies);
+ HRESULT Cookies([retval, out] IRequestDictionary **cookies);
[propget]
- HRESULT Status(IResponse *iface, [retval][out] BSTR *pbstrStatusRet);
+ HRESULT Status([retval, out] BSTR *status);
[propput]
- HRESULT Status(IResponse *iface, [in] BSTR bstrStatus);
+ HRESULT Status([in] BSTR status);
[hidden]
- HRESULT Add(IResponse *iface, [in] BSTR bstrHeaderValue, [in] BSTR bstrHeaderName);
+ HRESULT Add([in] BSTR value, [in] BSTR name);
- HRESULT AddHeader(IResponse *iface, [in] BSTR bstrHeaderName, [in] BSTR
bstrHeaderValue);
+ HRESULT AddHeader([in] BSTR name, [in] BSTR value);
- HRESULT AppendToLog(IResponse *iface, [in] BSTR bstrLogEntry);
+ HRESULT AppendToLog([in] BSTR log_entry);
- HRESULT BinaryWrite(IResponse *iface, [in] VARIANT varInput);
+ HRESULT BinaryWrite([in] VARIANT input);
- HRESULT Clear(IResponse *iface);
+ HRESULT Clear();
- HRESULT End(IResponse *iface);
+ HRESULT End();
- HRESULT Flush(IResponse *iface);
+ HRESULT Flush();
- HRESULT Redirect(IResponse *iface, [in] BSTR bstrURL);
+ HRESULT Redirect(BSTR url);
- HRESULT Write(IResponse *iface, [in] VARIANT varText);
+ HRESULT Write([in] VARIANT text);
[hidden]
- HRESULT WriteBlock(IResponse *iface, [in] short iBlockNumber);
+ HRESULT WriteBlock([in] short block_number);
- HRESULT IsClientConnected(IResponse *iface, [retval, out] VARIANT_BOOL
*pfIsClientConnected);
+ HRESULT IsClientConnected([retval, out] VARIANT_BOOL *is_connected);
[propget]
- HRESULT get_CharSet( IResponse *iface, [retval, out] BSTR *pbstrCharSetRet);
+ HRESULT CharSet([retval, out] BSTR *charset);
[propput]
- HRESULT put_CharSet(IResponse *iface, [in] BSTR bstrCharSet);
+ HRESULT CharSet([in] BSTR charset);
- HRESULT Pics(IResponse *iface, [in] BSTR bstrHeaderValue);
+ HRESULT Pics([in] BSTR value);
[propget]
- HRESULT get_CacheControl(IResponse *iface, [retval, out] BSTR *pbstrCacheControl);
+ HRESULT CacheControl([retval, out] BSTR *cache_control);
[propput]
- HRESULT put_CacheControl(IResponse *iface, [in] BSTR bstrCacheControl);
+ HRESULT CacheControl([in] BSTR cache_control);
[propget]
- HRESULT get_CodePage(IResponse *iface, [retval, out] long *plvar);
+ HRESULT CodePage([retval, out] LONG *codepage);
[propput]
- HRESULT put_CodePage(IResponse *iface, [in] long lvar);
+ HRESULT CodePage([in] LONG codepage);
[propget]
- HRESULT get_LCID(IResponse *iface, [retval, out] long *plvar);
+ HRESULT LCID([retval, out] LONG *lcid);
[propput]
- HRESULT put_LCID(IResponse *iface, [in] long lvar);
-};
+ HRESULT LCID([in] LONG lcid);
+}
Modified: branches/setup_improvements/win32ss/printing/providers/localspl/printers.c
URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/win32ss/prin…
==============================================================================
---
branches/setup_improvements/win32ss/printing/providers/localspl/printers.c [iso-8859-1]
(original)
+++
branches/setup_improvements/win32ss/printing/providers/localspl/printers.c [iso-8859-1]
Sat Jun 3 16:35:45 2017
@@ -756,7 +756,7 @@
size_t cbPrinterName;
size_t cbPortName;
PWSTR p;
- PWSTR pwszStrings[1];
+ PWSTR pwszStrings[2];
// Calculate the string lengths.
cbPrinterName = (cchComputerName + wcslen(pPrinter->pwszPrinterName) + 1) *
sizeof(WCHAR);