Browse Source

vlmcsd-svn812-2015-08-30-Hotbird64

pull/5/head svn812
Wind4 6 years ago
commit
1af203d2a8
  1. 563
      GNUmakefile
  2. 14
      KMSServer.idl
  3. 278
      KMSServer_c_mingw_gcc.c
  4. 731
      KMSServer_c_x64_mingw_gcc.c
  5. 80
      KMSServer_h.h
  6. 282
      KMSServer_s2_mingw_gcc.c
  7. 730
      KMSServer_s2_x64_mingw_gcc.c
  8. 7
      Makefile
  9. 13
      README
  10. 110
      README.compile-and-pre-built-binaries
  11. 55
      README.openssl
  12. 1458
      buildroot-configs/arm/little-endian/glibc/armv4-el-glibc2.20-gcc4.9.1-binutils2.24.config
  13. 1457
      buildroot-configs/arm/little-endian/glibc/armv4t-el-glibc2.20-gcc4.9.1-binutils2.24-thumb1.config
  14. 1485
      buildroot-configs/arm/little-endian/glibc/armv5-el-glibc2.20-gcc4.9.1-binutils2.24.config
  15. 1630
      buildroot-configs/arm/little-endian/glibc/armv5t-el-glibc2.20-gcc4.9.2-binutils2.25-thumb1.config
  16. 1474
      buildroot-configs/arm/little-endian/glibc/armv6-el-hf-glibc2.20-gcc4.9.1-binutils2.24.config
  17. 1485
      buildroot-configs/arm/little-endian/glibc/armv7-el-glibc2.20-gcc4.9.1-binutils2.24-thumb2.config
  18. 1495
      buildroot-configs/arm/little-endian/musl/armv4-el-musl-gcc4.9.1-binutils2.24.config
  19. 1496
      buildroot-configs/arm/little-endian/musl/armv4t-el-musl-gcc4.9.1-binutils2.24-thumb1.config
  20. 1522
      buildroot-configs/arm/little-endian/musl/armv5-el-musl-gcc4.9.1-binutils2.24.config
  21. 1521
      buildroot-configs/arm/little-endian/musl/armv5t-el-musl-gcc4.9.1-binutils2.24-thumb1.config
  22. 1505
      buildroot-configs/arm/little-endian/musl/armv7-el-musl-gcc4.9.1-binutils2.24-thumb2.config
  23. 2081
      buildroot-configs/arm/little-endian/uclibc/armv4-el-uclibc0.9.33.2-gcc4.9.1-binutils2.24.config
  24. 2080
      buildroot-configs/arm/little-endian/uclibc/armv4t-el-uclibc0.9.33.2-gcc4.9.1-binutils2.24-thumb1.config
  25. 2110
      buildroot-configs/arm/little-endian/uclibc/armv5-el-uclibc0.9.33.2-gcc4.9.1-binutils2.24.config
  26. 2109
      buildroot-configs/arm/little-endian/uclibc/armv5t-el-uclibc0.9.33.2-gcc4.9.1-binutils2.24-thumb1.config
  27. 2110
      buildroot-configs/arm/little-endian/uclibc/armv7-el-uclibc0.9.33.2-gcc4.9.1-binutils2.24-thumb2.config
  28. 1407
      buildroot-configs/mips/big-endian/glibc/mips16-eb-gcc4.9-glibc2.20-binutils2.24.config
  29. 1407
      buildroot-configs/mips/big-endian/glibc/mips32-eb-gcc4.9-glibc2.20-binutils2.24.config
  30. 1407
      buildroot-configs/mips/big-endian/glibc/mips32r2-eb-gcc4.9-glibc2.20-binutils2.24.config
  31. 1417
      buildroot-configs/mips/big-endian/musl/mips32-eb-gcc4.9-musl-binutils2.24.config
  32. 1417
      buildroot-configs/mips/big-endian/musl/mips32r2-eb-gcc4.9-musl-binutils2.24.config
  33. 2004
      buildroot-configs/mips/big-endian/uclibc/mips16-eb-gcc4.9-uclibc0.9.33.2-binutils2.24.config
  34. 2003
      buildroot-configs/mips/big-endian/uclibc/mips32-eb-gcc4.9-uclibc0.9.33.2-binutils2.24.config
  35. 2003
      buildroot-configs/mips/big-endian/uclibc/mips32r2-eb-gcc4.9-uclibc0.9.33.2-binutils2.24.config
  36. 1411
      buildroot-configs/mips/little-endian/glibc/mips16-el-gcc4.9-glibc2.20-binutils2.24.config
  37. 1411
      buildroot-configs/mips/little-endian/glibc/mips32-el-gcc4.9-glibc2.20-binutils2.24.config
  38. 1411
      buildroot-configs/mips/little-endian/glibc/mips32r2-el-gcc4.9-glibc2.20-binutils2.24.config
  39. 1421
      buildroot-configs/mips/little-endian/musl/mips32-el-gcc4.9-uclibc0.9.33.2-binutils2.24.config
  40. 1421
      buildroot-configs/mips/little-endian/musl/mips32r2-el-gcc4.9-uclibc0.9.33.2-binutils2.24.config
  41. 2010
      buildroot-configs/mips/little-endian/uclibc/mips16-el-gcc4.9-uclibc0.9.33.2-binutils2.24.config
  42. 2010
      buildroot-configs/mips/little-endian/uclibc/mips32-el-gcc4.9-uclibc0.9.33.2-binutils2.24.config
  43. 2010
      buildroot-configs/mips/little-endian/uclibc/mips32r2-el-gcc4.9-uclibc0.9.33.2-binutils2.24.config
  44. 2038
      buildroot-configs/ppc/big-endian/uclibc/ppc-eb-gcc4.9-uclibc0.9.33.2-binutils2.24.config
  45. 583
      config.h
  46. 328
      crypto.c
  47. 59
      crypto.h
  48. 212
      crypto_internal.c
  49. 38
      crypto_internal.h
  50. 269
      crypto_openssl.c
  51. 53
      crypto_openssl.h
  52. 39
      crypto_polarssl.h
  53. 170
      crypto_windows.c
  54. 31
      crypto_windows.h
  55. 330
      dns_srv.c
  56. 103
      dns_srv.h
  57. 171
      endian.c
  58. 296
      endian.h
  59. BIN
      floppy144.vfd
  60. 369
      helpers.c
  61. 34
      helpers.h
  62. 1118
      kms.c
  63. 287
      kms.h
  64. 35
      libkms-test.c
  65. 117
      libkms.c
  66. 33
      libkms.h
  67. 31
      make_dragonfly
  68. 46
      make_freebsd
  69. 3511
      make_linux
  70. 25
      make_minix
  71. 35
      make_netbsd
  72. 33
      make_openbsd
  73. 97
      make_osx
  74. 57
      make_solaris
  75. 79
      make_windows
  76. 17
      make_windows_native
  77. 191
      msrpc-client.c
  78. 22
      msrpc-client.h
  79. 219
      msrpc-server.c
  80. 10
      msrpc-server.h
  81. 569
      nameser.h
  82. 236
      nameser_compat.h
  83. 675
      network.c
  84. 34
      network.h
  85. 355
      ns_name.c
  86. 9
      ns_name.h
  87. 206
      ns_parse.c
  88. 73
      ns_parse.h
  89. 346
      ntservice.c
  90. 28
      ntservice.h
  91. 240
      output.c
  92. 27
      output.h
  93. 499
      resolv.h
  94. 32
      resolv_static.h
  95. 1113
      rpc.c
  96. 178
      rpc.h
  97. 98
      shared_globals.c
  98. 156
      shared_globals.h
  99. 266
      types.h
  100. 255
      vlmcs.1

563
GNUmakefile

