ホーム › System.EventCollector › EcSaveSubscription
EcSaveSubscription
関数サブスクリプションの変更を保存する。
シグネチャ
// WecApi.dll
#include <windows.h>
BOOL EcSaveSubscription(
INT_PTR Subscription,
DWORD Flags
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| Subscription | INT_PTR | in |
| Flags | DWORD | in |
戻り値の型: BOOL
各言語での呼び出し定義
// WecApi.dll
#include <windows.h>
BOOL EcSaveSubscription(
INT_PTR Subscription,
DWORD Flags
);[return: MarshalAs(UnmanagedType.Bool)]
[DllImport("WecApi.dll", ExactSpelling = true)]
static extern bool EcSaveSubscription(
IntPtr Subscription, // INT_PTR
uint Flags // DWORD
);<DllImport("WecApi.dll", ExactSpelling:=True)>
Public Shared Function EcSaveSubscription(
Subscription As IntPtr, ' INT_PTR
Flags As UInteger ' DWORD
) As Boolean
End Function' Subscription : INT_PTR
' Flags : DWORD
Declare PtrSafe Function EcSaveSubscription Lib "wecapi" ( _
ByVal Subscription As LongPtr, _
ByVal Flags As Long) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
EcSaveSubscription = ctypes.windll.wecapi.EcSaveSubscription
EcSaveSubscription.restype = wintypes.BOOL
EcSaveSubscription.argtypes = [
ctypes.c_ssize_t, # Subscription : INT_PTR
wintypes.DWORD, # Flags : DWORD
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('WecApi.dll')
EcSaveSubscription = Fiddle::Function.new(
lib['EcSaveSubscription'],
[
Fiddle::TYPE_INTPTR_T, # Subscription : INT_PTR
-Fiddle::TYPE_INT, # Flags : DWORD
],
Fiddle::TYPE_INT)#[link(name = "wecapi")]
extern "system" {
fn EcSaveSubscription(
Subscription: isize, // INT_PTR
Flags: u32 // DWORD
) -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[return: MarshalAs(UnmanagedType.Bool)]
[DllImport("WecApi.dll")]
public static extern bool EcSaveSubscription(IntPtr Subscription, uint Flags);
"@
$api = Add-Type -MemberDefinition $sig -Name 'WecApi_EcSaveSubscription' -Namespace Win32 -PassThru
# $api::EcSaveSubscription(Subscription, Flags)#uselib "WecApi.dll"
#func global EcSaveSubscription "EcSaveSubscription" sptr, sptr
; EcSaveSubscription Subscription, Flags ; 戻り値は stat
; Subscription : INT_PTR -> "sptr"
; Flags : DWORD -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。#uselib "WecApi.dll"
#cfunc global EcSaveSubscription "EcSaveSubscription" sptr, int
; res = EcSaveSubscription(Subscription, Flags)
; Subscription : INT_PTR -> "sptr"
; Flags : DWORD -> "int"; BOOL EcSaveSubscription(INT_PTR Subscription, DWORD Flags)
#uselib "WecApi.dll"
#cfunc global EcSaveSubscription "EcSaveSubscription" intptr, int
; res = EcSaveSubscription(Subscription, Flags)
; Subscription : INT_PTR -> "intptr"
; Flags : DWORD -> "int"import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
wecapi = windows.NewLazySystemDLL("WecApi.dll")
procEcSaveSubscription = wecapi.NewProc("EcSaveSubscription")
)
// Subscription (INT_PTR), Flags (DWORD)
r1, _, err := procEcSaveSubscription.Call(
uintptr(Subscription),
uintptr(Flags),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // BOOLfunction EcSaveSubscription(
Subscription: NativeInt; // INT_PTR
Flags: DWORD // DWORD
): BOOL; stdcall;
external 'WecApi.dll' name 'EcSaveSubscription';result := DllCall("WecApi\EcSaveSubscription"
, "Ptr", Subscription ; INT_PTR
, "UInt", Flags ; DWORD
, "Int") ; return: BOOL●EcSaveSubscription(Subscription, Flags) = DLL("WecApi.dll", "bool EcSaveSubscription(int, dword)")
# 呼び出し: EcSaveSubscription(Subscription, Flags)
# Subscription : INT_PTR -> "int"
# Flags : DWORD -> "dword"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。