ホーム › Networking.ActiveDirectory › DSCOLUMN
DSCOLUMN
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| dwFlags | DWORD | 4 | +0 | +0 | 予約済みです。 |
| fmt | INT | 4 | +4 | +4 | 列の表示方法を示す、リスト ビュー列の書式設定値のいずれかを格納します。指定可能な値は、LVCOLUMN 構造体の fmt メンバーに対して定義されています。 |
| cx | INT | 4 | +8 | +8 | 列の幅をピクセル単位で格納します。 |
| idsName | INT | 4 | +12 | +12 | 列ヘッダー文字列の文字列テーブル識別子を格納します。この文字列を取得するには、DSQUERYPARAMS 構造体の hInstance メンバーと、文字列識別子としてこのメンバーを指定して LoadString を呼び出します。 |
| offsetProperty | INT | 4 | +16 | +16 | 列に表示される属性の名前を示します。次の値のいずれかを指定できます。 DSCOLUMNPROP_ADSPATH列にはオブジェクトの ADsPath の値が表示されます。 DSCOLUMNPROP_OBJECTCLASS列にはオブジェクトの objectClass の値が表示されます。 このメンバーがこれらの値のいずれでもない場合、このメンバーには、DSQUERYPARAMS 構造体のアドレスから、この列に表示される属性値の名前を格納する null 終端の Unicode 文字列までのオフセットが、バイト単位で格納されます。 |
| dwReserved | DWORD | 4 | +20 | +20 | 予約済みです。 |
公式ドキュメント
DSCOLUMN 構造体は、ディレクトリ サービス クエリ ダイアログ ボックスの列を表します。この構造体の配列は、DSQUERYPARAMS 構造体に格納されます。
出典・ライセンス: 上記「公式ドキュメント」の内容は Microsoft の Win32 API ドキュメント(MicrosoftDocs/sdk-api)を日本語に翻訳・改変したものです。© Microsoft Corporation. CC BY 4.0 で提供。
Microsoft 公式リファレンス: 英語 (en-us) · 日本語 (ja-jp) · 原文ソース (GitHub)
Microsoft 公式リファレンス: 英語 (en-us) · 日本語 (ja-jp) · 原文ソース (GitHub)
各言語での定義
#include <windows.h>
// DSCOLUMN (x64 24 / x86 24 バイト)
typedef struct DSCOLUMN {
DWORD dwFlags;
INT fmt;
INT cx;
INT idsName;
INT offsetProperty;
DWORD dwReserved;
} DSCOLUMN;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct DSCOLUMN
{
public uint dwFlags;
public int fmt;
public int cx;
public int idsName;
public int offsetProperty;
public uint dwReserved;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure DSCOLUMN
Public dwFlags As UInteger
Public fmt As Integer
Public cx As Integer
Public idsName As Integer
Public offsetProperty As Integer
Public dwReserved As UInteger
End Structureimport ctypes
from ctypes import wintypes
class DSCOLUMN(ctypes.Structure):
_fields_ = [
("dwFlags", wintypes.DWORD),
("fmt", ctypes.c_int),
("cx", ctypes.c_int),
("idsName", ctypes.c_int),
("offsetProperty", ctypes.c_int),
("dwReserved", wintypes.DWORD),
]#[repr(C)]
pub struct DSCOLUMN {
pub dwFlags: u32,
pub fmt: i32,
pub cx: i32,
pub idsName: i32,
pub offsetProperty: i32,
pub dwReserved: u32,
}import "golang.org/x/sys/windows"
type DSCOLUMN struct {
dwFlags uint32
fmt int32
cx int32
idsName int32
offsetProperty int32
dwReserved uint32
}type
DSCOLUMN = record
dwFlags: DWORD;
fmt: Integer;
cx: Integer;
idsName: Integer;
offsetProperty: Integer;
dwReserved: DWORD;
end;const DSCOLUMN = extern struct {
dwFlags: u32,
fmt: i32,
cx: i32,
idsName: i32,
offsetProperty: i32,
dwReserved: u32,
};type
DSCOLUMN {.bycopy.} = object
dwFlags: uint32
fmt: int32
cx: int32
idsName: int32
offsetProperty: int32
dwReserved: uint32struct DSCOLUMN
{
uint dwFlags;
int fmt;
int cx;
int idsName;
int offsetProperty;
uint dwReserved;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; DSCOLUMN サイズ: 24 バイト(x64)
dim st, 6 ; 4byte整数×6(構造体サイズ 24 / 4 切り上げ)
; dwFlags : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; fmt : INT (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; cx : INT (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; idsName : INT (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; offsetProperty : INT (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; dwReserved : DWORD (+20, 4byte) st.5 = 値 / 値 = st.5 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global DSCOLUMN
#field int dwFlags
#field int fmt
#field int cx
#field int idsName
#field int offsetProperty
#field int dwReserved
#endstruct
stdim st, DSCOLUMN ; NSTRUCT 変数を確保
st->dwFlags = 100
mes "dwFlags=" + st->dwFlags