Win32 API 日本語リファレンス
ホームData.HtmlHelp › ROWSTATUS

ROWSTATUS

構造体
サイズx64: 16 バイト / x86: 16 バイト

サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。

フィールド

フィールドサイズx64x86説明
lRowFirstINT4+0+0取得対象範囲の先頭行のインデックス。
cRowsINT4+4+4今回取得した行数。
cPropertiesINT4+8+8各行に含まれるプロパティの数。
cRowsTotalINT4+12+12全体の総行数。

各言語での定義

#include <windows.h>

// ROWSTATUS  (x64 16 / x86 16 バイト)
typedef struct ROWSTATUS {
    INT lRowFirst;
    INT cRows;
    INT cProperties;
    INT cRowsTotal;
} ROWSTATUS;
using System;
using System.Runtime.InteropServices;

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct ROWSTATUS
{
    public int lRowFirst;
    public int cRows;
    public int cProperties;
    public int cRowsTotal;
}
Imports System.Runtime.InteropServices

<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure ROWSTATUS
    Public lRowFirst As Integer
    Public cRows As Integer
    Public cProperties As Integer
    Public cRowsTotal As Integer
End Structure
import ctypes
from ctypes import wintypes

class ROWSTATUS(ctypes.Structure):
    _fields_ = [
        ("lRowFirst", ctypes.c_int),
        ("cRows", ctypes.c_int),
        ("cProperties", ctypes.c_int),
        ("cRowsTotal", ctypes.c_int),
    ]
#[repr(C)]
pub struct ROWSTATUS {
    pub lRowFirst: i32,
    pub cRows: i32,
    pub cProperties: i32,
    pub cRowsTotal: i32,
}
import "golang.org/x/sys/windows"

type ROWSTATUS struct {
	lRowFirst int32
	cRows int32
	cProperties int32
	cRowsTotal int32
}
type
  ROWSTATUS = record
    lRowFirst: Integer;
    cRows: Integer;
    cProperties: Integer;
    cRowsTotal: Integer;
  end;
const ROWSTATUS = extern struct {
    lRowFirst: i32,
    cRows: i32,
    cProperties: i32,
    cRowsTotal: i32,
};
type
  ROWSTATUS {.bycopy.} = object
    lRowFirst: int32
    cRows: int32
    cProperties: int32
    cRowsTotal: int32
struct ROWSTATUS
{
    int lRowFirst;
    int cRows;
    int cProperties;
    int cRowsTotal;
}

HSP用 定義

HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。

; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; ROWSTATUS サイズ: 16 バイト(x64)
dim st, 4    ; 4byte整数×4(構造体サイズ 16 / 4 切り上げ)
; lRowFirst : INT (+0, 4byte)  st.0 = 値  /  値 = st.0   (lpoke/lpeek も可)
; cRows : INT (+4, 4byte)  st.1 = 値  /  値 = st.1   (lpoke/lpeek も可)
; cProperties : INT (+8, 4byte)  st.2 = 値  /  値 = st.2   (lpoke/lpeek も可)
; cRowsTotal : INT (+12, 4byte)  st.3 = 値  /  値 = st.3   (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。
; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global ROWSTATUS
    #field int lRowFirst
    #field int cRows
    #field int cProperties
    #field int cRowsTotal
#endstruct

stdim st, ROWSTATUS        ; NSTRUCT 変数を確保
st->lRowFirst = 100
mes "lRowFirst=" + st->lRowFirst