source: Daodan/MSYS2/mingw32/i686-w64-mingw32/include/msdrm.h@ 1175

Last change on this file since 1175 was 1166, checked in by rossy, 3 years ago

Daodan: Replace MinGW build env with an up-to-date MSYS2 env

File size: 13.0 KB
RevLine 
[1166]1/**
2 * This file has no copyright assigned and is placed in the Public Domain.
3 * This file is part of the mingw-w64 runtime package.
4 * No warranty is given; refer to the file DISCLAIMER.PD within this package.
5 */
6#ifndef _INC_MSDRM
7#define _INC_MSDRM
8#include <msdrmdefs.h>
9#ifdef __cplusplus
10extern "C" {
11#endif
12
13HRESULT WINAPI DRMCreateClientSession(
14 DRMCALLBACK pfnCallback,
15 UINT uCallbackVersion,
16 PWSTR wszGroupIDProviderType,
17 PWSTR wszGroupID,
18 DRMHSESSION *phClient
19);
20
21HRESULT WINAPI DRMAcquireIssuanceLicenseTemplate(
22 DRMHSESSION hClient,
23 UINT uFlags,
24 VOID *pvReserved,
25 UINT cReserved,
26 PWSTR *pwszReserved,
27 PWSTR wszURL,
28 VOID *pvContext
29);
30
31HRESULT WINAPI DRMActivate(
32 DRMHSESSION hClient,
33 UINT uFlags,
34 UINT uLangID,
35 DRM_ACTSERV_INFO *pActServInfo,
36 VOID *pvContext,
37 HWND hParentWnd
38);
39
40HRESULT WINAPI DRMGetServiceLocation(
41 DRMHSESSION hClient,
42 UINT uServiceType,
43 UINT uServiceLocation,
44 PWSTR wszIssuanceLicense,
45 UINT *puServiceURLLength,
46 PWSTR wszServiceURL
47);
48
49HRESULT WINAPI DRMIsActivated(
50 DRMHSESSION hClient,
51 UINT uFlags,
52 DRM_ACTSERV_INFO *pActServInfo
53);
54
55HRESULT WINAPI DRMCheckSecurity(
56 DRMENVHANDLE hEnv,
57 UINT cLevel
58);
59
60HRESULT WINAPI DRMCloseSession(
61 DRMHSESSION hSession
62);
63
64HRESULT WINAPI DRMCreateLicenseStorageSession(
65 DRMENVHANDLE hEnv,
66 DRMHANDLE hDefaultLibrary,
67 DRMHSESSION hClient,
68 UINT uFlags,
69 PWSTR wszIssuanceLicense,
70 DRMHSESSION *phLicenseStorage
71);
72
73HRESULT WINAPI DRMDuplicateSession(
74 DRMHSESSION hSessionIn,
75 DRMHSESSION *phSessionOut
76);
77
78HRESULT WINAPI DRMGetClientVersion(
79 DRM_CLIENT_VERSION_INFO *pDRMClientVersionInfo
80);
81
82HRESULT WINAPI DRMGetEnvironmentInfo(
83 DRMENVHANDLE handle,
84 PWSTR wszAttribute,
85 DRMENCODINGTYPE *peEncoding,
86 UINT *pcBuffer,
87 BYTE *pbBuffer
88);
89
90HRESULT WINAPI DRMGetIntervalTime(
91 DRMPUBHANDLE hIssuanceLicense,
92 UINT *pcDays
93);
94
95HRESULT WINAPI DRMGetOwnerLicense(
96 DRMPUBHANDLE hIssuanceLicense,
97 UINT *puLength,
98 PWSTR wszOwnerLicense
99);
100
101HRESULT WINAPI DRMGetProcAddress(
102 DRMHANDLE hLibrary,
103 PWSTR wszProcName,
104 FARPROC *ppfnProcAddress
105);
106
107HRESULT WINAPI DRMGetSecurityProvider(
108 UINT uFlags,
109 UINT *puTypeLen,
110 PWSTR wszType,
111 UINT *puPathLen,
112 PWSTR wszPath
113);
114
115HRESULT WINAPI DRMInitEnvironment(
116 DRMSECURITYPROVIDERTYPE eSecurityProviderType,
117 DRMSPECTYPE eSpecification,
118 PWSTR wszSecurityProvider,
119 PWSTR wszManifestCredentials,
120 PWSTR wszMachineCredentials,
121 DRMENVHANDLE *phEnv,
122 DRMHANDLE *phDefaultLibrary
123);
124
125HRESULT WINAPI DRMLoadLibrary(
126 DRMENVHANDLE hEnv,
127 DRMSPECTYPE eSpecification,
128 PWSTR wszLibraryProvider,
129 PWSTR wszCredentials,
130 DRMHANDLE *phLibrary
131);
132
133HRESULT WINAPI DRMRegisterContent(
134 WINBOOL fRegister
135);
136
137HRESULT WINAPI DRMRegisterRevocationList(
138 DRMENVHANDLE hEnv,
139 PWSTR wszRevocationList
140);
141
142HRESULT WINAPI DRMRepair(void);
143
144HRESULT WINAPI DRMSetIntervalTime(
145 DRMPUBHANDLE hIssuanceLicense,
146 UINT cDays
147);
148
149HRESULT WINAPI DRMSetGlobalOptions(
150 DRMGLOBALOPTIONS eGlobalOptions,
151 LPVOID pvdata,
152 DWORD dwlen
153);
154
155HRESULT WINAPI DRMAddRightWithUser(
156 DRMPUBHANDLE hIssuanceLicense,
157 DRMPUBHANDLE hRight,
158 DRMPUBHANDLE hUser
159);
160
161HRESULT WINAPI DRMClearAllRights(
162 DRMPUBHANDLE hIssuanceLicense
163);
164
165HRESULT WINAPI DRMCreateIssuanceLicense(
166 SYSTEMTIME *pstTimeFrom,
167 SYSTEMTIME *pstTimeUntil,
168 PWSTR wszReferralInfoName,
169 PWSTR wszReferralInfoURL,
170 DRMPUBHANDLE hOwner,
171 PWSTR wszIssuanceLicense,
172 DRMHANDLE hBoundLicense,
173 DRMPUBHANDLE *phIssuanceLicense
174);
175
176HRESULT WINAPI DRMCreateRight(
177 PWSTR wszRightName,
178 SYSTEMTIME *pstFrom,
179 SYSTEMTIME *pstUntil,
180 UINT cExtendedInfo,
181 PWSTR *pwszExtendedInfoName,
182 PWSTR *pwszExtendedInfoValue,
183 DRMPUBHANDLE *phRight
184);
185
186HRESULT WINAPI DRMCreateUser(
187 PWSTR wszUserName,
188 PWSTR wszUserId,
189 PWSTR wszUserIdType,
190 DRMPUBHANDLE *phUser
191);
192
193HRESULT WINAPI DRMGetApplicationSpecificData(
194 DRMPUBHANDLE hIssuanceLicense,
195 UINT uIndex,
196 UINT *puNameLength,
197 PWSTR wszName,
198 UINT *puValueLength,
199 PWSTR wszValue
200);
201
202HRESULT WINAPI DRMGetIssuanceLicenseInfo(
203 DRMPUBHANDLE hIssuanceLicense,
204 SYSTEMTIME *pstTimeFrom,
205 SYSTEMTIME *pstTimeUntil,
206 UINT uFlags,
207 UINT *puDistributionPointNameLength,
208 PWSTR wszDistributionPointName,
209 UINT *puDistributionPointURLLength,
210 PWSTR wszDistributionPointURL,
211 DRMPUBHANDLE *phOwner,
212 WINBOOL *pfOfficial
213);
214
215HRESULT WINAPI DRMGetIssuanceLicenseTemplate(
216 DRMPUBHANDLE hIssuanceLicense,
217 UINT *puIssuanceLicenseTemplateLength,
218 PWSTR wszIssuanceLicenseTemplate
219);
220
221HRESULT WINAPI DRMGetMetaData(
222 DRMPUBHANDLE hIssuanceLicense,
223 UINT *puContentIdLength,
224 PWSTR wszContentId,
225 UINT *puContentIdTypeLength,
226 PWSTR wszContentIdType,
227 UINT *puSKUIdLength,
228 PWSTR wszSKUId,
229 UINT *puSKUIdTypeLength,
230 PWSTR wszSKUIdType,
231 UINT *puContentTypeLength,
232 PWSTR wszContentType,
233 UINT *puContentNameLength,
234 PWSTR wszContentName
235);
236
237HRESULT WINAPI DRMGetNameAndDescription(
238 DRMPUBHANDLE hIssuanceLicense,
239 UINT uIndex,
240 UINT *pulcid,
241 UINT *puNameLength,
242 PWSTR wszName,
243 UINT *puDescriptionLength,
244 PWSTR wszDescription
245);
246
247HRESULT WINAPI DRMGetRevocationPoint(
248 DRMPUBHANDLE hIssuanceLicense,
249 UINT *puIdLength,
250 PWSTR wszId,
251 UINT *puIdTypeLength,
252 PWSTR wszIdType,
253 UINT *puURLLength,
254 PWSTR wszURL,
255 SYSTEMTIME *pstFrequency,
256 UINT *puNameLength,
257 PWSTR wszName,
258 UINT *puPublicKeyLength,
259 PWSTR wszPublicKey
260);
261
262HRESULT WINAPI DRMGetRightExtendedInfo(
263 DRMPUBHANDLE hRight,
264 UINT uIndex,
265 UINT *puExtendedInfoNameLength,
266 PWSTR wszExtendedInfoName,
267 UINT *puExtendedInfoValueLength,
268 PWSTR wszExtendedInfoValue
269);
270
271HRESULT WINAPI DRMGetRightInfo(
272 DRMPUBHANDLE hRight,
273 UINT *puRightNameLength,
274 PWSTR wszRightName,
275 SYSTEMTIME *pstFrom,
276 SYSTEMTIME *pstUntil
277);
278
279HRESULT WINAPI DRMGetSignedIssuanceLicense(
280 DRMENVHANDLE hEnv,
281 DRMPUBHANDLE hIssuanceLicense,
282 UINT uFlags,
283 BYTE *pbSymKey,
284 UINT cbSymKey,
285 PWSTR wszSymKeyType,
286 PWSTR wszClientLicensorCertificate,
287 DRMCALLBACK pfnCallback,
288 PWSTR wszURL,
289 VOID *pvContext
290);
291
292HRESULT WINAPI DRMGetUsagePolicy(
293 DRMPUBHANDLE hIssuanceLicense,
294 UINT uIndex,
295 DRM_USAGEPOLICY_TYPE *peUsagePolicyType,
296 WINBOOL *pfExclusion,
297 UINT *puNameLength,
298 PWSTR wszName,
299 UINT *puMinVersionLength,
300 PWSTR wszMinVersion,
301 UINT *puMaxVersionLength,
302 PWSTR wszMaxVersion,
303 UINT *puPublicKeyLength,
304 PWSTR wszPublicKey,
305 UINT *puDigestAlgorithmLength,
306 PWSTR wszDigestAlgorithm,
307 UINT *pcbDigest,
308 BYTE *pbDigest
309);
310
311HRESULT WINAPI DRMGetUserInfo(
312 DRMPUBHANDLE hUser,
313 UINT *puUserNameLength,
314 PWSTR wszUserName,
315 UINT *puUserIdLength,
316 PWSTR wszUserId,
317 UINT *puUserIdTypeLength,
318 PWSTR wszUserIdType
319);
320
321HRESULT WINAPI DRMGetUserRights(
322 DRMPUBHANDLE hIssuanceLicense,
323 DRMPUBHANDLE hUser,
324 UINT uIndex,
325 DRMPUBHANDLE *phRight
326);
327
328HRESULT WINAPI DRMGetUsers(
329 DRMPUBHANDLE hIssuanceLicense,
330 UINT uIndex,
331 DRMPUBHANDLE *phUser
332);
333
334HRESULT WINAPI DRMSetApplicationSpecificData(
335 DRMPUBHANDLE hIssuanceLicense,
336 WINBOOL fDelete,
337 PWSTR wszName,
338 PWSTR wszValue
339);
340
341HRESULT WINAPI DRMSetMetaData(
342 DRMPUBHANDLE hIssuanceLicense,
343 PWSTR wszContentId,
344 PWSTR wszContentIdType,
345 PWSTR wszSKUId,
346 PWSTR wszSKUIdType,
347 PWSTR wszContentType,
348 PWSTR wszContentName
349);
350
351HRESULT WINAPI DRMSetNameAndDescription(
352 DRMPUBHANDLE hIssuanceLicense,
353 WINBOOL fDelete,
354 UINT lcid,
355 PWSTR wszName,
356 PWSTR wszDescription
357);
358
359HRESULT WINAPI DRMSetRevocationPoint(
360 DRMPUBHANDLE hIssuanceLicense,
361 WINBOOL fDelete,
362 PWSTR wszId,
363 PWSTR wszIdType,
364 PWSTR wszURL,
365 SYSTEMTIME *pstFrequency,
366 PWSTR wszName,
367 PWSTR wszPublicKey
368);
369
370HRESULT WINAPI DRMSetUsagePolicy(
371 DRMPUBHANDLE hIssuanceLicense,
372 DRM_USAGEPOLICY_TYPE eUsagePolicyType,
373 WINBOOL fDelete,
374 WINBOOL fExclusion,
375 PWSTR wszName,
376 PWSTR wszMinVersion,
377 PWSTR wszMaxVersion,
378 PWSTR wszPublicKey,
379 PWSTR wszDigestAlgorithm,
380 BYTE *pbDigest,
381 UINT cbDigest
382);
383
384HRESULT WINAPI DRMCloseEnvironmentHandle(
385 DRMENVHANDLE hEnv
386);
387
388HRESULT WINAPI DRMCloseHandle(
389 DRMHANDLE handle
390);
391
392HRESULT WINAPI DRMClosePubHandle(
393 DRMPUBHANDLE hPub
394);
395
396HRESULT WINAPI DRMCloseQueryHandle(
397 DRMQUERYHANDLE hQuery
398);
399
400HRESULT WINAPI DRMDuplicateEnvironmentHandle(
401 DRMENVHANDLE hToCopy,
402 DRMENVHANDLE *phCopy
403);
404
405HRESULT WINAPI DRMDuplicateHandle(
406 DRMHANDLE hToCopy,
407 DRMHANDLE *phCopy
408);
409
410HRESULT WINAPI DRMDuplicatePubHandle(
411 DRMPUBHANDLE hPubIn,
412 DRMPUBHANDLE *phPubOut
413);
414
415HRESULT WINAPI DRMGetUnboundLicenseAttribute(
416 DRMQUERYHANDLE hQueryRoot,
417 PWSTR wszAttributeType,
418 UINT iWhich,
419 DRMENCODINGTYPE *peEncoding,
420 UINT *pcBuffer,
421 BYTE *pbBuffer
422);
423
424HRESULT WINAPI DRMGetUnboundLicenseAttributeCount(
425 DRMQUERYHANDLE hQueryRoot,
426 PWSTR wszAttributeType,
427 UINT *pcAttributes
428);
429
430HRESULT WINAPI DRMGetUnboundLicenseObject(
431 DRMQUERYHANDLE hQueryRoot,
432 PWSTR wszSubObjectType,
433 UINT iIndex,
434 DRMQUERYHANDLE *phSubQuery
435);
436
437HRESULT WINAPI DRMGetUnboundLicenseObjectCount(
438 DRMQUERYHANDLE hQueryRoot,
439 PWSTR wszSubObjectType,
440 UINT *pcSubObjects
441);
442
443HRESULT WINAPI DRMParseUnboundLicense(
444 PWSTR wszCertificate,
445 DRMQUERYHANDLE *phQueryRoot
446);
447
448HRESULT WINAPI DRMCreateBoundLicense(
449 DRMENVHANDLE hEnv,
450 DRMBOUNDLICENSEPARAMS *pParams,
451 PWSTR wszLicenseChain,
452 DRMHANDLE *phBoundLicense,
453 DRMHANDLE *phErrorLog
454);
455
456HRESULT WINAPI DRMCreateEnablingPrincipal(
457 DRMENVHANDLE hEnv,
458 DRMHANDLE hLibrary,
459 PWSTR wszObject,
460 DRMID *pidPrincipal,
461 PWSTR wszCredentials,
462 DRMHANDLE *pHEnablingPrincipal
463);
464
465HRESULT WINAPI DRMGetBoundLicenseAttribute(
466 DRMHANDLE hQueryRoot,
467 PWSTR wszAttribute,
468 UINT iWhich,
469 DRMENCODINGTYPE *peEncoding,
470 UINT *pcBuffer,
471 BYTE *pbBuffer
472);
473
474HRESULT WINAPI DRMGetBoundLicenseAttributeCount(
475 DRMHANDLE hQueryRoot,
476 PWSTR wszAttribute,
477 UINT *pcAttributes
478);
479
480HRESULT WINAPI DRMGetBoundLicenseObject(
481 DRMHANDLE hQueryRoot,
482 PWSTR wszSubObjectType,
483 UINT iWhich,
484 DRMHANDLE *phSubObject
485);
486
487HRESULT WINAPI DRMGetBoundLicenseObjectCount(
488 DRMHANDLE hQueryRoot,
489 PWSTR wszSubObjectType,
490 UINT *pcSubObject
491);
492
493HRESULT WINAPI DRMAcquireAdvisories(
494 DRMHSESSION hLicenseStorage,
495 PWSTR wszLicense,
496 PWSTR wszURL,
497 VOID *pvContext
498);
499
500HRESULT WINAPI DRMAcquireLicense(
501 DRMHSESSION hSession,
502 UINT uFlags,
503 PWSTR wszGroupIdentityCredential,
504 PWSTR wszRequestedRights,
505 PWSTR wszCustomData,
506 PWSTR wszURL,
507 VOID *pvContext
508);
509
510HRESULT WINAPI DRMAddLicense(
511 DRMHSESSION hLicenseStorage,
512 UINT uFlags,
513 PWSTR wszLicense
514);
515
516HRESULT WINAPI DRMConstructCertificateChain(
517 UINT cCertificates,
518 PWSTR *rgwszCertificates,
519 UINT *pcChain,
520 PWSTR wszChain
521);
522
523HRESULT WINAPI DRMDeconstructCertificateChain(
524 PWSTR wszChain,
525 UINT iWhich,
526 UINT *pcCert,
527 PWSTR wszCert
528);
529
530HRESULT WINAPI DRMDeleteLicense(
531 DRMHSESSION hSession,
532 PWSTR wszLicenseId
533);
534
535HRESULT WINAPI DRMEnumerateLicense(
536 DRMHSESSION hSession,
537 UINT uFlags,
538 UINT uIndex,
539 WINBOOL *pfSharedFlag,
540 UINT *puCertificateDataLen,
541 PWSTR wszCertificateData
542);
543
544HRESULT WINAPI DRMGetCertificateChainCount(
545 PWSTR wszChain,
546 UINT *pcCertCount
547);
548
549HRESULT WINAPI DRMAttest(
550 DRMHANDLE hEnablingPrincipal,
551 PWSTR wszData,
552 DRMATTESTTYPE eType,
553 UINT *pcStrLen,
554 PWSTR wszAttestedBlob
555);
556
557HRESULT WINAPI DRMCreateEnablingBitsDecryptor(
558 DRMHANDLE hBoundLicense,
559 PWSTR wszRight,
560 DRMHANDLE hAuxLib,
561 PWSTR wszAuxPlug,
562 DRMHANDLE *phDecryptor
563);
564
565HRESULT WINAPI DRMCreateEnablingBitsEncryptor(
566 DRMHANDLE hBoundLicense,
567 PWSTR wszRight,
568 DRMHANDLE hAuxLib,
569 PWSTR wszAuxPlug,
570 DRMHANDLE *phEncryptor
571);
572
573HRESULT WINAPI DRMDecrypt(
574 DRMHANDLE hCryptoProvider,
575 UINT iPosition,
576 UINT cNumInBytes,
577 BYTE *pbInData,
578 UINT *pcNumOutBytes,
579 BYTE *pbOutData
580);
581
582HRESULT WINAPI DRMEncrypt(
583 DRMHANDLE hCryptoProvider,
584 UINT iPosition,
585 UINT cNumInBytes,
586 BYTE *pbInData,
587 UINT *pcNumOutBytes,
588 BYTE *pbOutData
589);
590
591HRESULT WINAPI DRMVerify(
592 PWSTR wszData,
593 UINT *pcStrLenAttestedData,
594 PWSTR wszAttestedData,
595 DRMATTESTTYPE *peType,
596 UINT *pcPrincipalChain,
597 PWSTR wszPrincipalChain,
598 UINT *pcManifestChain,
599 PWSTR wszManifestChain
600);
601
602HRESULT WINAPI DRMDecode(
603 PWSTR wszAlgID,
604 PWSTR wszEncodedString,
605 UINT *puDecodedDataLen,
606 BYTE *pbDecodedData
607);
608
609HRESULT WINAPI DRMEncode(
610 PWSTR wszAlgID,
611 UINT uDataLen,
612 BYTE *pbDecodedData,
613 UINT *puEncodedStringLen,
614 PWSTR wszEncodedString
615);
616
617HRESULT WINAPI DRMGetInfo(
618 DRMHANDLE handle,
619 PWSTR wszAttribute,
620 DRMENCODINGTYPE *peEncoding,
621 UINT *pcBuffer,
622 BYTE *pbBuffer
623);
624
625HRESULT WINAPI DRMGetTime(
626 DRMENVHANDLE hEnv,
627 DRMTIMETYPE eTimerIdType,
628 SYSTEMTIME *poTimeObject
629);
630
631#if (_WIN32_WINNT >= 0x0600)
632HRESULT WINAPI DRMIsWindowProtected(
633 HWND hwnd,
634 WINBOOL *pfProtected
635);
636
637HRESULT WINAPI DRMRegisterProtectedWindow(
638 DRMENVHANDLE hEnv,
639 HWND hwnd
640);
641
642HRESULT WINAPI DRMAcquireIssuanceLicenseTemplate(
643 DRMHSESSION hClient,
644 UINT uFlags,
645 VOID *pvReserved,
646 UINT cReserved,
647 PWSTR *pwszReserved,
648 PWSTR wszURL,
649 VOID *pvContext
650);
651
652#endif /*(_WIN32_WINNT >= 0x0600)*/
653#if (_WIN32_WINNT >= 0x0601)
654HRESULT WINAPI DRMGetSignedIssuanceLicenseEx(
655 DRMENVHANDLE hEnv,
656 DRMPUBHANDLE hIssuanceLicense,
657 UINT uFlags,
658 BYTE *pbSymKey,
659 UINT cbSymKey,
660 PWSTR wszSymKeyType,
661 VOID *pvReserved,
662 DRMHANDLE hEnablingPrincipal,
663 DRMHANDLE hBoundLicense,
664 DRMCALLBACK pfnCallback,
665 VOID *pvContext
666);
667#endif /*(_WIN32_WINNT >= 0x0601)*/
668
669#ifdef __cplusplus
670}
671#endif
672#endif /*_INC_MSDRM*/
Note: See TracBrowser for help on using the repository browser.