[HNETCFG] Sync with Wine Staging 3.3. CORE-14434

This commit is contained in:
Amine Khaldi 2018-03-15 12:23:02 +01:00
parent 3d690cee5a
commit 36755f12cb
11 changed files with 159 additions and 31 deletions

View file

@ -11,7 +11,7 @@ list(APPEND SOURCE
port.c
profile.c
service.c
hnetcfg_private.h)
precomp.h)
add_library(hnetcfg SHARED
${SOURCE}
@ -30,5 +30,5 @@ set_module_type(hnetcfg win32dll)
add_dependencies(hnetcfg stdole2)
target_link_libraries(hnetcfg wine uuid)
add_importlibs(hnetcfg ole32 oleaut32 advapi32 msvcrt kernel32 ntdll)
add_pch(hnetcfg hnetcfg_private.h SOURCE)
add_pch(hnetcfg precomp.h SOURCE)
add_cd_file(TARGET hnetcfg DESTINATION reactos/system32 FOR all)

View file

@ -16,15 +16,29 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "config.h"
#include <stdarg.h>
#include <stdio.h>
#define COBJMACROS
#include "windef.h"
#include "winbase.h"
#include "winuser.h"
#include "ole2.h"
#include "netfw.h"
#include "wine/debug.h"
#include "wine/unicode.h"
#include "hnetcfg_private.h"
#include <winnls.h>
#include <ole2.h>
WINE_DEFAULT_DEBUG_CHANNEL(hnetcfg);
typedef struct fw_app
{
INetFwAuthorizedApplication INetFwAuthorizedApplication_iface;
LONG refs;
BSTR filename;
} fw_app;
static inline fw_app *impl_from_INetFwAuthorizedApplication( INetFwAuthorizedApplication *iface )
@ -47,6 +61,7 @@ static ULONG WINAPI fw_app_Release(
if (!refs)
{
TRACE("destroying %p\n", fw_app);
if (fw_app->filename) SysFreeString( fw_app->filename );
HeapFree( GetProcessHeap(), 0, fw_app );
}
return refs;
@ -239,7 +254,18 @@ static HRESULT WINAPI fw_app_get_ProcessImageFileName(
fw_app *This = impl_from_INetFwAuthorizedApplication( iface );
FIXME("%p, %p\n", This, imageFileName);
return E_NOTIMPL;
if (!imageFileName)
return E_INVALIDARG;
if (!This->filename)
{
*imageFileName = NULL;
return S_OK;
}
*imageFileName = SysAllocString( This->filename );
return *imageFileName ? S_OK : E_OUTOFMEMORY;
}
static HRESULT WINAPI fw_app_put_ProcessImageFileName(
@ -249,7 +275,15 @@ static HRESULT WINAPI fw_app_put_ProcessImageFileName(
fw_app *This = impl_from_INetFwAuthorizedApplication( iface );
FIXME("%p, %s\n", This, debugstr_w(imageFileName));
return S_OK;
if (!imageFileName)
{
This->filename = NULL;
return S_OK;
}
This->filename = SysAllocString( imageFileName );
return This->filename ? S_OK : E_OUTOFMEMORY;
}
static HRESULT WINAPI fw_app_get_IpVersion(
@ -372,6 +406,7 @@ HRESULT NetFwAuthorizedApplication_create( IUnknown *pUnkOuter, LPVOID *ppObj )
fa->INetFwAuthorizedApplication_iface.lpVtbl = &fw_app_vtbl;
fa->refs = 1;
fa->filename = NULL;
*ppObj = &fa->INetFwAuthorizedApplication_iface;

View file

@ -16,9 +16,20 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <stdarg.h>
#define COBJMACROS
#include "windef.h"
#include "winbase.h"
#include "objbase.h"
#include "rpcproxy.h"
#include "netfw.h"
#include "wine/debug.h"
#include "hnetcfg_private.h"
#include <rpcproxy.h>
WINE_DEFAULT_DEBUG_CHANNEL(hnetcfg);
static HINSTANCE instance;

View file

@ -16,26 +16,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifndef _HNETCFG_PRIVATE_H_
#define _HNETCFG_PRIVATE_H_
#include <wine/config.h>
#include <stdarg.h>
#define WIN32_NO_STATUS
#define _INC_WINDOWS
#define COM_NO_WINDOWS_H
#define COBJMACROS
#include <windef.h>
#include <winbase.h>
#include <objbase.h>
#include <netfw.h>
#include <wine/debug.h>
WINE_DEFAULT_DEBUG_CHANNEL(hnetcfg);
#pragma once
enum type_id
{
@ -63,5 +44,3 @@ HRESULT NetFwAuthorizedApplications_create(IUnknown *, LPVOID *) DECLSPEC_HIDDEN
HRESULT NetFwOpenPorts_create(IUnknown *, LPVOID *) DECLSPEC_HIDDEN;
HRESULT NetFwOpenPort_create(IUnknown *, LPVOID *) DECLSPEC_HIDDEN;
HRESULT NetFwServices_create(IUnknown *, LPVOID *) DECLSPEC_HIDDEN;
#endif /* _HNETCFG_PRIVATE_H_ */

View file

@ -16,8 +16,25 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "config.h"
#include <stdarg.h>
#include <stdio.h>
#define COBJMACROS
#include "windef.h"
#include "winbase.h"
#include "winuser.h"
#include "initguid.h"
#include "ole2.h"
#include "netfw.h"
#include "wine/debug.h"
#include "wine/unicode.h"
#include "hnetcfg_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(hnetcfg);
typedef struct fw_manager
{
INetFwMgr INetFwMgr_iface;

View file

@ -16,8 +16,24 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "config.h"
#include <stdarg.h>
#include <stdio.h>
#define COBJMACROS
#include "windef.h"
#include "winbase.h"
#include "winuser.h"
#include "ole2.h"
#include "netfw.h"
#include "wine/debug.h"
#include "wine/unicode.h"
#include "hnetcfg_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(hnetcfg);
typedef struct fw_policy
{
INetFwPolicy INetFwPolicy_iface;

View file

@ -16,9 +16,23 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "config.h"
#include <stdarg.h>
#include <stdio.h>
#define COBJMACROS
#include "windef.h"
#include "winbase.h"
#include "winuser.h"
#include "ole2.h"
#include "netfw.h"
#include "wine/debug.h"
#include "wine/unicode.h"
#include "hnetcfg_private.h"
#include <ole2.h>
WINE_DEFAULT_DEBUG_CHANNEL(hnetcfg);
typedef struct fw_port
{

View file

@ -0,0 +1,24 @@
#ifndef _HNETCFG_PRECOMP_H_
#define _HNETCFG_PRECOMP_H_
#include <wine/config.h>
#include <stdarg.h>
#define WIN32_NO_STATUS
#define _INC_WINDOWS
#define COM_NO_WINDOWS_H
#define COBJMACROS
#include <windef.h>
#include <winbase.h>
#include <objbase.h>
#include <netfw.h>
#include <wine/debug.h>
#include "hnetcfg_private.h"
#endif /* !_HNETCFG_PRECOMP_H_ */

View file

@ -16,8 +16,24 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "config.h"
#include <stdarg.h>
#include <stdio.h>
#define COBJMACROS
#include "windef.h"
#include "winbase.h"
#include "winuser.h"
#include "ole2.h"
#include "netfw.h"
#include "wine/debug.h"
#include "wine/unicode.h"
#include "hnetcfg_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(hnetcfg);
typedef struct fw_profile
{
INetFwProfile INetFwProfile_iface;

View file

@ -16,8 +16,24 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "config.h"
#include <stdarg.h>
#include <stdio.h>
#define COBJMACROS
#include "windef.h"
#include "winbase.h"
#include "winuser.h"
#include "ole2.h"
#include "netfw.h"
#include "wine/debug.h"
#include "wine/unicode.h"
#include "hnetcfg_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(hnetcfg);
typedef struct fw_service
{
INetFwService INetFwService_iface;

View file

@ -71,7 +71,7 @@ reactos/dll/win32/fusion # Synced to WineStaging-3.3
reactos/dll/win32/gdiplus # Synced to WineStaging-3.3
reactos/dll/win32/hhctrl.ocx # Synced to WineStaging-3.3
reactos/dll/win32/hlink # Synced to WineStaging-3.3
reactos/dll/win32/hnetcfg # Synced to Wine-3.0
reactos/dll/win32/hnetcfg # Synced to WineStaging-3.3
reactos/dll/win32/httpapi # Synced to WineStaging-2.9
reactos/dll/win32/iccvid # Synced to Wine-3.0
reactos/dll/win32/ieframe # Synced to Wine-3.0