@ -0,0 +1,563 @@
################################################################################
.PHONY: clean
PROGRAM_NAME ?= vlmcsd
CLIENT_NAME ?= vlmcs
MULTI_NAME ?= vlmcsdmulti
CONFIG ?= config.h
# crypto library to use for standard algos, could save ~1-2kb ;)
# can be either 'openssl', 'polarssl' or anything other for internal impl
CRYPTO ?= internal
# use DNS_PARSER=internal if your OS doesn't supply the DNS parser routines
DNS_PARSER ?= OS
# You should supply your own version string here
VLMCSD_VERSION ?= $(shell test -d .svn && echo svn`svnversion`)
FEATURES ?= full
VERBOSE ?= NO
################################################################################
CC ?= gcc
TARGETPLATFORM := $(shell LANG=en_US.UTF-8 $(CC) -v 2>&1 | grep '^Target: ' | cut -f 2 -d ' ')
ifneq (,$(findstring darwin,$(TARGETPLATFORM)))
DARWIN := 1
UNIX := 1
endif
ifneq (,$(findstring androideabi,$(TARGETPLATFORM)))
ANDROID := 1
UNIX := 1
endif
ifneq (,$(findstring minix,$(TARGETPLATFORM)))
MINIX := 1
UNIX := 1
endif
ifneq (,$(findstring mingw,$(TARGETPLATFORM)))
MINGW := 1
WIN := 1
endif
ifneq (,$(findstring cygwin,$(TARGETPLATFORM)))
CYGWIN := 1
WIN := 1
endif
ifneq (,$(findstring freebsd,$(TARGETPLATFORM)))
FREEBSD := 1
UNIX := 1
BSD := 1
endif
ifneq (,$(findstring netbsd,$(TARGETPLATFORM)))
NETBSD := 1
UNIX := 1
BSD := 1
endif
ifneq (,$(findstring openbsd,$(TARGETPLATFORM)))
OPENBSD := 1
UNIX := 1
BSD := 1
endif
ifneq (,$(findstring solaris,$(TARGETPLATFORM)))
SOLARIS := 1
UNIX := 1
endif
ifneq (,$(findstring linux,$(TARGETPLATFORM)))
LINUX := 1
UNIX := 1
endif
ifeq ($(CYGWIN),1)
DLL_NAME ?= cygkms.dll
else ifeq ($(WIN),1)
DLL_NAME ?= libkms.dll
else ifeq ($(DARWIN),1)
DLL_NAME ?= libkms.dylib
else
DLL_NAME ?= libkms.so
endif
BASECFLAGS = -DCONFIG=\"$(CONFIG)\" -DBUILD_TIME=$(shell date '+%s') -g -Os -fno-strict-aliasing -fomit-frame-pointer -ffunction-sections -fdata-sections
BASELDFLAGS =
STRIPFLAGS =
CLIENTLDFLAGS =
SERVERLDFLAGS =
ifeq ($(NOLIBS),1)
NOLRESOLV=1
NOLPTHREAD=1
endif
ifneq ($(NO_DNS),1)
ifneq ($(ANDROID),1)
ifneq ($(NOLRESOLV),1)
ifeq ($(MINGW),1)
BASELDFLAGS += -ldnsapi
endif
ifeq ($(LINUX),1)
BASELDFLAGS += -lresolv
endif
ifeq ($(DARWIN),1)
BASELDFLAGS += -lresolv
endif
ifeq ($(CYGWIN),1)
DNS_PARSER := internal
BASELDFLAGS += -lresolv
endif
ifeq ($(OPENBSD),1)
DNS_PARSER := internal
endif
ifeq ($(SOLARIS),1)
BASELDFLAGS += -lresolv
endif
endif
endif
else
BASECFLAGS += -DNO_DNS
endif
ifneq ($(CAT),2)
BASECFLAGS += "-Wall"
endif
ifeq ($(DARWIN), 1)
STRIPFLAGS += -Wl,-S -Wl,-x
BASECFLAGS += -Wno-deprecated-declarations
else ifeq ($(shell uname), SunOS)
STRIPFLAGS += -s
ifeq ($(notdir $(LD_ALTEXEC)),gld)
BASELDFLAGS += -Wl,--gc-sections
endif
BASELDFLAGS += -lsocket
else
ifneq ($(CC),tcc)
BASELDFLAGS += -Wl,--gc-sections
endif
STRIPFLAGS += -s
endif
ifeq ($(FEATURES), embedded)
BASECFLAGS += -DNO_HELP -DNO_USER_SWITCH -DNO_BASIC_PRODUCT_LIST -DNO_CUSTOM_INTERVALS -DNO_PID_FILE -DNO_VERBOSE_LOG
else ifeq ($(FEATURES), autostart)
BASECFLAGS += -DNO_HELP
else ifeq ($(FEATURES), minimum)
BASECFLAGS += -DNO_TIMEOUT -DNO_SIGHUP -DNO_CL_PIDS -DNO_EXTENDED_PRODUCT_LIST -DNO_BASIC_PRODUCT_LIST -DNO_LOG -DNO_RANDOM_EPID -DNO_INI_FILE -DNO_INI_FILE -DNO_HELP -DNO_CUSTOM_INTERVALS -DNO_PID_FILE -DNO_USER_SWITCH -DNO_VERBOSE_LOG -DNO_LIMIT
else ifeq ($(FEATURES), most)
BASECFLAGS += -DNO_SIGHUP -DNO_PID_FILE -DNO_LIMIT
else ifeq ($(FEATURES), inetd)
BASECFLAGS += -DNO_SIGHUP -DNO_SOCKETS -DNO_PID_FILE -DNO_LIMIT
else ifeq ($(FEATURES), fixedepids)
BASECFLAGS += -DNO_SIGHUP -DNO_CL_PIDS -DNO_RANDOM_EPID -DNO_INI_FILE
endif
ifdef INI
BASECFLAGS += -DINI_FILE=\"$(INI)\"
endif
ifeq ($(THREADS), 1)
BASECFLAGS += -DUSE_THREADS
endif
ifeq ($(CHILD_HANDLER), 1)
BASECFLAGS += -DCHILD_HANDLER
endif
ifeq ($(NO_TIMEOUT), 1)
BASECFLAGS += -DNO_TIMEOUT
endif
ifdef WINDOWS
BASECFLAGS += -DEPID_WINDOWS=\"$(WINDOWS)\"
endif
ifdef OFFICE2010
BASECFLAGS += -DEPID_OFFICE2010=\"$(OFFICE2010)\"
endif
ifdef OFFICE2013
BASECFLAGS += -DEPID_OFFICE2013=\"$(OFFICE2013)\"
endif
ifdef HWID
BASECFLAGS += -DHWID=$(HWID)
endif
ifdef TERMINAL_WIDTH
BASECFLAGS += -DTERMINAL_FIXED_WIDTH=$(TERMINAL_WIDTH)
endif
ifeq ($(NOPROCFS), 1)
BASECFLAGS += -DNO_PROCFS
endif
ifeq ($(AUXV), 1)
BASECFLAGS += -DUSE_AUXV
endif
ifneq ($(ANDROID), 1)
ifneq ($(MINIX), 1)
ifneq ($(NOLPTHREAD), 1)
ifeq ($(findstring NO_LIMIT,$(CFLAGS) $(BASECFLAGS)),)
BASELDFLAGS += -lpthread
endif
ifneq ($(findstring USE_THREADS,$(BASECFLAGS)),)
BASELDFLAGS += -lpthread
endif
endif
endif
endif
$(MULTI_NAME): BASECFLAGS += -DMULTI_CALL_BINARY=1
all: $(CLIENT_NAME) $(PROGRAM_NAME)
ifdef CAT
allmulti: $(CLIENT_NAME) $(PROGRAM_NAME) $(MULTI_NAME)
endif
ifneq ($(strip $(VLMCSD_VERSION)),)
BASECFLAGS += -DVERSION=\"$(VLMCSD_VERSION),\ built\ $(shell date -u '+%Y-%m-%d %H:%M:%S' | sed -e 's/ /\\ /g')\ UTC\"
endif
ifdef CAT
BASECFLAGS += -DONE_FILE
endif
SRCS = crypto.c kms.c endian.c output.c shared_globals.c helpers.c
HEADERS = $(CONFIG) types.h rpc.h vlmcsd.h endian.h crypto.h kms.h network.h output.h shared_globals.h vlmcs.h helpers.h
DEPS = $(MULTI_SRCS:.c=.d)
VLMCSD_SRCS = vlmcsd.c $(SRCS)
VLMCSD_OBJS = $(VLMCSD_SRCS:.c=.o)
VLMCS_SRCS = vlmcs.c $(SRCS)
VLMCS_OBJS = $(VLMCS_SRCS:.c=.o)
MULTI_SRCS = vlmcsd.c vlmcs.c vlmcsdmulti.c $(SRCS)
MULTI_OBJS = $(MULTI_SRCS:.c=.o)
DLL_SRCS = libkms.c $(SRCS)
DLL_OBJS = $(DLL_SRCS:.c=.o)
PDFDOCS = vlmcs.1.pdf vlmcsd.7.pdf vlmcsd.8.pdf vlmcsdmulti.1.pdf vlmcsd.ini.5.pdf
HTMLDOCS = $(PDFDOCS:.pdf=.html)
UNIXDOCS = $(PDFDOCS:.pdf=.unix.txt)
DOSDOCS = $(PDFDOCS:.pdf=.dos.txt)
ifneq ($(NO_DNS),1)
VLMCS_SRCS += dns_srv.c
MULTI_SRCS += dns_srv.c
ifeq ($(DNS_PARSER),internal)
ifneq ($(MINGW),1)
VLMCS_SRCS += ns_parse.c ns_name.c
MULTI_SRCS += ns_parse.c ns_name.c
BASECFLAGS += "-DDNS_PARSER_INTERNAL"
endif
endif
endif
ifeq ($(MSRPC),1)
VLMCSD_SRCS += msrpc-server.c
VLMCS_SRCS += msrpc-client.c
MULTI_SRCS += msrpc-server.c msrpc-client.c
BASECFLAGS += -DUSE_MSRPC -Wno-unknown-pragmas
BASELDFLAGS += -lrpcrt4
else
SRCS += network.c rpc.c
endif
ifeq "$(WIN)" "1"
VLMCSD_SRCS += ntservice.c
MULTI_SRCS += ntservice.c
endif
ifeq ($(CRYPTO), openssl_with_aes)
BASECFLAGS += -D_CRYPTO_OPENSSL -D_USE_AES_FROM_OPENSSL
BASELDFLAGS += -lcrypto
SRCS += crypto_openssl.c
else ifeq ($(CRYPTO), openssl_with_aes_soft)
BASECFLAGS += -D_CRYPTO_OPENSSL -D_USE_AES_FROM_OPENSSL -D_OPENSSL_SOFTWARE
BASELDFLAGS += -lcrypto
SRCS += crypto_openssl.c
else ifeq ($(CRYPTO), openssl)
BASECFLAGS += -D_CRYPTO_OPENSSL
BASELDFLAGS += -lcrypto
SRCS += crypto_openssl.c
else ifeq ($(CRYPTO), polarssl)
BASECFLAGS += -D_CRYPTO_POLARSSL
BASELDFLAGS += -lpolarssl
else ifeq ($(CRYPTO), windows)
BASECFLAGS += -D_CRYPTO_WINDOWS
SRCS += crypto_windows.c
#BASELDFLAGS += -lpolarssl
else
BASECFLAGS += -D_CRYPTO_INTERNAL
SRCS += crypto_internal.c
endif
ifneq ($(STRIP),0)
BASELDFLAGS += $(STRIPFLAGS)
endif
ifeq ($(OPENSSL_HMAC),0)
BASECFLAGS += -D_OPENSSL_NO_HMAC
endif
ifeq ($(DEPENDENCIES),2)
BASECFLAGS += -MMD
endif
ifeq ($(VERBOSE),3)
COMPILER := $(shell printf "%-40s" $(notdir $(CC)))
endif
ifeq ($(CAT),2)
LDCMD := CC/LD
else
LDCMD := LD
endif
-include $(MULTI_SRCS:.c=.d)
%.o: %.c
ifeq ($(VERBOSE),1)
$(CC) $(PLATFORMFLAGS) $(BASECFLAGS) $(CFLAGS) $(PLATFORMFLAGS) -c $<
ifeq ($(DEPENDENCIES),1)
$(CC) $(PLATFORMFLAGS) $(BASECFLAGS) $(CFLAGS) $(PLATFORMFLAGS) -MM -MF $*.d $<
endif
else
@echo "$(COMPILER) CC $@ <- $<"
@$(CC) $(PLATFORMFLAGS) $(BASECFLAGS) $(CFLAGS) $(PLATFORMFLAGS) -c $<
ifeq ($(DEPENDENCIES),1)
@echo "$(COMPILER) DEP $*.d <- $<"
@$(CC) $(PLATFORMFLAGS) $(BASECFLAGS) $(CFLAGS) $(PLATFORMFLAGS) -MM -MF $*.d $<
endif
endif
vlmcsd_all.c: $(VLMCSD_SRCS)
ifeq ($(VERBOSE),1)
cat $^ > $@
else
@echo "$(COMPILER) CAT $@ <- $^"
@cat $^ > $@
endif
vlmcs_all.c: $(VLMCS_SRCS)
ifeq ($(VERBOSE),1)
cat $^ > $@
else
@echo "$(COMPILER) CAT $@ <- $^"
@cat $^ > $@
endif
vlmcsdmulti_all.c: $(MULTI_SRCS)
ifeq ($(VERBOSE),1)
cat $^ > $@
else
@echo "$(COMPILER) CAT $@ <- $^"
@cat $^ > $@
endif
ifdef CAT
ifeq ($(CAT),2)
$(PROGRAM_NAME): vlmcsd_all.c
else
$(PROGRAM_NAME): vlmcsd_all.o
endif
else
$(PROGRAM_NAME): $(VLMCSD_OBJS)
endif
ifeq ($(VERBOSE),1)
+$(CC) -o $@ $^ $(PLATFORMFLAGS) $(BASECFLAGS) $(CFLAGS) $(BASELDFLAGS) $(LDFLAGS)
else
+@echo "$(COMPILER) $(LDCMD) $@ <- $^"
+@$(CC) -o $@ $^ $(PLATFORMFLAGS) $(BASECFLAGS) $(CFLAGS) $(BASELDFLAGS) $(LDFLAGS)
endif
ifdef CAT
ifeq ($(CAT),2)
$(CLIENT_NAME): vlmcs_all.c
else
$(CLIENT_NAME): vlmcs_all.o
endif
else
$(CLIENT_NAME): $(VLMCS_OBJS)
endif
ifeq ($(VERBOSE),1)
+$(CC) -o $@ $^ $(PLATFORMFLAGS) $(BASECFLAGS) $(CFLAGS) $(BASELDFLAGS) $(LDFLAGS)
else
+@echo "$(COMPILER) $(LDCMD) $@ <- $^"
+@$(CC) -o $@ $^ $(PLATFORMFLAGS) $(BASECFLAGS) $(CFLAGS) $(BASELDFLAGS) $(LDFLAGS)
endif
ifdef CAT
ifeq ($(CAT),2)
$(MULTI_NAME): vlmcsdmulti_all.c
else
$(MULTI_NAME): vlmcsdmulti_all.o
endif
else
$(MULTI_NAME): $(MULTI_OBJS)
endif
ifeq ($(VERBOSE),1)
+$(CC) -o $@ $^ $(PLATFORMFLAGS) $(BASECFLAGS) $(CFLAGS) $(BASELDFLAGS) $(LDFLAGS)
else
+@echo "$(COMPILER) $(LDCMD) $@ <- $^"
+@$(CC) -o $@ $^ $(PLATFORMFLAGS) $(BASECFLAGS) $(CFLAGS) $(BASELDFLAGS) $(LDFLAGS)
endif
$(DLL_NAME): $(DLL_SRCS)
ifeq ($(VERBOSE),1)
+$(CC) -o $@ $^ $(PLATFORMFLAGS) $(BASECFLAGS) $(CFLAGS) $(BASELDFLAGS) $(LDFLAGS) -shared -DIS_LIBRARY=1 -UNO_SOCKETS -UUSE_MSRPC
else
+@echo "$(COMPILER) $(LDCMD) $@ <- $^"
+@$(CC) -o $@ $^ $(PLATFORMFLAGS) $(BASECFLAGS) $(CFLAGS) $(BASELDFLAGS) $(LDFLAGS) -shared -DIS_LIBRARY=1 -UNO_SOCKETS -UUSE_MSRPC
endif
%.pdf : %
ifeq ($(shell uname), Darwin)
groff -Tps -mandoc -c $< | pstopdf -i -o $@
else
groff -Tpdf -mandoc -c $< > $@
endif
%.html : %
groff -Thtml -mandoc -c $< > $@
%.unix.txt : %
groff -P -c -Tutf8 -mandoc -c $< | col -bx > $@
%.dos.txt : %.unix.txt
# unix2dos -n $< $@
# sed -e 's/$$/\r/' $< > $@
awk 'sub("$$", "\r")' $< > $@
pdfdocs : $(PDFDOCS)
dosdocs : $(DOSDOCS)
unixdocs : $(UNIXDOCS)
htmldocs : $(HTMLDOCS)
alldocs : $(UNIXDOCS) $(HTMLDOCS) $(PDFDOCS) $(DOSDOCS)
clean:
rm -f *.o *.d *_all.c $(PROGRAM_NAME) $(MULTI_NAME) $(DLL_NAME) $(CLIENT_NAME) $(PDFDOCS) $(DOSDOCS) $(UNIXDOCS) $(HTMLDOCS)
help:
@echo "Type:"
@echo " ${MAKE} - to build $(PROGRAM_NAME) and $(CLIENT_NAME)"
@echo " ${MAKE} clean - to remove $(PROGRAM_NAME) and $(CLIENT_NAME)"
@echo " ${MAKE} help - to see this help"
@echo " ${MAKE} pdfdocs - Create PDF versions of the documentation (Requires groff with PDF support)."
@echo " ${MAKE} htmldocs - Create HTML versions of the documentation."
@echo " ${MAKE} unixdocs - Create Unix TXT versions of the documentation."
@echo " ${MAKE} dosdocs - Create DOS/Windows TXT versions of the documentation."
@echo " ${MAKE} alldocs - Create all versions of the documentation."
@echo " ${MAKE} -j <x> - Use <x> parallel tasks (SMP support) when compiling $(PROGRAM_NAME) and $(CLIENT_NAME)"
@echo ""
@echo " ${MAKE} $(PROGRAM_NAME) - to build the server only."
@echo " ${MAKE} $(CLIENT_NAME) - to build the client only."
@echo " ${MAKE} $(MULTI_NAME) - to build $(PROGRAM_NAME) and $(CLIENT_NAME) in a single multi-call binary"
@echo " ${MAKE} $(DLL_NAME) - to build the shared library $(DLL_NAME)"
@echo ""
@echo "Options:"
@echo " CONFIG=<x> Compile <x> as instead of config.h."
@echo " INI=<x> Compile $(PROGRAM_NAME) with default ini file <x>"
@echo " PROGRAM_NAME=<x> Use <x> as output file name for the KMS server. Defaults to vlmcsd."
@echo " CLIENT_NAME=<x> Use <x> as output file name for the KMS client. Defaults to vlmcs."
@echo " MULTI_NAME=<x> Use <x> as output file name for the multi-call binary. Defaults to vlmcsdmulti."
@echo " DEPENDENCIES=1 Create dependency files."
@echo " CRYPTO=openssl Use openssl for SHA256/HMAC calculations."
@echo " CRYPTO=openssl_with_aes EXPERIMENTAL: Use openssl for SHA256/HMAC and AES calculations (hardware, e.g. AES-NI on x86)."
@echo " CRYPTO=openssl_with_aes_soft EXPERIMENTAL: Use openssl for SHA256/HMAC and AES calculations (software)."
@echo " CRYPTO=polarssl Use polarssl instead of internal crypto code for SHA256/HMAC calculations."
@echo " CRYPTO=windows Use Windows CryptoAPI instead of internal crypto code for SHA256/HMAC calculations."
@echo " CC=<x> Use compiler <x>. Supported compilers are gcc, icc, tcc and clang. Others may or may not work."
@echo " TERMINAL_WIDTH=<x> Assume a fixed terminal width of <x> columns. Use in case of problems only."
@echo " VLMCSD_VERSION=<x> Sets <x> as your version identifier. Defaults to \"private build\"."
@echo " CFLAGS=<x> Pass <x> as additional arguments to the compiler."
@echo " LDFLAGS=<x> Pass <x> as additional arguments to the linker."
@echo " PLATFORMFLAGS=<x> Pass <x> as additional arguments to the compiler and the linker."
@echo " BASECFLAGS=<x> Pass only <x> as arguments to the compiler (advanced users only)."
@echo " BASELDFLAGS=<x> Pass only <x> as arguments to the linker (advanced users only)."
@echo " STRIP=0 Don't strip debug information from $(PROGRAM_NAME) and $(CLIENT_NAME) (for developers)."
@echo " VERBOSE=1 Be verbose when making targets."
@echo " VERBOSE=3 Show name of compiler."
@echo " THREADS=1 Use threads instead of fork(). Automatically set for native Windows. Recommended for Cygwin."
@echo " WINDOWS=<x> Use <x> as the default ePID for Windows (when using $(PROGRAM_NAME) with -r 0)."
@echo " OFFICE2010=<x> Use <x> as the default ePID for Office2010 (when using $(PROGRAM_NAME) with -r 0)."
@echo " OFFICE2013=<x> Use <x> as the default ePID for Office2013 (when using $(PROGRAM_NAME) with -r 0)."
@echo " HWID=<x> Use <x> as the default HWID (when it can't be found in an ini file)."
@echo " FEATURES=full Compile $(PROGRAM_NAME) with all features (default)."
@echo " FEATURES=most Compile $(PROGRAM_NAME) without rarely used features."
@echo " FEATURES=embedded Compile $(PROGRAM_NAME) with typical features for embedded systems."
@echo " FEATURES=autostart Removes features typically not needed if you place $(PROGRAM_NAME) in an autostart script."
@echo " FEATURES=inetd Compile $(PROGRAM_NAME) for running through an internet superserver only."
@echo " FEATURES=minimum Compiles only basic features of $(PROGRAM_NAME)."
@echo " FEATURES=fixedepids $(PROGRAM_NAME) only uses bultin internal ePIDs."
@echo ""
@echo "Useful CFLAGS to save memory when running $(PROGRAM_NAME) on very small embedded devices (finer control than FEATURES=):"
@echo " -DNO_EXTENDED_PRODUCT_LIST Don't compile the detailed product list."
@echo " -DNO_BASIC_PRODUCT_LIST Don't compile the basic product list."
@echo " -DNO_VERBOSE_LOG Don't support verbose logging. Removes -v option."
@echo " -DNO_LOG Don't add support for logging. Implies -DNO_VERBOSE_LOG -DNO_EXTENDED_PRODUCT_LIST and -DNO_BASIC_PRODUCT_LIST."
@echo " -DNO_RANDOM_EPID Don't support random ePIDs."
@echo " -DNO_INI_FILE Don't support reading ePIDs/HWIDs from a file."
@echo " -DNO_PID_FILE Don't support writing a PID file. Removes -p option."
@echo " -DNO_USER_SWITCH Don't support changing uid/gid after program start. Removes -u and -g options."
@echo " -DNO_HELP Don't support command line help."
@echo " -DNO_CUSTOM_INTERVALS Don't support custom intervals for retry and refresh activation. Removes -A and -R options."
@echo " -DNO_SOCKETS Don't support standalone operation. Requires an internet superserver to start $(PROGRAM_NAME)."
@echo " -DNO_CL_PIDS Don't support specifying ePIDs and HwId from the command line in $(PROGRAM_NAME)."
@echo " -DNO_LIMIT Don't support limiting concurrent clients in $(PROGRAM_NAME)."
@echo " -DNO_SIGHUP Don't support SIGHUP handling in $(PROGRAM_NAME)."
@echo ""
@echo "Troubleshooting options"
@echo " CAT=1 Combine all sources in a single file."
@echo " CAT=2 Combine all sources in a single file and don't create a *.o file."
@echo " NOPROCFS=1 Don't rely on a properly mounted proc filesystem in /proc."
@echo " AUXV=1 Use /proc/self/auxv (requires Linux with glibc >= 2.16 or musl.)"
@echo " NOLPTHREAD=1 Disable detection if -lpthread is required (for use with Android NDK)."
@echo " NOLRESOLV=1 Disable detection if -lresolv is requires (for use with Android NDK)."
@echo " NOLIBS=1 Do not attempt to autodetect any library dependencies."
@echo " OPENSSL_HMAC=0 Compile for openssl versions that don't have HMAC support (required on some embedded devices)."
@echo " NO_TIMEOUT=1 Do not set timeouts for sockets (for systems that don't support it)."
@echo " CHILD_HANDLER=1 Install a handler for SIGCHLD (for systems that don't support SA_NOCLDWAIT)."
@echo " NO_DNS=1 Compile vlmcs without support for detecting KMS servers via DNS."
@echo " DNS_PARSER=internal Use $(CLIENT_NAME) internal DNS parsing routines. No effect on MingW (native Windows)."
@echo ""
@echo "Other useful CFLAGS:"
@echo " -DSUPPORT_WINE Add code that the Windows version of $(PROGRAM_NAME) runs on Wine if MSRPC=1"
@echo " -D_PEDANTIC Report rare error/warning conditions instead of silently ignoring them."
@echo " -DINCLUDE_BETAS Include SKU / activation IDs for obsolete beta/preview products."
@echo " -DFD_SETSIZE=<x> Allow <x> -L statements in $(PROGRAM_NAME) (default: 64 on Windows, 1024 on most Unixes)."
@echo " -flto Use link time optimization. Not supported by old compilers (gcc < 4.7). Use whenever supported."
@echo " -flto=jobserver Utilize all CPUs during link time optimization. Requires ${MAKE} -j <cpus>"
@echo " -fno-stack-protector No stack checking. Smaller binaries."
@echo " -pipe Use pipes instead of temporary files (faster compilation, extends the life of your SSD)."

