gpt4 book ai didi

c++ - 针对Windows Server Core的C++

转载 作者:行者123 更新时间:2023-12-03 07:03:58 31 4
gpt4 key购买 nike

我们想编译一个现有的C++应用程序(使用Visual Studio 2019),以便它以Windows Server Core为目标/运行。告诉编译器我们瞄准服务器核心的正确方法是什么?

我们找到了预处理器定义WINAPI_FAMILY = WINAPI_FAMILY_SERVER,但是我的搜索结果似乎表明它的目标是限制性更强的Windows Server Nano,而不是Server Core。

最佳答案

我找不到专门针对它构建的任何东西,但是关于它的一篇文章很好:https://docs.microsoft.com/en-us/windows-server/administration/server-core/what-is-server-core

此外,在其中的两篇文章中,除了了解支持哪个最低Windows版本以帮助您选择正确的SDK之外,还应帮助您缩小目标范围。寻找我以✓✓✓为前缀的内容。

我知道这不是您想要的答案,但它至少可以帮助您入门,至少可以了解自己能做什么和不能做什么。

我从中精简了这个现成的支持角色,角色服务和功能的简短列表。在下面是两个文章的链接,并在链接死亡的情况下引用了它们的表。

OP在此非常有用的URL下方的注释中还提供了,受支持的API 及其用于访问它们的相应DLL的信息:https://docs.microsoft.com/en-us/previous-versions/windows/desktop/legacy/ee391646%28v%3dvs.85%29

Roles included in Server Core

Role => Name

File and Storage Services => FileAndStorage-Services





Role services included in Server Core

Role => Role service => Name

File and Storage Services => Storage Services => Storage-Services





Features included in Server Core

Feature => Name
.NET Framework 4.6 Features => NET-Framework-45-Features
.NET Framework 4.6 => NET-Framework-45-Core
WCF Services => NET-WCF-Services45
TCP Port Sharing => NET-WCF-TCP-PortSharing45
SMB 1.0/CIFS File Sharing Support => FS-SMB1
Windows Defender Features => Windows-Defender-Features
Windows Defender => Windows-Defender
Windows PowerShell => PowerShellRoot
Windows PowerShell 5.1 => PowerShell
WoW64 Support => WoW64-Support



这些是Windows Server Core随附的默认情况下附带的文章中引用的部分。紧随其后的是链接死亡情况下引用的信息表。

1. Features not in Windows Server - Server Core

Roles not in Server Core

Fax Server (Fax)
MultiPoint Services (MultiPointServerRole)
Network Policy and Access Services (NPAS)
Windows Deployment Services (WDS) (before Windows Server version 1803)





Role Services not in Server Core

Note that some Remote Desktop role services are included in Server Core (Connection Broker, Licensing, Virtualization Host), but others are NOT (Gateway, RD Session Host, Web Access).

Print and Document Services \ Distributed Scan Server (Print-Scan-Server)
Print and Document Services \ Internet Printing (Print-Internet)
Remote Desktop Services \ Remote Desktop Gateway (RDS-Gateway)
Remote Desktop Services \ Remote Desktop Session Host (RDS-RD-Server)
Remote Desktop Services \ Remote Desktop Web Access (RDS-Web-Access)
Role Service Web Server (IIS) \ Management Tools \ IIS Management Console (Web-Mgmt-Console)
Role Service Web Server (IIS) \ Management Tools \ IIS 6 Management Compatibility \ IIS 6 Management Console (Web-Lgcy-Mgmt-Console)
Windows Deployment Services \ Deployment Server (WDS-Deployment)
Windows Deployment Services \ Transport Server (WDS-Transport) (before Windows Server version 1803)





Features not in Server Core

