ホーム › UI.WindowsAndMessaging › MrmIndexFileAutoQualifiers
MrmIndexFileAutoQualifiers
関数修飾子を自動判定してファイルをインデックス化する。
シグネチャ
// MrmSupport.dll
#include <windows.h>
HRESULT MrmIndexFileAutoQualifiers(
MrmResourceIndexerHandle indexer,
LPCWSTR filePath // optional
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| indexer | MrmResourceIndexerHandle | in |
| filePath | LPCWSTR | inoptional |
戻り値の型: HRESULT
各言語での呼び出し定義
// MrmSupport.dll
#include <windows.h>
HRESULT MrmIndexFileAutoQualifiers(
MrmResourceIndexerHandle indexer,
LPCWSTR filePath // optional
);[DllImport("MrmSupport.dll", ExactSpelling = true)]
static extern int MrmIndexFileAutoQualifiers(
MrmResourceIndexerHandle indexer, // MrmResourceIndexerHandle
[MarshalAs(UnmanagedType.LPWStr)] string filePath // LPCWSTR optional
);<DllImport("MrmSupport.dll", ExactSpelling:=True)>
Public Shared Function MrmIndexFileAutoQualifiers(
indexer As MrmResourceIndexerHandle, ' MrmResourceIndexerHandle
<MarshalAs(UnmanagedType.LPWStr)> filePath As String ' LPCWSTR optional
) As Integer
End Function' indexer : MrmResourceIndexerHandle
' filePath : LPCWSTR optional
Declare PtrSafe Function MrmIndexFileAutoQualifiers Lib "mrmsupport" ( _
ByVal indexer As LongPtr, _
ByVal filePath As LongPtr) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
MrmIndexFileAutoQualifiers = ctypes.windll.mrmsupport.MrmIndexFileAutoQualifiers
MrmIndexFileAutoQualifiers.restype = ctypes.c_int
MrmIndexFileAutoQualifiers.argtypes = [
MrmResourceIndexerHandle, # indexer : MrmResourceIndexerHandle
wintypes.LPCWSTR, # filePath : LPCWSTR optional
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('MrmSupport.dll')
MrmIndexFileAutoQualifiers = Fiddle::Function.new(
lib['MrmIndexFileAutoQualifiers'],
[
Fiddle::TYPE_VOIDP, # indexer : MrmResourceIndexerHandle
Fiddle::TYPE_VOIDP, # filePath : LPCWSTR optional
],
Fiddle::TYPE_INT)#[link(name = "mrmsupport")]
extern "system" {
fn MrmIndexFileAutoQualifiers(
indexer: MrmResourceIndexerHandle, // MrmResourceIndexerHandle
filePath: *const u16 // LPCWSTR optional
) -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("MrmSupport.dll")]
public static extern int MrmIndexFileAutoQualifiers(MrmResourceIndexerHandle indexer, [MarshalAs(UnmanagedType.LPWStr)] string filePath);
"@
$api = Add-Type -MemberDefinition $sig -Name 'MrmSupport_MrmIndexFileAutoQualifiers' -Namespace Win32 -PassThru
# $api::MrmIndexFileAutoQualifiers(indexer, filePath)#uselib "MrmSupport.dll"
#func global MrmIndexFileAutoQualifiers "MrmIndexFileAutoQualifiers" sptr, sptr
; MrmIndexFileAutoQualifiers indexer, filePath ; 戻り値は stat
; indexer : MrmResourceIndexerHandle -> "sptr"
; filePath : LPCWSTR optional -> "sptr"
; ※値渡し構造体は直接渡せません。intにパック、または var で構造体変数を渡してください。
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。#uselib "MrmSupport.dll"
#cfunc global MrmIndexFileAutoQualifiers "MrmIndexFileAutoQualifiers" int, wstr
; res = MrmIndexFileAutoQualifiers(indexer, filePath)
; indexer : MrmResourceIndexerHandle -> "int"
; filePath : LPCWSTR optional -> "wstr"
; ※値渡し構造体は直接渡せません。intにパック、または var で構造体変数を渡してください。; HRESULT MrmIndexFileAutoQualifiers(MrmResourceIndexerHandle indexer, LPCWSTR filePath)
#uselib "MrmSupport.dll"
#cfunc global MrmIndexFileAutoQualifiers "MrmIndexFileAutoQualifiers" int, wstr
; res = MrmIndexFileAutoQualifiers(indexer, filePath)
; indexer : MrmResourceIndexerHandle -> "int"
; filePath : LPCWSTR optional -> "wstr"
; ※値渡し構造体は直接渡せません。intにパック、または var で構造体変数を渡してください。import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
mrmsupport = windows.NewLazySystemDLL("MrmSupport.dll")
procMrmIndexFileAutoQualifiers = mrmsupport.NewProc("MrmIndexFileAutoQualifiers")
)
// indexer (MrmResourceIndexerHandle), filePath (LPCWSTR optional)
r1, _, err := procMrmIndexFileAutoQualifiers.Call(
uintptr(indexer),
uintptr(unsafe.Pointer(windows.StringToUTF16Ptr(filePath))),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // HRESULTfunction MrmIndexFileAutoQualifiers(
indexer: MrmResourceIndexerHandle; // MrmResourceIndexerHandle
filePath: PWideChar // LPCWSTR optional
): Integer; stdcall;
external 'MrmSupport.dll' name 'MrmIndexFileAutoQualifiers';result := DllCall("MrmSupport\MrmIndexFileAutoQualifiers"
, "Ptr", indexer ; MrmResourceIndexerHandle
, "WStr", filePath ; LPCWSTR optional
, "Int") ; return: HRESULT●MrmIndexFileAutoQualifiers(indexer, filePath) = DLL("MrmSupport.dll", "int MrmIndexFileAutoQualifiers(void*, char*)")
# 呼び出し: MrmIndexFileAutoQualifiers(indexer, filePath)
# indexer : MrmResourceIndexerHandle -> "void*"
# filePath : LPCWSTR optional -> "char*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。