14
KMSServer.idl

@ -0,0 +1,14 @@
[
uuid(51C82175-844E-4750-B0D8-EC255555BC06),
version(1.0),
]
interface KMSServer
{
int RequestActivation
(
[in] int requestSize,
[in, size_is(requestSize)] unsigned char* request,
[out] int* responseSize,
[out, size_is( , *responseSize)] unsigned char** response
);
}

278
KMSServer_c_mingw_gcc.c

@ -0,0 +1,278 @@
/* this ALWAYS GENERATED file contains the RPC client stubs */
/* File created by MIDL compiler version 8.00.0595 */
/* at Thu Oct 18 15:24:14 2012
*/
/* Compiler settings for KMSServer.idl:
Oicf, W1, Zp8, env=Win32 (32b run), target_arch=X86 8.00.0595
protocol : dce , ms_ext, c_ext, robust
error checks: allocation ref bounds_check enum stub_data
VC __declspec() decoration level:
__declspec(uuid()), __declspec(selectany), __declspec(novtable)
DECLSPEC_UUID(), MIDL_INTERFACE()
*/
/* @@MIDL_FILE_HEADING( ) */
#if !defined(_M_IA64) && !defined(_M_AMD64) && !defined(_ARM_)
#pragma warning( disable: 4049 ) /* more than 64k source lines */
#if _MSC_VER >= 1200
#pragma warning(push)
#endif
#pragma warning( disable: 4211 ) /* redefine extern to static */
#pragma warning( disable: 4232 ) /* dllimport identity*/
#pragma warning( disable: 4024 ) /* array to pointer mapping*/
#pragma warning( disable: 4100 ) /* unreferenced arguments in x86 call */
#pragma optimize("", off )
#include <string.h>
#include "KMSServer_h.h"
#define TYPE_FORMAT_STRING_SIZE 43
#define PROC_FORMAT_STRING_SIZE 59
#define EXPR_FORMAT_STRING_SIZE 1
#define TRANSMIT_AS_TABLE_SIZE 0
#define WIRE_MARSHAL_TABLE_SIZE 0
typedef struct _KMSServer_MIDL_TYPE_FORMAT_STRING
{
short Pad;
unsigned char Format[ TYPE_FORMAT_STRING_SIZE ];
} KMSServer_MIDL_TYPE_FORMAT_STRING;
typedef struct _KMSServer_MIDL_PROC_FORMAT_STRING
{
short Pad;
unsigned char Format[ PROC_FORMAT_STRING_SIZE ];
} KMSServer_MIDL_PROC_FORMAT_STRING;
typedef struct _KMSServer_MIDL_EXPR_FORMAT_STRING
{
long Pad;
unsigned char Format[ EXPR_FORMAT_STRING_SIZE ];
} KMSServer_MIDL_EXPR_FORMAT_STRING;
static const RPC_SYNTAX_IDENTIFIER _RpcTransferSyntax =
{{0x8A885D04,0x1CEB,0x11C9,{0x9F,0xE8,0x08,0x00,0x2B,0x10,0x48,0x60}},{2,0}};
extern const KMSServer_MIDL_TYPE_FORMAT_STRING KMSServer__MIDL_TypeFormatString;
extern const KMSServer_MIDL_PROC_FORMAT_STRING KMSServer__MIDL_ProcFormatString;
extern const KMSServer_MIDL_EXPR_FORMAT_STRING KMSServer__MIDL_ExprFormatString;
#define GENERIC_BINDING_TABLE_SIZE 0
/* Standard interface: KMSServer, ver. 1.0,
GUID={0x51C82175,0x844E,0x4750,{0xB0,0xD8,0xEC,0x25,0x55,0x55,0xBC,0x06}} */
static const RPC_CLIENT_INTERFACE KMSServer___RpcClientInterface =
{
sizeof(RPC_CLIENT_INTERFACE),
{{0x51C82175,0x844E,0x4750,{0xB0,0xD8,0xEC,0x25,0x55,0x55,0xBC,0x06}},{1,0}},
{{0x8A885D04,0x1CEB,0x11C9,{0x9F,0xE8,0x08,0x00,0x2B,0x10,0x48,0x60}},{2,0}},
0,
0,
0,
0,
0,
0x00000000
};
RPC_IF_HANDLE KMSServer_v1_0_c_ifspec = (RPC_IF_HANDLE)& KMSServer___RpcClientInterface;
extern const MIDL_STUB_DESC KMSServer_StubDesc;
static RPC_BINDING_HANDLE KMSServer__MIDL_AutoBindHandle;
int RequestActivation(
/* [in] */ handle_t IDL_handle,
/* [in] */ int requestSize,
/* [size_is][in] */ unsigned char *request,
/* [out] */ int *responseSize,
/* [size_is][size_is][out] */ unsigned char **response)
{
CLIENT_CALL_RETURN _RetVal;
_RetVal = NdrClientCall2(
( PMIDL_STUB_DESC )&KMSServer_StubDesc,
(PFORMAT_STRING) &KMSServer__MIDL_ProcFormatString.Format[0],
( unsigned char * )&IDL_handle);
return ( int )_RetVal.Simple;
}
#if !defined(__RPC_WIN32__)
#error Invalid build platform for this stub.
#endif
#if !(TARGET_IS_NT50_OR_LATER)
#error You need Windows 2000 or later to run this stub because it uses these features:
#error /robust command line switch.
#error However, your C/C++ compilation flags indicate you intend to run this app on earlier systems.
#error This app will fail with the RPC_X_WRONG_STUB_VERSION error.
#endif
#if !MULTI_CALL_BINARY
/*static*/ const KMSServer_MIDL_PROC_FORMAT_STRING KMSServer__MIDL_ProcFormatString =
{
0,
{
/* Procedure RequestActivation */
0x0, /* 0 */
0x48, /* Old Flags: */
/* 2 */ NdrFcLong( 0x0 ), /* 0 */
/* 6 */ NdrFcShort( 0x0 ), /* 0 */
/* 8 */ NdrFcShort( 0x18 ), /* x86 Stack size/offset = 24 */
/* 10 */ 0x32, /* FC_BIND_PRIMITIVE */
0x0, /* 0 */
/* 12 */ NdrFcShort( 0x0 ), /* x86 Stack size/offset = 0 */
/* 14 */ NdrFcShort( 0x8 ), /* 8 */
/* 16 */ NdrFcShort( 0x24 ), /* 36 */
/* 18 */ 0x47, /* Oi2 Flags: srv must size, clt must size, has return, has ext, */
0x5, /* 5 */
/* 20 */ 0x8, /* 8 */
0x7, /* Ext Flags: new corr desc, clt corr check, srv corr check, */
/* 22 */ NdrFcShort( 0x1 ), /* 1 */
/* 24 */ NdrFcShort( 0x1 ), /* 1 */
/* 26 */ NdrFcShort( 0x0 ), /* 0 */
/* Parameter IDL_handle */
/* 28 */ NdrFcShort( 0x48 ), /* Flags: in, base type, */
/* 30 */ NdrFcShort( 0x4 ), /* x86 Stack size/offset = 4 */
/* 32 */ 0x8, /* FC_LONG */
0x0, /* 0 */
/* Parameter requestSize */
/* 34 */ NdrFcShort( 0x10b ), /* Flags: must size, must free, in, simple ref, */
/* 36 */ NdrFcShort( 0x8 ), /* x86 Stack size/offset = 8 */
/* 38 */ NdrFcShort( 0x6 ), /* Type Offset=6 */
/* Parameter request */
/* 40 */ NdrFcShort( 0x2150 ), /* Flags: out, base type, simple ref, srv alloc size=8 */
/* 42 */ NdrFcShort( 0xc ), /* x86 Stack size/offset = 12 */
/* 44 */ 0x8, /* FC_LONG */
0x0, /* 0 */
/* Parameter responseSize */
/* 46 */ NdrFcShort( 0x2013 ), /* Flags: must size, must free, out, srv alloc size=8 */
/* 48 */ NdrFcShort( 0x10 ), /* x86 Stack size/offset = 16 */
/* 50 */ NdrFcShort( 0x16 ), /* Type Offset=22 */
/* Parameter response */
/* 52 */ NdrFcShort( 0x70 ), /* Flags: out, return, base type, */
/* 54 */ NdrFcShort( 0x14 ), /* x86 Stack size/offset = 20 */
/* 56 */ 0x8, /* FC_LONG */
0x0, /* 0 */
0x0
}
};
/*static*/ const KMSServer_MIDL_TYPE_FORMAT_STRING KMSServer__MIDL_TypeFormatString =
{
0,
{
NdrFcShort( 0x0 ), /* 0 */
/* 2 */
0x11, 0x0, /* FC_RP */
/* 4 */ NdrFcShort( 0x2 ), /* Offset= 2 (6) */
/* 6 */
0x1b, /* FC_CARRAY */
0x0, /* 0 */
/* 8 */ NdrFcShort( 0x1 ), /* 1 */
/* 10 */ 0x28, /* Corr desc: parameter, FC_LONG */
0x0, /* */
/* 12 */ NdrFcShort( 0x4 ), /* x86 Stack size/offset = 4 */
/* 14 */ NdrFcShort( 0x1 ), /* Corr flags: early, */
/* 16 */ 0x2, /* FC_CHAR */
0x5b, /* FC_END */
/* 18 */
0x11, 0xc, /* FC_RP [alloced_on_stack] [simple_pointer] */
/* 20 */ 0x8, /* FC_LONG */
0x5c, /* FC_PAD */
/* 22 */
0x11, 0x14, /* FC_RP [alloced_on_stack] [pointer_deref] */
/* 24 */ NdrFcShort( 0x2 ), /* Offset= 2 (26) */
/* 26 */
0x12, 0x0, /* FC_UP */
/* 28 */ NdrFcShort( 0x2 ), /* Offset= 2 (30) */
/* 30 */
0x1b, /* FC_CARRAY */
0x0, /* 0 */
/* 32 */ NdrFcShort( 0x1 ), /* 1 */
/* 34 */ 0x28, /* Corr desc: parameter, FC_LONG */
0x54, /* FC_DEREFERENCE */
/* 36 */ NdrFcShort( 0xc ), /* x86 Stack size/offset = 12 */
/* 38 */ NdrFcShort( 0x1 ), /* Corr flags: early, */
/* 40 */ 0x2, /* FC_CHAR */
0x5b, /* FC_END */
0x0
}
};
#endif // !MULTI_CALL_BINARY
static const unsigned short KMSServer_FormatStringOffsetTable[] =
{
0
};
//typedef void *(__RPC_API midl_user_allocate_t)(size_t);
typedef void *(__RPC_API *midl_allocate_t)(size_t);
#if !MULTI_CALL_BINARY
/*static*/ const MIDL_STUB_DESC KMSServer_StubDesc =
{
(void *)& KMSServer___RpcClientInterface,
(midl_allocate_t)MIDL_user_allocate,
MIDL_user_free,
&KMSServer__MIDL_AutoBindHandle,
0,
0,
0,
0,
KMSServer__MIDL_TypeFormatString.Format,
1, /* -error bounds_check flag */
0x50002, /* Ndr library version */
0,
0x8000253, /* MIDL Version 8.0.595 */
0,
0,
0, /* notify & notify_flag routine table */
0x1, /* MIDL flag */
0, /* cs routines */
0, /* proxy/server info */
0
};
#endif // !MULTI_CALL_BINARY
#pragma optimize("", on )
#if _MSC_VER >= 1200
#pragma warning(pop)
#endif
#endif /* !defined(_M_IA64) && !defined(_M_AMD64) && !defined(_ARM_) */

