Skip to content

Commit

Permalink
Namespace refactors: com, security, ole (#706)
Browse files Browse the repository at this point in the history
* Big refactor of the security and com namespaces to help reduce unnecessary dependencies.

* Update version
  • Loading branch information
sotteson1 authored Oct 22, 2021
1 parent a9544f3 commit 485061c
Show file tree
Hide file tree
Showing 71 changed files with 1,262 additions and 350 deletions.
3 changes: 2 additions & 1 deletion generation/WinSDK/ConstantsScraper.header.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ using static Windows.Win32.UI.WindowsAndMessaging.Apis; // For WM_USER
using static Windows.Win32.Storage.FileSystem.FILE_ACCESS_FLAGS; // For FILE_* constants
using static Windows.Win32.System.Diagnostics.Debug.FACILITY_CODE; // For MAKE_HRESULT constants
using static Windows.Win32.Graphics.Direct3D9.D3DFORMAT; // For D3DFMT_* constants
using static Windows.Win32.System.OleAutomation.Apis; // Various constants
using static Windows.Win32.System.Ole.Automation.Apis; // Various constants
using static Windows.Win32.UI.Controls.Apis; // Various constants
using static Windows.Win32.System.Com.Apis; // Various constants
using static Windows.Win32.System.Ole.Apis; // Various constants
using static Windows.Win32.System.SystemInformation.Apis; // Various constants
using static Windows.Win32.NetworkManagement.Ndis.Apis; // Various constants
using static Windows.Win32.Devices.DeviceAccess.Apis; // Various constants
Expand Down
2 changes: 1 addition & 1 deletion generation/WinSDK/Partitions/Automation/settings.rsp
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
<IncludeRoot>/um/OleAuto.h
<IncludeRoot>/um/DispEx.h
--namespace
Windows.Win32.System.OleAutomation
Windows.Win32.System.Ole.Automation
1 change: 0 additions & 1 deletion generation/WinSDK/Partitions/Base/settings.rsp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ _VIRTUAL_STORAGE_TYPE
<IncludeRoot>/um/d3dcaps.h
<IncludeRoot>/um/d3dtypes.h
<IncludeRoot>/um/winddi.h
<IncludeRoot>/um/servprov.h
<IncludeRoot>/um/winioctl.h
<IncludeRoot>/shared/wtypes.h
<IncludeRoot>/um/rpcnsip.h
Expand Down
20 changes: 20 additions & 0 deletions generation/WinSDK/Partitions/Com.CallObj/main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#define SECURITY_WIN32 // For sspi.h
#define QCC_OS_GROUP_WINDOWS

#include "intrinfix.h"
#include "windows.fixed.h"

#include <sdkddkver.h>

#include <wtypes.h>
#include <olectl.h>
#include <vbinterf.h>
#include <ocidl.h>
#include <docobj.h>
#include <oleidl.h>
#include <objidl.h>
#include <oledlg.h>
#include <ole2.h>
#include <objbase.h>

#include <callobj.h>
8 changes: 8 additions & 0 deletions generation/WinSDK/Partitions/Com.CallObj/settings.rsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
--exclude
_GUID
--traverse
<IncludeRoot>/um/callobj.h
--namespace
Windows.Win32.System.Com.CallObj
--with-type
STREAM_SEEK=uint
20 changes: 20 additions & 0 deletions generation/WinSDK/Partitions/Com.ChannelCreds/main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#define SECURITY_WIN32 // For sspi.h
#define QCC_OS_GROUP_WINDOWS

#include "intrinfix.h"
#include "windows.fixed.h"

#include <sdkddkver.h>

#include <wtypes.h>
#include <olectl.h>
#include <vbinterf.h>
#include <ocidl.h>
#include <docobj.h>
#include <oleidl.h>
#include <objidl.h>
#include <oledlg.h>
#include <ole2.h>
#include <objbase.h>

#include <ichannelcredentials.h>
8 changes: 8 additions & 0 deletions generation/WinSDK/Partitions/Com.ChannelCreds/settings.rsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
--exclude
_GUID
--traverse
<IncludeRoot>/um/ichannelcredentials.h
--namespace
Windows.Win32.System.Com.ChannelCredentials
--with-type
STREAM_SEEK=uint
15 changes: 15 additions & 0 deletions generation/WinSDK/Partitions/Com.Events/main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#define SECURITY_WIN32 // For sspi.h
#define QCC_OS_GROUP_WINDOWS

#define MICROSOFT_WINDOWS_WINBASE_H_DEFINE_INTERLOCKED_CPLUSPLUS_OVERLOADS 0

#include "intrinfix.h"

#include "windows.fixed.h"
#include <sdkddkver.h>

typedef LPVOID* PPVOID;

#include <comsvcs.h>
#include <combaseapi.h>
#include <eventsys.h>
7 changes: 7 additions & 0 deletions generation/WinSDK/Partitions/Com.Events/settings.rsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
--exclude
IResourceManagerXXX
--traverse
<IncludeRoot>/um/EventSys.h
--namespace
Windows.Win32.System.Com.Events

Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,3 @@
#include <propidlbase.h>
#include <coml2api.h>
#include <propapi.h>
#include <esent.h>
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,9 @@ CoFileTimeNow
CLSIDFromProgIDEx
CreateDataAdviseHolder
--traverse
<IncludeRoot>/um/objbase.h
<IncludeRoot>/um/PropIdl.h
<IncludeRoot>/um/PropIdlBase.h
<IncludeRoot>/um/coml2api.h
<IncludeRoot>/um/propapi.h
<IncludeRoot>/um/esent.h
--namespace
Windows.Win32.Storage.StructuredStorage
Windows.Win32.System.Com.StructuredStorage
19 changes: 19 additions & 0 deletions generation/WinSDK/Partitions/Com.Urlmon/main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#define SECURITY_WIN32 // For sspi.h
#define QCC_OS_GROUP_WINDOWS

#include "intrinfix.h"
#include "windows.fixed.h"

#include <sdkddkver.h>

#include <wtypes.h>
#include <olectl.h>
#include <vbinterf.h>
#include <ocidl.h>
#include <docobj.h>
#include <oleidl.h>
#include <objidl.h>
#include <oledlg.h>
#include <ole2.h>
#include <objbase.h>

8 changes: 8 additions & 0 deletions generation/WinSDK/Partitions/Com.Urlmon/settings.rsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
--exclude
_GUID
--traverse
<IncludeRoot>/um/urlmon.h
--namespace
Windows.Win32.System.Com.Urlmon
--with-type
STREAM_SEEK=uint
28 changes: 0 additions & 28 deletions generation/WinSDK/Partitions/Com/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,33 +18,5 @@
#include <objbase.h>

#include <comcat.h>
#include <callobj.h>
#include <messagedispatcherapi.h>
#include <ctxtcall.h>

#include <ichannelcredentials.h>

#include <mtx.h>
#include <mtxadmin.h>
#include <mtxattr.h>

/*
#include <urlmon.h>
#include <accctrl.h>
#include <rpcdce.h>
#include <winerror.h>
#include <combaseapi.h>
#include <objidlbase.h>
#include <wtypesbase.h>
#include <eventsys.h>
#include <txlogpub.h>
#include <shobjidl.h>
#include <iaccess.h>
//#include <unknwnbase.h>
//#include <unknwn.h>
#include <imessagedispatcher.h>
#include <dmerror.h>
#include <roapi.h>
#include <guiddef.h>
#include <winddi.h>
*/
20 changes: 3 additions & 17 deletions generation/WinSDK/Partitions/Com/settings.rsp
Original file line number Diff line number Diff line change
@@ -1,35 +1,21 @@
--exclude
_GUID
--traverse
<IncludeRoot>/um/objbase.h
<IncludeRoot>/um/cguid.h
<IncludeRoot>/um/OleCtl.h
<IncludeRoot>/um/vbinterf.h
<IncludeRoot>/um/OCIdl.h
<IncludeRoot>/um/DocObj.h
<IncludeRoot>/um/oleidl.h
<IncludeRoot>/um/ObjIdl.h
<IncludeRoot>/um/ole.h
<IncludeRoot>/um/ole2.h
<IncludeRoot>/um/OleDlg.h
<IncludeRoot>/um/urlmon.h
<IncludeRoot>/um/combaseapi.h
<IncludeRoot>/um/ObjIdl.h
<IncludeRoot>/um/ObjIdlbase.h
<IncludeRoot>/um/callobj.h
<IncludeRoot>/shared/WTypesbase.h
<IncludeRoot>/um/txlogpub.h
<IncludeRoot>/um/IAccess.h
<IncludeRoot>/um/comcat.h
<IncludeRoot>/um/Unknwn.h
<IncludeRoot>/um/Unknwnbase.h
<IncludeRoot>/um/ctxtcall.h
<IncludeRoot>/um/IMessageDispatcher.h
<IncludeRoot>/shared/dmerror.h
<IncludeRoot>/winrt/MessageDispatcherApi.h
<IncludeRoot>/shared/guiddef.h
<IncludeRoot>/um/ichannelcredentials.h
<IncludeRoot>/um/mtx.h
<IncludeRoot>/um/mtxadmin.h
<IncludeRoot>/um/mtxattr.h
<IncludeRoot>/um/servprov.h
--namespace
Windows.Win32.System.Com
--with-type
Expand Down
31 changes: 31 additions & 0 deletions generation/WinSDK/Partitions/ComOle/main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#define SECURITY_WIN32 // For sspi.h
#define QCC_OS_GROUP_WINDOWS

#include "intrinfix.h"
#include "windows.fixed.h"

#include <sdkddkver.h>

#include <wtypes.h>
#include <olectl.h>
#include <vbinterf.h>
#include <ocidl.h>
#include <docobj.h>
#include <oleidl.h>
#include <objidl.h>
#include <oledlg.h>
#include <ole2.h>
#include <objbase.h>

#include <comcat.h>
#include <callobj.h>
#include <messagedispatcherapi.h>
#include <ctxtcall.h>

#include <ichannelcredentials.h>

#include <mtx.h>
#include <mtxadmin.h>
#include <mtxattr.h>

#include <idispids.h>
16 changes: 16 additions & 0 deletions generation/WinSDK/Partitions/ComOle/settings.rsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
--exclude
CreateDataAdviseHolder
--traverse
<IncludeRoot>/um/OleCtl.h
<IncludeRoot>/um/vbinterf.h
<IncludeRoot>/um/OCIdl.h
<IncludeRoot>/um/DocObj.h
<IncludeRoot>/um/oleidl.h
<IncludeRoot>/um/ole.h
<IncludeRoot>/um/ole2.h
<IncludeRoot>/um/OleDlg.h
<IncludeRoot>/um/idispids.h
--namespace
Windows.Win32.System.Ole
--with-type
STREAM_SEEK=uint
1 change: 0 additions & 1 deletion generation/WinSDK/Partitions/Cos/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,5 @@ typedef LPVOID* PPVOID;

#include <comsvcs.h>
#include <combaseapi.h>
#include <eventsys.h>
#include <comadmin.h>
#include <mtxdm.h>
1 change: 0 additions & 1 deletion generation/WinSDK/Partitions/Cos/settings.rsp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
IResourceManagerXXX
--traverse
<IncludeRoot>/um/ComSvcs.h
<IncludeRoot>/um/EventSys.h
<IncludeRoot>/um/ComAdmin.h
<IncludeRoot>/um/Mtxdm.h
--namespace
Expand Down
2 changes: 1 addition & 1 deletion generation/WinSDK/Partitions/Identity/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ typedef struct _OLD_LARGE_INTEGER {
#include <schnlsp.h>
#include <slerror.h>
#include <sliddefs.h>

#include <wdigest.h>
3 changes: 2 additions & 1 deletion generation/WinSDK/Partitions/Identity/settings.rsp
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,6 @@ _SecHandle
<IncludeRoot>/um/schnlsp.h
<IncludeRoot>/um/slerror.h
<IncludeRoot>/um/sliddefs.h
<IncludeRoot>/um/wdigest.h
--namespace
Windows.Win32.Security.Authentication.Identity.Core
Windows.Win32.Security.Authentication.Identity
33 changes: 33 additions & 0 deletions generation/WinSDK/Partitions/Security.AppLocker/main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#define SECURITY_WIN32 // For sspi.h
#define QCC_OS_GROUP_WINDOWS

#include "intrinfix.h"

#include "windows.fixed.h"
#include <sdkddkver.h>

#include <winternl.h>

// Usually brought in by windows.h
typedef NTSTATUS* PNTSTATUS;

#define _NTDEF_
#define SECURITY_WIN32
#include <NTSecAPI.h>
#include <sspi.h>
#include <wincred.h>
#include <NTSecPKG.h>
#include <schannel.h>

typedef struct _OLD_LARGE_INTEGER {
ULONG LowPart;
LONG HighPart;
} OLD_LARGE_INTEGER, *POLD_LARGE_INTEGER;


#include <winbase.h>
#include <winnt.h>
#include <winuser.h>

#include <winsafer.h>

11 changes: 11 additions & 0 deletions generation/WinSDK/Partitions/Security.AppLocker/settings.rsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--with-type
_tagSLDATATYPE=uint
SLDATATYPE=uint
--exclude
_CYPHER_BLOCK
_LM_OWF_PASSWORD
--traverse
<IncludeRoot>/um/winsafer.h
--namespace
Windows.Win32.Security.AppLocker

32 changes: 32 additions & 0 deletions generation/WinSDK/Partitions/Security.ConfigurationSnapin/main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#define SECURITY_WIN32 // For sspi.h
#define QCC_OS_GROUP_WINDOWS

#include "intrinfix.h"

#include "windows.fixed.h"
#include <sdkddkver.h>

#include <winternl.h>

// Usually brought in by windows.h
typedef NTSTATUS* PNTSTATUS;

#define _NTDEF_
#define SECURITY_WIN32
#include <NTSecAPI.h>
#include <sspi.h>
#include <wincred.h>
#include <NTSecPKG.h>
#include <schannel.h>

typedef struct _OLD_LARGE_INTEGER {
ULONG LowPart;
LONG HighPart;
} OLD_LARGE_INTEGER, *POLD_LARGE_INTEGER;


#include <winbase.h>
#include <winnt.h>
#include <winuser.h>

#include <scesvc.h>
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--with-type
_tagSLDATATYPE=uint
SLDATATYPE=uint
--exclude
_CYPHER_BLOCK
_LM_OWF_PASSWORD
--traverse
<IncludeRoot>/um/scesvc.h
--namespace
Windows.Win32.Security.ConfigurationSnapin

Loading

0 comments on commit 485061c

Please sign in to comment.