Background Intelligent Transfer Service (BITS) \ IIS Server Extension (BITS-IIS-Ext)
BitLocker Network Unlock (BitLocker-NetworkUnlock)
Direct Play (Direct-Play)
Internet Printing Client (Internet-Print-Client)
LPR Port Monitor (LPR-Port-Monitor)
Message Queuing \ Message Queuing Services \ Multicasting Support (MSMQ-Multicasting)
RAS Connection Manager Administration Kit (CMAK)
Remote Assistance (Remote-Assistance)
Remote Server Administration Tools \ Feature Administration Tools \ SMTP Server Tools (RSAT-SMTP)
Remote Server Administration Tools \ Feature Administration Tools \ BitLocker Drive Encryption Administration Utilities \ BitLocker Drive Encryption Tools (RSAT-Feature-Tools-BitLocker-RemoteAdminTool)
Remote Server Administration Tools \ Feature Administration Tools \ BITS Server Extensions Tools (RSAT-Bits-Server)
Remote Server Administration Tools \ Feature Administration Tools \ Network Load Balancing Tools (RSAT-NLB)
Remote Server Administration Tools \ Feature Administration Tools \ SNMP Tools (RSAT-SNMP)
Remote Server Administration Tools \ Feature Administration Tools \ WINS Server Tools (RSAT-WINS)
Remote Server Administration Tools \ Role Administration Tools \ Hyper-V Management Tools \ Hyper-V GUI Management Tools (Hyper-V-Tools)
Remote Server Administration Tools \ Role Administration Tools \ Remote Desktop Services Tools \ Remote Desktop Gateway Tools (RSAT-RDS-Tools)
Remote Server Administration Tools \ Role Administration Tools \ Remote Desktop Services Tools \ Remote Desktop Gateway Tools (RSAT-RDS-Gateway)
Remote Server Administration Tools \ Role Administration Tools \ Remote Desktop Services Tools \ Remote Desktop Licensing Diagnoser Tools (RSAT-RDS-Licensing-Diagnosis-UI)
Remote Server Administration Tools \ Role Administration Tools \ Remote Desktop Services Tools \ Remote Desktop Licensing Tools (RDS-Licensing-UI)
Remote Server Administration Tools \ Role Administration Tools \ Windows Server Update Services Tools \ User Interface Management Console (UpdateServices-UI)
Remote Server Administration Tools \ Role Administration Tools \ Active Directory Certificate Services Tools (RSAT-ADCS)
Remote Server Administration Tools \ Role Administration Tools \ Active Directory Certificate Services Tools \ Certification Authority Management Tools (RSAT-ADCS-Mgmt)
Remote Server Administration Tools \ Role Administration Tools \ Active Directory Certificate Services Tools \ Online Responder Tools (RSAT-Online-Responder)
Remote Server Administration Tools \ Role Administration Tools \ Active Directory Rights Management Services Tools (RSAT-ADRMS)
Remote Server Administration Tools \ Role Administration Tools \ Fax Server Tools (RSAT-Fax)
Remote Server Administration Tools \ Role Administration Tools \ File Services Tools (RSAT-File-Services)
Remote Server Administration Tools \ Role Administration Tools \ File Services Tools \ DFS Management Tools (RSAT-DFS-Mgmt-Con)
Remote Server Administration Tools \ Role Administration Tools \ File Services Tools \ File Server Resource Manager Tools (RSAT-FSRM-Mgmt)
Remote Server Administration Tools \ Role Administration Tools \ File Services Tools \ Services for Network File System Management Tools (RSAT-NFS-Admin)
Remote Server Administration Tools \ Role Administration Tools \ Network Policy and Access Services Tools (RSAT-NPAS)
Remote Server Administration Tools \ Role Administration Tools \ Print and Document Services Tools (RSAT-Print-Services)
Remote Server Administration Tools \ Role Administration Tools \ Volume Activation Tools (RSAT-VA-Tools)
Remote Server Administration Tools \ Role Administration Tools \ Windows Deployment Services Tools (WDS-AdminPack)
Simple TCP/IP Services (Simple-TCPIP)
SMTP Server (SMTP-Server)
TFTP Client (TFTP-Client)
WebDAV Redirector (WebDAV-Redirector)
Windows Biometric Framework (Biometric-Framework)
Windows Defender Features \ GUI for Windows Defender (Windows-Defender-Gui)
Windows Identity Foundation 3.5 (Windows-Identity-Foundation)
Windows PowerShell \ Windows PowerShell ISE (PowerShell-ISE)
Windows Search Service (Search-Service)
Windows TIFF IFilter (Windows-TIFF-IFilter)
Wireless LAN Service (Wireless-Networking)
XPS Viewer (XPS-Viewer)



