ホーム › Data.RightsManagement › DRMGetRevocationPoint
DRMGetRevocationPoint
関数発行ライセンスの失効ポイント情報を取得する。
シグネチャ
// msdrm.dll
#include <windows.h>
HRESULT DRMGetRevocationPoint(
DWORD hIssuanceLicense,
DWORD* puIdLength,
LPWSTR wszId, // optional
DWORD* puIdTypeLength,
LPWSTR wszIdType, // optional
DWORD* puURLLength,
LPWSTR wszRL, // optional
SYSTEMTIME* pstFrequency,
DWORD* puNameLength,
LPWSTR wszName, // optional
DWORD* puPublicKeyLength,
LPWSTR wszPublicKey // optional
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| hIssuanceLicense | DWORD | in |
| puIdLength | DWORD* | inout |
| wszId | LPWSTR | outoptional |
| puIdTypeLength | DWORD* | inout |
| wszIdType | LPWSTR | outoptional |
| puURLLength | DWORD* | inout |
| wszRL | LPWSTR | outoptional |
| pstFrequency | SYSTEMTIME* | inout |
| puNameLength | DWORD* | inout |
| wszName | LPWSTR | outoptional |
| puPublicKeyLength | DWORD* | inout |
| wszPublicKey | LPWSTR | outoptional |
戻り値の型: HRESULT
各言語での呼び出し定義
// msdrm.dll
#include <windows.h>
HRESULT DRMGetRevocationPoint(
DWORD hIssuanceLicense,
DWORD* puIdLength,
LPWSTR wszId, // optional
DWORD* puIdTypeLength,
LPWSTR wszIdType, // optional
DWORD* puURLLength,
LPWSTR wszRL, // optional
SYSTEMTIME* pstFrequency,
DWORD* puNameLength,
LPWSTR wszName, // optional
DWORD* puPublicKeyLength,
LPWSTR wszPublicKey // optional
);[DllImport("msdrm.dll", ExactSpelling = true)]
static extern int DRMGetRevocationPoint(
uint hIssuanceLicense, // DWORD
ref uint puIdLength, // DWORD* in/out
[MarshalAs(UnmanagedType.LPWStr)] System.Text.StringBuilder wszId, // LPWSTR optional, out
ref uint puIdTypeLength, // DWORD* in/out
[MarshalAs(UnmanagedType.LPWStr)] System.Text.StringBuilder wszIdType, // LPWSTR optional, out
ref uint puURLLength, // DWORD* in/out
[MarshalAs(UnmanagedType.LPWStr)] System.Text.StringBuilder wszRL, // LPWSTR optional, out
IntPtr pstFrequency, // SYSTEMTIME* in/out
ref uint puNameLength, // DWORD* in/out
[MarshalAs(UnmanagedType.LPWStr)] System.Text.StringBuilder wszName, // LPWSTR optional, out
ref uint puPublicKeyLength, // DWORD* in/out
[MarshalAs(UnmanagedType.LPWStr)] System.Text.StringBuilder wszPublicKey // LPWSTR optional, out
);<DllImport("msdrm.dll", ExactSpelling:=True)>
Public Shared Function DRMGetRevocationPoint(
hIssuanceLicense As UInteger, ' DWORD
ByRef puIdLength As UInteger, ' DWORD* in/out
<MarshalAs(UnmanagedType.LPWStr)> wszId As System.Text.StringBuilder, ' LPWSTR optional, out
ByRef puIdTypeLength As UInteger, ' DWORD* in/out
<MarshalAs(UnmanagedType.LPWStr)> wszIdType As System.Text.StringBuilder, ' LPWSTR optional, out
ByRef puURLLength As UInteger, ' DWORD* in/out
<MarshalAs(UnmanagedType.LPWStr)> wszRL As System.Text.StringBuilder, ' LPWSTR optional, out
pstFrequency As IntPtr, ' SYSTEMTIME* in/out
ByRef puNameLength As UInteger, ' DWORD* in/out
<MarshalAs(UnmanagedType.LPWStr)> wszName As System.Text.StringBuilder, ' LPWSTR optional, out
ByRef puPublicKeyLength As UInteger, ' DWORD* in/out
<MarshalAs(UnmanagedType.LPWStr)> wszPublicKey As System.Text.StringBuilder ' LPWSTR optional, out
) As Integer
End Function' hIssuanceLicense : DWORD
' puIdLength : DWORD* in/out
' wszId : LPWSTR optional, out
' puIdTypeLength : DWORD* in/out
' wszIdType : LPWSTR optional, out
' puURLLength : DWORD* in/out
' wszRL : LPWSTR optional, out
' pstFrequency : SYSTEMTIME* in/out
' puNameLength : DWORD* in/out
' wszName : LPWSTR optional, out
' puPublicKeyLength : DWORD* in/out
' wszPublicKey : LPWSTR optional, out
Declare PtrSafe Function DRMGetRevocationPoint Lib "msdrm" ( _
ByVal hIssuanceLicense As Long, _
ByRef puIdLength As Long, _
ByVal wszId As LongPtr, _
ByRef puIdTypeLength As Long, _
ByVal wszIdType As LongPtr, _
ByRef puURLLength As Long, _
ByVal wszRL As LongPtr, _
ByVal pstFrequency As LongPtr, _
ByRef puNameLength As Long, _
ByVal wszName As LongPtr, _
ByRef puPublicKeyLength As Long, _
ByVal wszPublicKey As LongPtr) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
DRMGetRevocationPoint = ctypes.windll.msdrm.DRMGetRevocationPoint
DRMGetRevocationPoint.restype = ctypes.c_int
DRMGetRevocationPoint.argtypes = [
wintypes.DWORD, # hIssuanceLicense : DWORD
ctypes.POINTER(wintypes.DWORD), # puIdLength : DWORD* in/out
wintypes.LPWSTR, # wszId : LPWSTR optional, out
ctypes.POINTER(wintypes.DWORD), # puIdTypeLength : DWORD* in/out
wintypes.LPWSTR, # wszIdType : LPWSTR optional, out
ctypes.POINTER(wintypes.DWORD), # puURLLength : DWORD* in/out
wintypes.LPWSTR, # wszRL : LPWSTR optional, out
ctypes.c_void_p, # pstFrequency : SYSTEMTIME* in/out
ctypes.POINTER(wintypes.DWORD), # puNameLength : DWORD* in/out
wintypes.LPWSTR, # wszName : LPWSTR optional, out
ctypes.POINTER(wintypes.DWORD), # puPublicKeyLength : DWORD* in/out
wintypes.LPWSTR, # wszPublicKey : LPWSTR optional, out
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('msdrm.dll')
DRMGetRevocationPoint = Fiddle::Function.new(
lib['DRMGetRevocationPoint'],
[
-Fiddle::TYPE_INT, # hIssuanceLicense : DWORD
Fiddle::TYPE_VOIDP, # puIdLength : DWORD* in/out
Fiddle::TYPE_VOIDP, # wszId : LPWSTR optional, out
Fiddle::TYPE_VOIDP, # puIdTypeLength : DWORD* in/out
Fiddle::TYPE_VOIDP, # wszIdType : LPWSTR optional, out
Fiddle::TYPE_VOIDP, # puURLLength : DWORD* in/out
Fiddle::TYPE_VOIDP, # wszRL : LPWSTR optional, out
Fiddle::TYPE_VOIDP, # pstFrequency : SYSTEMTIME* in/out
Fiddle::TYPE_VOIDP, # puNameLength : DWORD* in/out
Fiddle::TYPE_VOIDP, # wszName : LPWSTR optional, out
Fiddle::TYPE_VOIDP, # puPublicKeyLength : DWORD* in/out
Fiddle::TYPE_VOIDP, # wszPublicKey : LPWSTR optional, out
],
Fiddle::TYPE_INT)#[link(name = "msdrm")]
extern "system" {
fn DRMGetRevocationPoint(
hIssuanceLicense: u32, // DWORD
puIdLength: *mut u32, // DWORD* in/out
wszId: *mut u16, // LPWSTR optional, out
puIdTypeLength: *mut u32, // DWORD* in/out
wszIdType: *mut u16, // LPWSTR optional, out
puURLLength: *mut u32, // DWORD* in/out
wszRL: *mut u16, // LPWSTR optional, out
pstFrequency: *mut SYSTEMTIME, // SYSTEMTIME* in/out
puNameLength: *mut u32, // DWORD* in/out
wszName: *mut u16, // LPWSTR optional, out
puPublicKeyLength: *mut u32, // DWORD* in/out
wszPublicKey: *mut u16 // LPWSTR optional, out
) -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("msdrm.dll")]
public static extern int DRMGetRevocationPoint(uint hIssuanceLicense, ref uint puIdLength, [MarshalAs(UnmanagedType.LPWStr)] System.Text.StringBuilder wszId, ref uint puIdTypeLength, [MarshalAs(UnmanagedType.LPWStr)] System.Text.StringBuilder wszIdType, ref uint puURLLength, [MarshalAs(UnmanagedType.LPWStr)] System.Text.StringBuilder wszRL, IntPtr pstFrequency, ref uint puNameLength, [MarshalAs(UnmanagedType.LPWStr)] System.Text.StringBuilder wszName, ref uint puPublicKeyLength, [MarshalAs(UnmanagedType.LPWStr)] System.Text.StringBuilder wszPublicKey);
"@
$api = Add-Type -MemberDefinition $sig -Name 'msdrm_DRMGetRevocationPoint' -Namespace Win32 -PassThru
# $api::DRMGetRevocationPoint(hIssuanceLicense, puIdLength, wszId, puIdTypeLength, wszIdType, puURLLength, wszRL, pstFrequency, puNameLength, wszName, puPublicKeyLength, wszPublicKey)#uselib "msdrm.dll"
#func global DRMGetRevocationPoint "DRMGetRevocationPoint" sptr, sptr, sptr, sptr, sptr, sptr, sptr, sptr, sptr, sptr, sptr, sptr
; DRMGetRevocationPoint hIssuanceLicense, varptr(puIdLength), varptr(wszId), varptr(puIdTypeLength), varptr(wszIdType), varptr(puURLLength), varptr(wszRL), varptr(pstFrequency), varptr(puNameLength), varptr(wszName), varptr(puPublicKeyLength), varptr(wszPublicKey) ; 戻り値は stat
; hIssuanceLicense : DWORD -> "sptr"
; puIdLength : DWORD* in/out -> "sptr"
; wszId : LPWSTR optional, out -> "sptr"
; puIdTypeLength : DWORD* in/out -> "sptr"
; wszIdType : LPWSTR optional, out -> "sptr"
; puURLLength : DWORD* in/out -> "sptr"
; wszRL : LPWSTR optional, out -> "sptr"
; pstFrequency : SYSTEMTIME* in/out -> "sptr"
; puNameLength : DWORD* in/out -> "sptr"
; wszName : LPWSTR optional, out -> "sptr"
; puPublicKeyLength : DWORD* in/out -> "sptr"
; wszPublicKey : LPWSTR optional, out -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。出力引数:
#uselib "msdrm.dll" #cfunc global DRMGetRevocationPoint "DRMGetRevocationPoint" int, var, var, var, var, var, var, var, var, var, var, var ; res = DRMGetRevocationPoint(hIssuanceLicense, puIdLength, wszId, puIdTypeLength, wszIdType, puURLLength, wszRL, pstFrequency, puNameLength, wszName, puPublicKeyLength, wszPublicKey) ; hIssuanceLicense : DWORD -> "int" ; puIdLength : DWORD* in/out -> "var" ; wszId : LPWSTR optional, out -> "var" ; puIdTypeLength : DWORD* in/out -> "var" ; wszIdType : LPWSTR optional, out -> "var" ; puURLLength : DWORD* in/out -> "var" ; wszRL : LPWSTR optional, out -> "var" ; pstFrequency : SYSTEMTIME* in/out -> "var" ; puNameLength : DWORD* in/out -> "var" ; wszName : LPWSTR optional, out -> "var" ; puPublicKeyLength : DWORD* in/out -> "var" ; wszPublicKey : LPWSTR optional, out -> "var" ; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。#uselib "msdrm.dll" #cfunc global DRMGetRevocationPoint "DRMGetRevocationPoint" int, sptr, sptr, sptr, sptr, sptr, sptr, sptr, sptr, sptr, sptr, sptr ; res = DRMGetRevocationPoint(hIssuanceLicense, varptr(puIdLength), varptr(wszId), varptr(puIdTypeLength), varptr(wszIdType), varptr(puURLLength), varptr(wszRL), varptr(pstFrequency), varptr(puNameLength), varptr(wszName), varptr(puPublicKeyLength), varptr(wszPublicKey)) ; hIssuanceLicense : DWORD -> "int" ; puIdLength : DWORD* in/out -> "sptr" ; wszId : LPWSTR optional, out -> "sptr" ; puIdTypeLength : DWORD* in/out -> "sptr" ; wszIdType : LPWSTR optional, out -> "sptr" ; puURLLength : DWORD* in/out -> "sptr" ; wszRL : LPWSTR optional, out -> "sptr" ; pstFrequency : SYSTEMTIME* in/out -> "sptr" ; puNameLength : DWORD* in/out -> "sptr" ; wszName : LPWSTR optional, out -> "sptr" ; puPublicKeyLength : DWORD* in/out -> "sptr" ; wszPublicKey : LPWSTR optional, out -> "sptr" ; ※出力/バッファ引数はポインタ方式(token=sptr / 呼び出しは varptr(変数))。
出力引数:
; HRESULT DRMGetRevocationPoint(DWORD hIssuanceLicense, DWORD* puIdLength, LPWSTR wszId, DWORD* puIdTypeLength, LPWSTR wszIdType, DWORD* puURLLength, LPWSTR wszRL, SYSTEMTIME* pstFrequency, DWORD* puNameLength, LPWSTR wszName, DWORD* puPublicKeyLength, LPWSTR wszPublicKey) #uselib "msdrm.dll" #cfunc global DRMGetRevocationPoint "DRMGetRevocationPoint" int, var, var, var, var, var, var, var, var, var, var, var ; res = DRMGetRevocationPoint(hIssuanceLicense, puIdLength, wszId, puIdTypeLength, wszIdType, puURLLength, wszRL, pstFrequency, puNameLength, wszName, puPublicKeyLength, wszPublicKey) ; hIssuanceLicense : DWORD -> "int" ; puIdLength : DWORD* in/out -> "var" ; wszId : LPWSTR optional, out -> "var" ; puIdTypeLength : DWORD* in/out -> "var" ; wszIdType : LPWSTR optional, out -> "var" ; puURLLength : DWORD* in/out -> "var" ; wszRL : LPWSTR optional, out -> "var" ; pstFrequency : SYSTEMTIME* in/out -> "var" ; puNameLength : DWORD* in/out -> "var" ; wszName : LPWSTR optional, out -> "var" ; puPublicKeyLength : DWORD* in/out -> "var" ; wszPublicKey : LPWSTR optional, out -> "var" ; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。; HRESULT DRMGetRevocationPoint(DWORD hIssuanceLicense, DWORD* puIdLength, LPWSTR wszId, DWORD* puIdTypeLength, LPWSTR wszIdType, DWORD* puURLLength, LPWSTR wszRL, SYSTEMTIME* pstFrequency, DWORD* puNameLength, LPWSTR wszName, DWORD* puPublicKeyLength, LPWSTR wszPublicKey) #uselib "msdrm.dll" #cfunc global DRMGetRevocationPoint "DRMGetRevocationPoint" int, intptr, intptr, intptr, intptr, intptr, intptr, intptr, intptr, intptr, intptr, intptr ; res = DRMGetRevocationPoint(hIssuanceLicense, varptr(puIdLength), varptr(wszId), varptr(puIdTypeLength), varptr(wszIdType), varptr(puURLLength), varptr(wszRL), varptr(pstFrequency), varptr(puNameLength), varptr(wszName), varptr(puPublicKeyLength), varptr(wszPublicKey)) ; hIssuanceLicense : DWORD -> "int" ; puIdLength : DWORD* in/out -> "intptr" ; wszId : LPWSTR optional, out -> "intptr" ; puIdTypeLength : DWORD* in/out -> "intptr" ; wszIdType : LPWSTR optional, out -> "intptr" ; puURLLength : DWORD* in/out -> "intptr" ; wszRL : LPWSTR optional, out -> "intptr" ; pstFrequency : SYSTEMTIME* in/out -> "intptr" ; puNameLength : DWORD* in/out -> "intptr" ; wszName : LPWSTR optional, out -> "intptr" ; puPublicKeyLength : DWORD* in/out -> "intptr" ; wszPublicKey : LPWSTR optional, out -> "intptr" ; ※出力/バッファ引数はポインタ方式(token=intptr / 呼び出しは varptr(変数))。
import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
msdrm = windows.NewLazySystemDLL("msdrm.dll")
procDRMGetRevocationPoint = msdrm.NewProc("DRMGetRevocationPoint")
)
// hIssuanceLicense (DWORD), puIdLength (DWORD* in/out), wszId (LPWSTR optional, out), puIdTypeLength (DWORD* in/out), wszIdType (LPWSTR optional, out), puURLLength (DWORD* in/out), wszRL (LPWSTR optional, out), pstFrequency (SYSTEMTIME* in/out), puNameLength (DWORD* in/out), wszName (LPWSTR optional, out), puPublicKeyLength (DWORD* in/out), wszPublicKey (LPWSTR optional, out)
r1, _, err := procDRMGetRevocationPoint.Call(
uintptr(hIssuanceLicense),
uintptr(puIdLength),
uintptr(wszId),
uintptr(puIdTypeLength),
uintptr(wszIdType),
uintptr(puURLLength),
uintptr(wszRL),
uintptr(pstFrequency),
uintptr(puNameLength),
uintptr(wszName),
uintptr(puPublicKeyLength),
uintptr(wszPublicKey),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // HRESULTfunction DRMGetRevocationPoint(
hIssuanceLicense: DWORD; // DWORD
puIdLength: Pointer; // DWORD* in/out
wszId: PWideChar; // LPWSTR optional, out
puIdTypeLength: Pointer; // DWORD* in/out
wszIdType: PWideChar; // LPWSTR optional, out
puURLLength: Pointer; // DWORD* in/out
wszRL: PWideChar; // LPWSTR optional, out
pstFrequency: Pointer; // SYSTEMTIME* in/out
puNameLength: Pointer; // DWORD* in/out
wszName: PWideChar; // LPWSTR optional, out
puPublicKeyLength: Pointer; // DWORD* in/out
wszPublicKey: PWideChar // LPWSTR optional, out
): Integer; stdcall;
external 'msdrm.dll' name 'DRMGetRevocationPoint';result := DllCall("msdrm\DRMGetRevocationPoint"
, "UInt", hIssuanceLicense ; DWORD
, "Ptr", puIdLength ; DWORD* in/out
, "Ptr", wszId ; LPWSTR optional, out
, "Ptr", puIdTypeLength ; DWORD* in/out
, "Ptr", wszIdType ; LPWSTR optional, out
, "Ptr", puURLLength ; DWORD* in/out
, "Ptr", wszRL ; LPWSTR optional, out
, "Ptr", pstFrequency ; SYSTEMTIME* in/out
, "Ptr", puNameLength ; DWORD* in/out
, "Ptr", wszName ; LPWSTR optional, out
, "Ptr", puPublicKeyLength ; DWORD* in/out
, "Ptr", wszPublicKey ; LPWSTR optional, out
, "Int") ; return: HRESULT●DRMGetRevocationPoint(hIssuanceLicense, puIdLength, wszId, puIdTypeLength, wszIdType, puURLLength, wszRL, pstFrequency, puNameLength, wszName, puPublicKeyLength, wszPublicKey) = DLL("msdrm.dll", "int DRMGetRevocationPoint(dword, void*, char*, void*, char*, void*, char*, void*, void*, char*, void*, char*)")
# 呼び出し: DRMGetRevocationPoint(hIssuanceLicense, puIdLength, wszId, puIdTypeLength, wszIdType, puURLLength, wszRL, pstFrequency, puNameLength, wszName, puPublicKeyLength, wszPublicKey)
# hIssuanceLicense : DWORD -> "dword"
# puIdLength : DWORD* in/out -> "void*"
# wszId : LPWSTR optional, out -> "char*"
# puIdTypeLength : DWORD* in/out -> "void*"
# wszIdType : LPWSTR optional, out -> "char*"
# puURLLength : DWORD* in/out -> "void*"
# wszRL : LPWSTR optional, out -> "char*"
# pstFrequency : SYSTEMTIME* in/out -> "void*"
# puNameLength : DWORD* in/out -> "void*"
# wszName : LPWSTR optional, out -> "char*"
# puPublicKeyLength : DWORD* in/out -> "void*"
# wszPublicKey : LPWSTR optional, out -> "char*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。