731
KMSServer_c_x64_mingw_gcc.c

@ -0,0 +1,731 @@
/* this ALWAYS GENERATED file contains the RPC client stubs */
/* File created by MIDL compiler version 8.00.0603 */
/* at Fri Feb 20 04:17:07 2015
* modified by Hotbird64 to work with MingW-w64 and gcc
*/
/* Compiler settings for KMSServer.idl:
Oicf, W1, Zp8, env=Win64 (32b run), target_arch=AMD64 8.00.0603
protocol : all , ms_ext, c_ext, robust
error checks: allocation ref bounds_check enum stub_data
VC __declspec() decoration level:
__declspec(uuid()), __declspec(selectany), __declspec(novtable)
DECLSPEC_UUID(), MIDL_INTERFACE()
*/
/* @@MIDL_FILE_HEADING( ) */
#if defined(_M_AMD64)
#pragma warning( disable: 4049 ) /* more than 64k source lines */
#if _MSC_VER >= 1200
#pragma warning(push)
#endif
#pragma warning( disable: 4211 ) /* redefine extern to static */
#pragma warning( disable: 4232 ) /* dllimport identity*/
#pragma warning( disable: 4024 ) /* array to pointer mapping*/
#include <string.h>
#include "KMSServer_h.h"
#define TYPE_FORMAT_STRING_SIZE 43
#define PROC_FORMAT_STRING_SIZE 61
#define EXPR_FORMAT_STRING_SIZE 1
#define TRANSMIT_AS_TABLE_SIZE 0
#define WIRE_MARSHAL_TABLE_SIZE 0
typedef struct _KMSServer_MIDL_TYPE_FORMAT_STRING
{
short Pad;
unsigned char Format[ TYPE_FORMAT_STRING_SIZE ];
} KMSServer_MIDL_TYPE_FORMAT_STRING;
typedef struct _KMSServer_MIDL_PROC_FORMAT_STRING
{
short Pad;
unsigned char Format[ PROC_FORMAT_STRING_SIZE ];
} KMSServer_MIDL_PROC_FORMAT_STRING;
typedef struct _KMSServer_MIDL_EXPR_FORMAT_STRING
{
long Pad;
unsigned char Format[ EXPR_FORMAT_STRING_SIZE ];
} KMSServer_MIDL_EXPR_FORMAT_STRING;
static const RPC_SYNTAX_IDENTIFIER _RpcTransferSyntax =
{{0x8A885D04,0x1CEB,0x11C9,{0x9F,0xE8,0x08,0x00,0x2B,0x10,0x48,0x60}},{2,0}};
static const RPC_SYNTAX_IDENTIFIER _NDR64_RpcTransferSyntax =
{{0x71710533,0xbeba,0x4937,{0x83,0x19,0xb5,0xdb,0xef,0x9c,0xcc,0x36}},{1,0}};
extern const KMSServer_MIDL_TYPE_FORMAT_STRING KMSServer__MIDL_TypeFormatString;
extern const KMSServer_MIDL_PROC_FORMAT_STRING KMSServer__MIDL_ProcFormatString;
extern const KMSServer_MIDL_EXPR_FORMAT_STRING KMSServer__MIDL_ExprFormatString;
#define GENERIC_BINDING_TABLE_SIZE 0
/* Standard interface: KMSServer, ver. 1.0,
GUID={0x51C82175,0x844E,0x4750,{0xB0,0xD8,0xEC,0x25,0x55,0x55,0xBC,0x06}} */
extern const MIDL_STUBLESS_PROXY_INFO KMSServer_ProxyInfo;
static const RPC_CLIENT_INTERFACE KMSServer___RpcClientInterface =
{
sizeof(RPC_CLIENT_INTERFACE),
{{0x51C82175,0x844E,0x4750,{0xB0,0xD8,0xEC,0x25,0x55,0x55,0xBC,0x06}},{1,0}},
{{0x8A885D04,0x1CEB,0x11C9,{0x9F,0xE8,0x08,0x00,0x2B,0x10,0x48,0x60}},{2,0}},
0,
0,
0,
0,
&KMSServer_ProxyInfo,
0x02000000
};
RPC_IF_HANDLE KMSServer_v1_0_c_ifspec = (RPC_IF_HANDLE)& KMSServer___RpcClientInterface;
extern const MIDL_STUB_DESC KMSServer_StubDesc;
static RPC_BINDING_HANDLE KMSServer__MIDL_AutoBindHandle;
int RequestActivation(
/* [in] */ handle_t IDL_handle,
/* [in] */ int requestSize,
/* [size_is][in] */ unsigned char *request,
/* [out] */ int *responseSize,
/* [size_is][size_is][out] */ unsigned char **response)
{
CLIENT_CALL_RETURN _RetVal;
_RetVal = NdrClientCall3(
( PMIDL_STUBLESS_PROXY_INFO )&KMSServer_ProxyInfo,
0,
0,
IDL_handle,
requestSize,
request,
responseSize,
response);
return ( int )_RetVal.Simple;
}
#if !defined(__RPC_WIN64__)
#error Invalid build platform for this stub.
#endif
#if !MULTI_CALL_BINARY
/*static*/ const KMSServer_MIDL_PROC_FORMAT_STRING KMSServer__MIDL_ProcFormatString =
{
0,
{
/* Procedure RequestActivation */
0x0, /* 0 */
0x48, /* Old Flags: */
/* 2 */ NdrFcLong( 0x0 ), /* 0 */
/* 6 */ NdrFcShort( 0x0 ), /* 0 */
/* 8 */ NdrFcShort( 0x30 ), /* X64 Stack size/offset = 48 */
/* 10 */ 0x32, /* FC_BIND_PRIMITIVE */
0x0, /* 0 */
/* 12 */ NdrFcShort( 0x0 ), /* X64 Stack size/offset = 0 */
/* 14 */ NdrFcShort( 0x8 ), /* 8 */
/* 16 */ NdrFcShort( 0x24 ), /* 36 */
/* 18 */ 0x47, /* Oi2 Flags: srv must size, clt must size, has return, has ext, */
0x5, /* 5 */
/* 20 */ 0xa, /* 10 */
0x7, /* Ext Flags: new corr desc, clt corr check, srv corr check, */
/* 22 */ NdrFcShort( 0x1 ), /* 1 */
/* 24 */ NdrFcShort( 0x1 ), /* 1 */
/* 26 */ NdrFcShort( 0x0 ), /* 0 */
/* 28 */ NdrFcShort( 0x0 ), /* 0 */
/* Parameter IDL_handle */
/* 30 */ NdrFcShort( 0x48 ), /* Flags: in, base type, */
/* 32 */ NdrFcShort( 0x8 ), /* X64 Stack size/offset = 8 */
/* 34 */ 0x8, /* FC_LONG */
0x0, /* 0 */
/* Parameter requestSize */
/* 36 */ NdrFcShort( 0x10b ), /* Flags: must size, must free, in, simple ref, */
/* 38 */ NdrFcShort( 0x10 ), /* X64 Stack size/offset = 16 */
/* 40 */ NdrFcShort( 0x6 ), /* Type Offset=6 */
/* Parameter request */
/* 42 */ NdrFcShort( 0x2150 ), /* Flags: out, base type, simple ref, srv alloc size=8 */
/* 44 */ NdrFcShort( 0x18 ), /* X64 Stack size/offset = 24 */
/* 46 */ 0x8, /* FC_LONG */
0x0, /* 0 */
/* Parameter responseSize */
/* 48 */ NdrFcShort( 0x2013 ), /* Flags: must size, must free, out, srv alloc size=8 */
/* 50 */ NdrFcShort( 0x20 ), /* X64 Stack size/offset = 32 */
/* 52 */ NdrFcShort( 0x16 ), /* Type Offset=22 */
/* Parameter response */
/* 54 */ NdrFcShort( 0x70 ), /* Flags: out, return, base type, */
/* 56 */ NdrFcShort( 0x28 ), /* X64 Stack size/offset = 40 */
/* 58 */ 0x8, /* FC_LONG */
0x0, /* 0 */
0x0
}
};
/*static*/ const KMSServer_MIDL_TYPE_FORMAT_STRING KMSServer__MIDL_TypeFormatString =
{
0,
{
NdrFcShort( 0x0 ), /* 0 */
/* 2 */
0x11, 0x0, /* FC_RP */
/* 4 */ NdrFcShort( 0x2 ), /* Offset= 2 (6) */
/* 6 */
0x1b, /* FC_CARRAY */
0x0, /* 0 */
/* 8 */ NdrFcShort( 0x1 ), /* 1 */
/* 10 */ 0x28, /* Corr desc: parameter, FC_LONG */
0x0, /* */
/* 12 */ NdrFcShort( 0x8 ), /* X64 Stack size/offset = 8 */
/* 14 */ NdrFcShort( 0x1 ), /* Corr flags: early, */
/* 16 */ 0x2, /* FC_CHAR */
0x5b, /* FC_END */
/* 18 */
0x11, 0xc, /* FC_RP [alloced_on_stack] [simple_pointer] */
/* 20 */ 0x8, /* FC_LONG */
0x5c, /* FC_PAD */
/* 22 */
0x11, 0x14, /* FC_RP [alloced_on_stack] [pointer_deref] */
/* 24 */ NdrFcShort( 0x2 ), /* Offset= 2 (26) */
/* 26 */
0x12, 0x0, /* FC_UP */
/* 28 */ NdrFcShort( 0x2 ), /* Offset= 2 (30) */
/* 30 */
0x1b, /* FC_CARRAY */
0x0, /* 0 */
/* 32 */ NdrFcShort( 0x1 ), /* 1 */
/* 34 */ 0x28, /* Corr desc: parameter, FC_LONG */
0x54, /* FC_DEREFERENCE */
/* 36 */ NdrFcShort( 0x18 ), /* X64 Stack size/offset = 24 */
/* 38 */ NdrFcShort( 0x1 ), /* Corr flags: early, */
/* 40 */ 0x2, /* FC_CHAR */
0x5b, /* FC_END */
0x0
}
};
#endif //!MULTI_CALL_BINARY
static const unsigned short KMSServer_FormatStringOffsetTable[] =
{
0
};
#endif /* defined(_M_AMD64)*/
/* this ALWAYS GENERATED file contains the RPC client stubs */
/* File created by MIDL compiler version 8.00.0603 */
/* at Fri Feb 20 04:17:07 2015
*/
/* Compiler settings for KMSServer.idl:
Oicf, W1, Zp8, env=Win64 (32b run), target_arch=AMD64 8.00.0603
protocol : all , ms_ext, c_ext, robust
error checks: allocation ref bounds_check enum stub_data
VC __declspec() decoration level:
__declspec(uuid()), __declspec(selectany), __declspec(novtable)
DECLSPEC_UUID(), MIDL_INTERFACE()
*/
/* @@MIDL_FILE_HEADING( ) */
#if defined(_M_AMD64)
#pragma warning( disable: 4049 ) /* more than 64k source lines */
#if !defined(__RPC_WIN64__)
#error Invalid build platform for this stub.
#endif
#include "ndr64types.h"
#include "pshpack8.h"
typedef
struct
{
NDR64_FORMAT_UINT32 frag1;
struct _NDR64_EXPR_OPERATOR frag2;
struct _NDR64_EXPR_VAR frag3;
}
__midl_frag13_t;
extern const __midl_frag13_t __midl_frag13;
typedef
struct
{
struct _NDR64_CONF_ARRAY_HEADER_FORMAT frag1;
struct _NDR64_ARRAY_ELEMENT_INFO frag2;
}
__midl_frag12_t;
extern const __midl_frag12_t __midl_frag12;
typedef
struct _NDR64_POINTER_FORMAT
__midl_frag11_t;
extern const __midl_frag11_t __midl_frag11;
typedef
struct _NDR64_POINTER_FORMAT
__midl_frag10_t;
extern const __midl_frag10_t __midl_frag10;
typedef
struct _NDR64_POINTER_FORMAT
__midl_frag8_t;
extern const __midl_frag8_t __midl_frag8;
typedef
NDR64_FORMAT_CHAR
__midl_frag7_t;
extern const __midl_frag7_t __midl_frag7;
typedef
struct
{
NDR64_FORMAT_UINT32 frag1;
struct _NDR64_EXPR_VAR frag2;
}
__midl_frag6_t;
extern const __midl_frag6_t __midl_frag6;
typedef
struct
{
struct _NDR64_CONF_ARRAY_HEADER_FORMAT frag1;
struct _NDR64_ARRAY_ELEMENT_INFO frag2;
}
__midl_frag5_t;
extern const __midl_frag5_t __midl_frag5;
typedef
struct _NDR64_POINTER_FORMAT
__midl_frag4_t;
extern const __midl_frag4_t __midl_frag4;
typedef
NDR64_FORMAT_CHAR
__midl_frag3_t;
extern const __midl_frag3_t __midl_frag3;
typedef
struct
{
struct _NDR64_PROC_FORMAT frag1;
struct _NDR64_BIND_AND_NOTIFY_EXTENSION frag2;
struct _NDR64_PARAM_FORMAT frag3;
struct _NDR64_PARAM_FORMAT frag4;
struct _NDR64_PARAM_FORMAT frag5;
struct _NDR64_PARAM_FORMAT frag6;
struct _NDR64_PARAM_FORMAT frag7;
}
__midl_frag2_t;
extern const __midl_frag2_t __midl_frag2;
typedef
NDR64_FORMAT_UINT32
__midl_frag1_t;
extern const __midl_frag1_t __midl_frag1;
#if !MULTI_CALL_BINARY
/*static*/ const __midl_frag13_t __midl_frag13 =
{
/* */
(NDR64_UINT32) 1 /* 0x1 */,
{
/* struct _NDR64_EXPR_OPERATOR */
0x4, /* FC_EXPR_OPER */
0x5, /* OP_UNARY_INDIRECTION */
0x5, /* FC64_INT32 */
(NDR64_UINT8) 0 /* 0x0 */
},
{
/* struct _NDR64_EXPR_VAR */
0x3, /* FC_EXPR_VAR */
0x7, /* FC64_INT64 */
(NDR64_UINT16) 0 /* 0x0 */,
(NDR64_UINT32) 24 /* 0x18 */ /* Offset */
}
};
/*static*/ const __midl_frag12_t __midl_frag12 =
{
/* *char */
{
/* *char */
0x41, /* FC64_CONF_ARRAY */
(NDR64_UINT8) 0 /* 0x0 */,
{
/* *char */
0,
0,
0,
0,
0,
0,
0,
0
},
(NDR64_UINT8) 0 /* 0x0 */,
(NDR64_UINT32) 1 /* 0x1 */,
&__midl_frag13
},
{
/* struct _NDR64_ARRAY_ELEMENT_INFO */
(NDR64_UINT32) 1 /* 0x1 */,
&__midl_frag7
}
};
/*static*/ const __midl_frag11_t __midl_frag11 =
{
/* *char */
0x21, /* FC64_UP */
(NDR64_UINT8) 0 /* 0x0 */,
(NDR64_UINT16) 0 /* 0x0 */,
&__midl_frag12
};
/*static*/ const __midl_frag10_t __midl_frag10 =
{
/* **char */
0x20, /* FC64_RP */
(NDR64_UINT8) 20 /* 0x14 */,
(NDR64_UINT16) 0 /* 0x0 */,
&__midl_frag11
};
/*static*/ const __midl_frag8_t __midl_frag8 =
{
/* *int */
0x20, /* FC64_RP */
(NDR64_UINT8) 12 /* 0xc */,
(NDR64_UINT16) 0 /* 0x0 */,
&__midl_frag3
};
/*static*/ const __midl_frag7_t __midl_frag7 =
0x10 /* FC64_CHAR */;
/*static*/ const __midl_frag6_t __midl_frag6 =
{
/* */
(NDR64_UINT32) 1 /* 0x1 */,
{
/* struct _NDR64_EXPR_VAR */
0x3, /* FC_EXPR_VAR */
0x5, /* FC64_INT32 */
(NDR64_UINT16) 0 /* 0x0 */,
(NDR64_UINT32) 8 /* 0x8 */ /* Offset */
}
};
/*static*/ const __midl_frag5_t __midl_frag5 =
{
/* *char */
{
/* *char */
0x41, /* FC64_CONF_ARRAY */
(NDR64_UINT8) 0 /* 0x0 */,
{
/* *char */
0,
0,
0,
0,
0,
0,
0,
0
},
(NDR64_UINT8) 0 /* 0x0 */,
(NDR64_UINT32) 1 /* 0x1 */,
&__midl_frag6
},
{
/* struct _NDR64_ARRAY_ELEMENT_INFO */
(NDR64_UINT32) 1 /* 0x1 */,
&__midl_frag7
}
};
/*static*/ const __midl_frag4_t __midl_frag4 =
{
/* *char */
0x20, /* FC64_RP */
(NDR64_UINT8) 0 /* 0x0 */,
(NDR64_UINT16) 0 /* 0x0 */,
&__midl_frag5
};
/*static*/ const __midl_frag3_t __midl_frag3 =
0x5 /* FC64_INT32 */;
/*static*/ const __midl_frag2_t __midl_frag2 =
{
/* RequestActivation */
{
/* RequestActivation */ /* procedure RequestActivation */
(NDR64_UINT32) 23986240 /* 0x16e0040 */, /* explicit handle */ /* IsIntrepreted, ServerMustSize, ClientMustSize, HasReturn, ServerCorrelation, ClientCorrelation, HasExtensions */
(NDR64_UINT32) 48 /* 0x30 */ , /* Stack size */
(NDR64_UINT32) 8 /* 0x8 */,
(NDR64_UINT32) 40 /* 0x28 */,
(NDR64_UINT16) 0 /* 0x0 */,
(NDR64_UINT16) 0 /* 0x0 */,
(NDR64_UINT16) 5 /* 0x5 */,
(NDR64_UINT16) 8 /* 0x8 */
},
{
/* struct _NDR64_BIND_AND_NOTIFY_EXTENSION */
{
/* struct _NDR64_BIND_AND_NOTIFY_EXTENSION */
0x72, /* FC64_BIND_PRIMITIVE */
(NDR64_UINT8) 0 /* 0x0 */,
0 /* 0x0 */, /* Stack offset */
(NDR64_UINT8) 0 /* 0x0 */,
(NDR64_UINT8) 0 /* 0x0 */
},
(NDR64_UINT16) 0 /* 0x0 */ /* Notify index */
},
{
/* requestSize */ /* parameter requestSize */
&__midl_frag3,
{
/* requestSize */
0,
0,
0,
1,
0,
0,
1,
1,
0,
0,
0,
0,
0,
(NDR64_UINT16) 0 /* 0x0 */,
0
}, /* [in], Basetype, ByValue */
(NDR64_UINT16) 0 /* 0x0 */,
8 /* 0x8 */, /* Stack offset */
},
{
/* request */ /* parameter request */
&__midl_frag5,
{
/* request */
1,
1,
0,
1,
0,
0,
0,
0,
1,
0,
0,
0,
0,
(NDR64_UINT16) 0 /* 0x0 */,
0
}, /* MustSize, MustFree, [in], SimpleRef */
(NDR64_UINT16) 0 /* 0x0 */,
16 /* 0x10 */, /* Stack offset */
},
{
/* responseSize */ /* parameter responseSize */
&__midl_frag3,
{
/* responseSize */
0,
0,
0,
0,
1,
0,
1,
0,
1,
0,
0,
0,
0,
(NDR64_UINT16) 0 /* 0x0 */,
1
}, /* [out], Basetype, SimpleRef, UseCache */
(NDR64_UINT16) 0 /* 0x0 */,
24 /* 0x18 */, /* Stack offset */
},
{
/* response */ /* parameter response */
&__midl_frag10,
{
/* response */
1,
1,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
(NDR64_UINT16) 0 /* 0x0 */,
1
}, /* MustSize, MustFree, [out], UseCache */
(NDR64_UINT16) 0 /* 0x0 */,
32 /* 0x20 */, /* Stack offset */
},
{
/* int */ /* parameter int */
&__midl_frag3,
{
/* int */
0,
0,
0,
0,
1,
1,
1,
1,
0,
0,
0,
0,
0,
(NDR64_UINT16) 0 /* 0x0 */,
0
}, /* [out], IsReturn, Basetype, ByValue */
(NDR64_UINT16) 0 /* 0x0 */,
40 /* 0x28 */, /* Stack offset */
}
};
/*static*/ const __midl_frag1_t __midl_frag1 =
(NDR64_UINT32) 0 /* 0x0 */;
#endif // !MULTI_CALL_BINARY
#include "poppack.h"
static const FormatInfoRef KMSServer_Ndr64ProcTable[] =
{
&__midl_frag2
};
//typedef void *__RPC_USER MIDL_user_allocate_t(SIZE_T)
typedef void *(__RPC_API *midl_allocate_t)(size_t);
#if !MULTI_CALL_BINARY
/*static*/ const MIDL_STUB_DESC KMSServer_StubDesc =
{
(void *)& KMSServer___RpcClientInterface,
(midl_allocate_t)MIDL_user_allocate,
MIDL_user_free,
&KMSServer__MIDL_AutoBindHandle,
0,
0,
0,
0,
KMSServer__MIDL_TypeFormatString.Format,
1, /* -error bounds_check flag */
0x60000, /* Ndr library version */
0,
0x800025b, /* MIDL Version 8.0.603 */
0,
0,
0, /* notify & notify_flag routine table */
0x2000001, /* MIDL flag */
0, /* cs routines */
(void *)& KMSServer_ProxyInfo, /* proxy/server info */
0
};
#endif // !MULTI_CALL_BINARY
static const MIDL_SYNTAX_INFO KMSServer_SyntaxInfo [ 2 ] =
{
{
{{0x8A885D04,0x1CEB,0x11C9,{0x9F,0xE8,0x08,0x00,0x2B,0x10,0x48,0x60}},{2,0}},
0,
KMSServer__MIDL_ProcFormatString.Format,
KMSServer_FormatStringOffsetTable,
KMSServer__MIDL_TypeFormatString.Format,
0,
0,
0
}
,{
{{0x71710533,0xbeba,0x4937,{0x83,0x19,0xb5,0xdb,0xef,0x9c,0xcc,0x36}},{1,0}},
0,
0 ,
(unsigned short *) KMSServer_Ndr64ProcTable,
0,
0,
0,
0
}
};
/*static*/ const MIDL_STUBLESS_PROXY_INFO KMSServer_ProxyInfo =
{
&KMSServer_StubDesc,
KMSServer__MIDL_ProcFormatString.Format,
KMSServer_FormatStringOffsetTable,
(RPC_SYNTAX_IDENTIFIER*)&_RpcTransferSyntax,
2,
(MIDL_SYNTAX_INFO*)KMSServer_SyntaxInfo
};
#if _MSC_VER >= 1200
#pragma warning(pop)
#endif
#endif /* defined(_M_AMD64)*/