2. Features included in Windows Server - Server Core

Roles included in Server Core

The Server Core installation option includes the following server roles.

Role => Name => Installed by default?

Active Directory Certificate Services => AD-Certificate => N
Active Directory Domain Services => AD-Domain-Services => N
Active Directory Federation Services => ADFS-Federation => N
Active Directory Lightweight Directory Services => ADLDS => N
Active Directory Rights Management Services => ADRMS => N
Device Health Attestation => DeviceHealthAttestationService => N
DHCP Server => DHCP => N
DNS Server => DNS => N
✓ ✓ ✓ File and Storage Services => FileAndStorage-Services => Y
Host Guardian Service => HostGuardianServiceRole => N
Hyper-V => Hyper-V => N
Print and Document Services => Print-Services => N
Remote Access => RemoteAccess => N
Remote Desktop Services => Remote-Desktop-Services => N
Volume Activation Services => VolumeActivation => N

Web Server IIS => Web-Server => N

Windows Server Essentials Experience => ServerEssentialsRole => N
Windows Server Update Services => UpdateServices => N





Role services included in Server Core

The Server Core installation option includes the following role services.

Role => Role service => Name => Installed by default?

Active Directory Certificate Services => Certification Authority => ADCS-Cert-Authority => N

Certificate Enrollment Policy Web Service => ADCS-Enroll-Web-Pol => N
Certificate Enrollment Web Service => ADCS-Enroll-Web-Svc => N
Certification Authority Web Enrollment => ADCS-Web-Enrollment => N
Network Device Enrollment Service => ADCS-Device-Enrollment => N
Online Responder => ADCS-Online-Cert => N

Active Directory Rights Management => Active Directory Rights Management Server => ADRMS-Server => N

Identity Federation Support => ADRMS-Identity => N

File and Storage Services => File and iSCSI Services => File-Services => N

File Server => FS-FileServer => N
BranchCache for Network Files => FS-BranchCache => N
Data Deduplication => FS-Data-Deduplication => N
DFS Namespaces => FS-DFS-Namespace => N
DFS Replication => FS-DFS-Replication => N
File Server Resource Manager => FS-Resource-Manager => N
File Server VSS Agent Service => FS-VSS-Agent => N
iSCSI Target Server => iSCSITarget-Server => N
iSCSI Target Storage Provider (VDS and VSS hardware providers) => iSCSITarget-VSS-VDS => N
Server for NFS => FS-NFS-Service => N
Work Folders => FS-SyncShareService => N
✓ ✓ ✓ Storage Services => Storage-Services => Y

Print and Document Services => Print Server => Print-Server => N

LPD Service => Print-LPD-Service => N

Remote Access => DirectAccess and VPN (RAS) => DirectAccess-VPN => N

Routing => Routing => N
Web Application Proxy => Web-Application-Proxy => N

Remote Desktop Services => Remote Desktop Connection Broker => RDS-Connection-Broker => N

