ホーム › UI.WindowsAndMessaging › DestroyResourceIndexer
DestroyResourceIndexer
関数リソースインデクサを破棄しメモリを解放する。
シグネチャ
// MrmSupport.dll
#include <windows.h>
void DestroyResourceIndexer(
void* resourceIndexer // optional
);パラメーター
| 名前 | 型 | 方向 | 説明 |
|---|---|---|---|
| resourceIndexer | void* | inoptional | 計算リソースを解放する対象のリソースインデクサー。 |
戻り値の型: void
公式ドキュメント
指定したリソースインデクサーに関連付けられた計算リソースを解放します。
出典・ライセンス: 上記「公式ドキュメント」の内容は Microsoft の Win32 API ドキュメント(MicrosoftDocs/sdk-api)を日本語に翻訳・改変したものです。© Microsoft Corporation. CC BY 4.0 で提供。
Microsoft 公式リファレンス: 英語 (en-us) · 日本語 (ja-jp) · 原文ソース (GitHub)
Microsoft 公式リファレンス: 英語 (en-us) · 日本語 (ja-jp) · 原文ソース (GitHub)
各言語での呼び出し定義
// MrmSupport.dll
#include <windows.h>
void DestroyResourceIndexer(
void* resourceIndexer // optional
);[DllImport("MrmSupport.dll", ExactSpelling = true)]
static extern void DestroyResourceIndexer(
IntPtr resourceIndexer // void* optional
);<DllImport("MrmSupport.dll", ExactSpelling:=True)>
Public Shared Sub DestroyResourceIndexer(
resourceIndexer As IntPtr ' void* optional
)
End Sub' resourceIndexer : void* optional
Declare PtrSafe Sub DestroyResourceIndexer Lib "mrmsupport" ( _
ByVal resourceIndexer As LongPtr)
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
DestroyResourceIndexer = ctypes.windll.mrmsupport.DestroyResourceIndexer
DestroyResourceIndexer.restype = None
DestroyResourceIndexer.argtypes = [
ctypes.POINTER(None), # resourceIndexer : void* optional
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('MrmSupport.dll')
DestroyResourceIndexer = Fiddle::Function.new(
lib['DestroyResourceIndexer'],
[
Fiddle::TYPE_VOIDP, # resourceIndexer : void* optional
],
Fiddle::TYPE_VOID)#[link(name = "mrmsupport")]
extern "system" {
fn DestroyResourceIndexer(
resourceIndexer: *mut () // void* optional
);
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("MrmSupport.dll")]
public static extern void DestroyResourceIndexer(IntPtr resourceIndexer);
"@
$api = Add-Type -MemberDefinition $sig -Name 'MrmSupport_DestroyResourceIndexer' -Namespace Win32 -PassThru
# $api::DestroyResourceIndexer(resourceIndexer)#uselib "MrmSupport.dll"
#func global DestroyResourceIndexer "DestroyResourceIndexer" sptr
; DestroyResourceIndexer resourceIndexer
; resourceIndexer : void* optional -> "sptr"#uselib "MrmSupport.dll"
#func global DestroyResourceIndexer "DestroyResourceIndexer" sptr
; DestroyResourceIndexer resourceIndexer
; resourceIndexer : void* optional -> "sptr"; void DestroyResourceIndexer(void* resourceIndexer)
#uselib "MrmSupport.dll"
#func global DestroyResourceIndexer "DestroyResourceIndexer" intptr
; DestroyResourceIndexer resourceIndexer
; resourceIndexer : void* optional -> "intptr"import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
mrmsupport = windows.NewLazySystemDLL("MrmSupport.dll")
procDestroyResourceIndexer = mrmsupport.NewProc("DestroyResourceIndexer")
)
// resourceIndexer (void* optional)
r1, _, err := procDestroyResourceIndexer.Call(
uintptr(resourceIndexer),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // voidprocedure DestroyResourceIndexer(
resourceIndexer: Pointer // void* optional
); stdcall;
external 'MrmSupport.dll' name 'DestroyResourceIndexer';result := DllCall("MrmSupport\DestroyResourceIndexer"
, "Ptr", resourceIndexer ; void* optional
, "Int") ; return: void●DestroyResourceIndexer(resourceIndexer) = DLL("MrmSupport.dll", "int DestroyResourceIndexer(void*)")
# 呼び出し: DestroyResourceIndexer(resourceIndexer)
# resourceIndexer : void* optional -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。const std = @import("std");
extern "mrmsupport" fn DestroyResourceIndexer(
resourceIndexer: ?*anyopaque // void* optional
) callconv(std.os.windows.WINAPI) void;proc DestroyResourceIndexer(
resourceIndexer: pointer # void* optional
) {.importc: "DestroyResourceIndexer", stdcall, dynlib: "MrmSupport.dll".}pragma(lib, "mrmsupport");
extern(Windows)
void DestroyResourceIndexer(
void* resourceIndexer // void* optional
);ccall((:DestroyResourceIndexer, "MrmSupport.dll"), stdcall, Cvoid,
(Ptr{Cvoid},),
resourceIndexer)
# resourceIndexer : void* optional -> Ptr{Cvoid}
# stdcall は 32bit のみ意味を持つ(x64 では無視)。local ffi = require("ffi")
ffi.cdef[[
void DestroyResourceIndexer(
void* resourceIndexer);
]]
local mrmsupport = ffi.load("mrmsupport")
-- mrmsupport.DestroyResourceIndexer(resourceIndexer)
-- resourceIndexer : void* optional
-- 構造体/GUIDへのポインタは cdef が通るよう void* で表記(実型は各引数コメント参照)。値渡し構造体・enum は対応する typedef を cdef に追加すること。const koffi = require('koffi');
const lib = koffi.load('MrmSupport.dll');
const DestroyResourceIndexer = lib.func('__stdcall', 'DestroyResourceIndexer', 'void', ['void *']);
// DestroyResourceIndexer(resourceIndexer)
// resourceIndexer : void* optional -> 'void *'
// 出力ポインタは koffi.out(...) で包む。構造体は koffi.struct で定義。const lib = Deno.dlopen("MrmSupport.dll", {
DestroyResourceIndexer: { parameters: ["pointer"], result: "void" },
});
// lib.symbols.DestroyResourceIndexer(resourceIndexer)
// resourceIndexer : void* optional -> "pointer"
// 文字列引数は "buffer"(NUL 終端のバイト列を Uint8Array で渡す)。
// 値渡し構造体は { struct: [ ...field types... ] } を使用。<?php
$ffi = FFI::cdef(<<<C
void DestroyResourceIndexer(
void* resourceIndexer);
C, "MrmSupport.dll");
// $ffi->DestroyResourceIndexer(resourceIndexer);
// resourceIndexer : void* optional
// 構造体/GUIDへのポインタは cdef が通るよう void* で表記(実型は各引数コメント参照)。値渡し構造体・enum は対応する typedef を cdef に追加すること。
// WINAPI(stdcall): x64 では呼出規約が統一されるため問題なし。x86 では __stdcall 対応のラッパが必要な場合あり。import com.sun.jna.*;
import com.sun.jna.ptr.*;
import com.sun.jna.win32.StdCallLibrary;
import com.sun.jna.win32.W32APIOptions;
public interface Mrmsupport extends StdCallLibrary {
Mrmsupport INSTANCE = Native.load("mrmsupport", Mrmsupport.class);
void DestroyResourceIndexer(
Pointer resourceIndexer // void* optional
);
}@[Link("mrmsupport")]
lib LibMrmSupport
fun DestroyResourceIndexer = DestroyResourceIndexer(
resourceIndexer : Void* # void* optional
) : Void
end
# 構造体/GUID/enum は lib 内に対応する型定義が必要。
# 呼出規約: x64 は規約統一のため OK。x86(32bit)は WINAPI=stdcall だが Crystal の fun に stdcall 付与構文がなく非対応。import 'dart:ffi';
import 'package:ffi/ffi.dart';
typedef DestroyResourceIndexerNative = Void Function(Pointer<Void>);
typedef DestroyResourceIndexerDart = void Function(Pointer<Void>);
final DestroyResourceIndexer = DynamicLibrary.open('MrmSupport.dll')
.lookupFunction<DestroyResourceIndexerNative, DestroyResourceIndexerDart>('DestroyResourceIndexer');
// resourceIndexer : void* optional -> Pointer<Void>
// 文字列は package:ffi の "...".toNativeUtf16()/toNativeUtf8() で変換。{$mode objfpc}{$H+}
procedure DestroyResourceIndexer(
resourceIndexer: Pointer // void* optional
); stdcall;
external 'MrmSupport.dll' name 'DestroyResourceIndexer';import Foreign
import Foreign.C.Types
import Foreign.C.String
foreign import stdcall safe "DestroyResourceIndexer"
c_DestroyResourceIndexer :: Ptr () -> IO ()
-- resourceIndexer : void* optional -> Ptr ()
-- 要 GHC(Windows)。stdcall は x64 では ccall として扱われる。ブロックする API は safe 呼び出し推奨。open Ctypes
open Foreign
let destroyresourceindexer =
foreign "DestroyResourceIndexer"
((ptr void) @-> returning void)
(* resourceIndexer : void* optional -> (ptr void) *)
(* foreign は cdecl 前提。x64 Windows では WINAPI と一致。構造体は ctypes structure を定義のこと。 *)(cffi:define-foreign-library mrmsupport (t "MrmSupport.dll"))
(cffi:use-foreign-library mrmsupport)
(cffi:defcfun ("DestroyResourceIndexer" destroy-resource-indexer :convention :stdcall) :void
(resource-indexer :pointer)) ; void* optional
; isize/usize(INT_PTR/SIZE_T)は x64 前提で :int64/:uint64。x86 では :int32/:uint32。use Win32::API;
my $DestroyResourceIndexer = Win32::API::More->new('MrmSupport',
'void DestroyResourceIndexer(LPVOID resourceIndexer)');
# my $ret = $DestroyResourceIndexer->Call($resourceIndexer);
# resourceIndexer : void* optional -> LPVOID
# 値渡し構造体は pack() した文字列、または Win32::API::Struct を使用。関連項目
公式の関連項目
- f CreateResourceIndexer — MRMリソースインデクサを作成する。