80
KMSServer_h.h

@ -0,0 +1,80 @@
/* this ALWAYS GENERATED file contains the definitions for the interfaces */
/* Modified by Hotbird64 for use with MingW and gcc */
/* File created by MIDL compiler version 8.00.0595 */
/* at Thu Oct 18 15:24:14 2012
*/
/* Compiler settings for KMSServer.idl:
Oicf, W1, Zp8, env=Win32 (32b run), target_arch=X86 8.00.0595
protocol : dce , ms_ext, c_ext, robust
error checks: allocation ref bounds_check enum stub_data
VC __declspec() decoration level:
__declspec(uuid()), __declspec(selectany), __declspec(novtable)
DECLSPEC_UUID(), MIDL_INTERFACE()
*/
/* @@MIDL_FILE_HEADING( ) */
#pragma warning( disable: 4049 ) /* more than 64k source lines */
/* verify that the <rpcndr.h> version is high enough to compile this file*/
#ifndef __REQUIRED_RPCNDR_H_VERSION__
#define __REQUIRED_RPCNDR_H_VERSION__ 475
#endif
//#include "rpc.h"
#include "rpcndr.h"
#ifndef __RPCNDR_H_VERSION__
#error this stub requires an updated version of <rpcndr.h>
#endif // __RPCNDR_H_VERSION__
#ifndef __KMSServer_h_h__
#define __KMSServer_h_h__
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
#pragma once
#endif
/* Forward Declarations */