Last active
February 26, 2016 09:22
-
-
Save owlsperspective/91d195ef67befadbe01d to your computer and use it in GitHub Desktop.
Windowsがサーバ版かどうかを調べる
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function IsWindowsServer: Boolean; | |
var | |
OSVI: TOSVersionInfoEx; | |
ConditionMask: UInt64; | |
begin | |
FillChar(OSVI,SizeOf(TOSVersionInfoEX),0); | |
OSVI.dwOSVersionInfoSize := SizeOf(OSVI); | |
OSVI.wProductType := VER_NT_WORKSTATION; | |
ConditionMask := VerSetConditionMask(0,VER_PRODUCT_TYPE,VER_EQUAL); | |
Result := not (VerifyVersionInfo(OSVI,VER_PRODUCT_TYPE,ConditionMask)); | |
end; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment