9 static const char ePID
[] = { 'T', 0, 'E', 0, 'S', 0, 'T', 0, 0, 0 };
11 __stdcall BOOL
KmsCallBack(const REQUEST
*const baseRequest
, RESPONSE
*const baseResponse
, BYTE
*const hwId
, const char* const ipstr
)
13 printf("libvlmcs-test.c: Entered KmsCallBack for client %s\n", ipstr
);
15 memcpy(&baseResponse
->CMID
, &baseRequest
->CMID
, sizeof(GUID
));
16 memcpy(&baseResponse
->ClientTime
, &baseRequest
->ClientTime
, sizeof(FILETIME
));
17 memcpy(&baseResponse
->KmsPID
, ePID
, sizeof(ePID
));
19 baseResponse
->Version
= baseRequest
->Version
;
20 baseResponse
->Count
= LE32(LE32(baseRequest
->N_Policy
) << 1);
21 baseResponse
->PIDSize
= sizeof(ePID
);
22 baseResponse
->VLActivationInterval
= LE32(120);
23 baseResponse
->VLRenewalInterval
= LE32(10080);
25 if (hwId
&& baseResponse
->MajorVer
> 5) memcpy(hwId
, "\x01\x02\x03\x04\x05\x06\x07\x08", 8);
30 int main(int argc
, char** argv
)
32 printf("libvlmcs-test.c: Program start\n");
33 StartKmsServer(1688, KmsCallBack
);