Remote Desktop Licensing => RDS-Licensing => N
Remote Desktop Virtualization Host => RDS-Virtualization => N
Web Server (IIS) => Web Server => Web-WebServer => N
Common HTTP Features => Web-Common-Http => N
Default Document => Web-Default-Doc => N
Directory Browsing => Web-Dir-Browsing => N
HTTP Errors => Web-Http-Errors => N
Static Content => Web-Static-Content => N
HTTP Redirection => Web-Http-Redirect => N
WebDAV Publishing => Web-DAV-Publishing => N
Health and Diagnostics => Web-Health => N
HTTP Logging => Web-Http-Logging => N
Custom Logging => Web-Custom-Logging => N
Logging Tools => Web-Log-Libraries => N
ODBC Logging => Web-ODBC-Logging => N
Request Monitor => Web-Request-Monitor => N
Tracing => Web-Http-Tracing => N
Performance => Web-Performance => N
Static Content Compression => Web-Stat-Compression => N
Dynamic Content Compression => Web-Dyn-Compression => N
Security => Web-Security => N
Request Filtering => Web-Filtering => N
Basic Authentication => Web-Basic-Auth => N
Centralized SSL Certificate Support => Web-CertProvider => N
Client Certificate Mapping Authentication => Web-Client-Auth => N
Digest Authentication => Web-Digest-Auth => N
IIS Client Certificate Mapping Authentication => Web-Cert-Auth => N
IP and Domain Restrictions => Web-IP-Security => N
URL Authorization => Web-Url-Auth => N
Windows Authentication => Web-Windows-Auth => N
Application Development => Web-App-Dev => N
.NET Extensibility 3.5 => Web-Net-Ext => N
.NET Extensibility 4.6 => Web-Net-Ext45 => N
Application Initialization => Web-AppInit => N
ASP => Web-ASP => N
ASP.NET 3.5 => Web-Asp-Net => N
ASP.NET 4.6 => Web-Asp-Net45 => N
CGI => Web-CGI => N
ISAPI Extensions => Web-ISAPI-Ext => N
ISAPI Filters => Web-ISAPI-Filter => N
Server Side Includes => Web-Includes => N
WebSocket Protocol => Web-WebSockets => N
FTP Server => Web-Ftp-Server => N
FTP Service => Web-Ftp-Service => N
FTP Extensibility => Web-Ftp-Ext => N
Management Tools => Web-Mgmt-Tools => N
IIS 6 Management Compatibility => Web-Mgmt-Compat => N
IIS 6 Metabase Compatibility => Web-Metabase => N
IIS 6 Scripting Tools => Web-Lgcy-Scripting => N
IIS 6 WMI Compatibility => Web-WMI => N
IIS Management Scripts and Tools => Web-Scripting-Tools => N
Management Service => Web-Mgmt-Service => N

Windows Server Update Services => WID Connectivity => UpdateServices-WidDB => N

WSUS Services => UpdateServices-Services => N
SQL Server Connectivity => UpdateServices-DB => N





Features included in Server Core

The Server Core installation option includes the following features.

Feature => Name => Installed by default?
.NET Framework 3.5 Features => NET-Framework-Features => N
.NET Framework 3.5 (includes .NET 2.0 and 3.0) => NET-Framework-Core => (removed)
HTTP Activation => NET-HTTP-Activation => N
Non-HTTP Activation => NET-Non-HTTP-Activ => N
✓ ✓ ✓ .NET Framework 4.6 Features => NET-Framework-45-Features => Y
✓ ✓ ✓ .NET Framework 4.6 => NET-Framework-45-Core => Y
ASP.NET 4.6 => NET-Framework-45-ASPNET => N
✓ ✓ ✓ WCF Services => NET-WCF-Services45 => Y
HTTP Activation => NET-WCF-HTTP-Activation45 => N
Message Queuing (MSMQ) Activation => NET-WCF-MSMQ-Activation45 => N
Named Pipe Activation => NET-WCF-Pipe-Activation45 => N
TCP Activation => NET-WCF-TCP-Activation45 => N
✓ ✓ ✓ TCP Port Sharing => NET-WCF-TCP-PortSharing45 => Y
Background Intelligent Transfer Service (BITS) => BITS => N
Compact Server => BITS-Compact-Server => N
BitLocker Drive Encryption => BitLocker => N
BranchCache => BranchCache => N
Client for NFS => NFS-Client => N
Containers => Containers => N
Data Center Bridging => Data-Center-Bridging => N
Enhanced Storage => EnhancedStorage => N
Failover Clustering => Failover-Clustering => N
Group Policy Management => GPMC => N
I/O Quality of Service => DiskIo-QoS => N
IIS Hostable Web Core => Web-WHC => N
IP Address Management (IPAM) Server => IPAM => N
iSNS Server service => ISNS => N
Management OData IIS Extension => ManagementOdata => N
Media Foundation => Server-Media-Foundation => N
Message Queuing => MSMQ => N
Message Queuing Services => MSMQ-Services => N
Message Queuing Server => MSMQ-Server => N
Directory Service Integration => MSMQ-Directory => N
HTTP Support => MSMQ-HTTP-Support => N
Message Queuing Triggers => MSMQ-Triggers => N
Routing Service => MSMQ-Routing => N
Message Queuing DCOM Proxy => MSMQ-DCOM => N
Multipath I/O => Multipath-IO => N
MultiPoint Connector => MultiPoint-Connector => N
MultiPoint Connector Services => MultiPoint-Connector-Services => N
MultiPoint Manager and MultiPoint Dashboard => MultiPoint-Tools => N
Network Load Balancing => NLB => N
Peer Name Resolution Protocol => PNRP => N
Quality Windows Audio Video Experience => qWave => N
Remote Differential Compression => RDC => N
Remote Server Administration Tools => RSAT => N
Feature Administration Tools => RSAT-Feature-Tools => N
BitLocker Drive Encryption Administration Utilities => RSAT-Feature-Tools-BitLocker => N
DataCenterBridging LLDP Tools => RSAT-DataCenterBridging-LLDP-Tools => N
Failover Clustering Tools => RSAT-Clustering => N
Failover Cluster Module for Windows PowerShell => RSAT-Clustering-PowerShell => N
Failover Cluster Automation Server => RSAT-Clustering-AutomationServer => N
Failover Cluster Command Interface => RSAT-Clustering-CmdInterface => N
IP Address Management (IPAM) Client => IPAM-Client-Feature => N
Shielded VM Tools => RSAT-Shielded-VM-Tools => N
Storage Replica Module for Windows PowerShell => RSAT-Storage-Replica => N
Role Administration Tools => RSAT-Role-Tools => N
AD DS and AD LDS Tools => RSAT-AD-Tools => N
Active Directory module for Windows PowerShell => RSAT-AD-PowerShell => N
AD DS Tools => RSAT-ADDS => N
Active Directory Administrative Center => RSAT-AD-AdminCenter => N
AD DS Snap-Ins and Command-Line Tools => RSAT-ADDS-Tools => N
AD LDS Snap-Ins and Command-Line Tools => RSAT-ADLDS => N
Hyper-V Management Tools => RSAT-Hyper-V-Tools => N
Hyper-V Module for Windows PowerShell => Hyper-V-PowerShell => N
Windows Server Update Services Tools => UpdateServices-RSAT => N
API and PowerShell cmdlets => UpdateServices-API => N
DHCP Server Tools => RSAT-DHCP => N
DNS Server Tools => RSAT-DNS-Server => N
Remote Access Management Tools => RSAT-RemoteAccess => N
Remote Access module for Windows PowerShell => RSAT-RemoteAccess-PowerShell => N
RPC over HTTP Proxy => RPC-over-HTTP-Proxy => N
Setup and Boot Event Collection => Setup-and-Boot-Event-Collection => N
Simple TCP/IP Services => Simple-TCPIP => N
✓ ✓ ✓ SMB 1.0/CIFS File Sharing Support => FS-SMB1 => Y
SMB Bandwidth Limit => FS-SMBBW => N
SNMP Service => SNMP-Service => N
SNMP WMI Provider => SNMP-WMI-Provider => N
Telnet Client => Telnet-Client => N
VM Shielding Tools for Fabric Management => FabricShieldedTools => N
✓ ✓ ✓ Windows Defender Features => Windows-Defender-Features => Y
✓ ✓ ✓ Windows Defender => Windows-Defender => Y
Windows Internal Database => Windows-Internal-Database => N
✓ ✓ ✓ Windows PowerShell => PowerShellRoot => Y
✓ ✓ ✓ Windows PowerShell 5.1 => PowerShell => Y
Windows PowerShell 2.0 Engine => PowerShell-V2 => (removed)
Windows PowerShell Desired State Configuration Service => DSC-Service => N
Windows PowerShell Web Access => WindowsPowerShellWebAccess => N
Windows Process Activation Service => WAS => N
Process Model => WAS-Process-Model => N
.NET Environment 3.5 => WAS-NET-Environment => N
Configuration APIs => WAS-Config-APIs => N
Windows Server Backup => Windows-Server-Backup => N
Windows Server Migration Tools => Migration => N
Windows Standards-Based Storage Management => WindowsStorageManagementService => N
WinRM IIS Extension => WinRM-IIS-Ext => N
WINS Server => WINS => N
✓ ✓ ✓ WoW64 Support => WoW64-Support => Y



在整个列表中,开箱即用仅支持12件事,因此确实限制了您。它们分别标有✓✓✓

关于c++ - 针对Windows Server Core的C++,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58599475/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com