ホーム › NetworkManagement.NetManagement › TIME_OF_DAY_INFO
TIME_OF_DAY_INFO
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| tod_elapsedt | DWORD | 4 | +0 | +0 | GMT の 1970 年 1 月 1 日 00:00:00 からの経過秒数です。 |
| tod_msecs | DWORD | 4 | +4 | +4 | 任意の開始時点 (システムのリセット) からのミリ秒数です。 通常、このメンバーは処理の開始時と終了時の 2 回読み取ります。処理の開始から終了までの経過時間を求めるには、2 回目の値から 1 回目の値を減算します。 |
| tod_hours | DWORD | 4 | +8 | +8 | 現在の時 (hour) です。有効な値は 0 から 23 です。 |
| tod_mins | DWORD | 4 | +12 | +12 | 現在の分です。有効な値は 0 から 59 です。 |
| tod_secs | DWORD | 4 | +16 | +16 | 現在の秒です。有効な値は 0 から 59 です。 |
| tod_hunds | DWORD | 4 | +20 | +20 | 現在の 1/100 秒 (0.01 秒) です。有効な値は 0 から 99 です。 |
| tod_timezone | INT | 4 | +24 | +24 | サーバーのタイムゾーンです。この値はグリニッジ標準時 (GMT) からの差を分単位で表します。グリニッジより西のタイムゾーンでは正の値、東のタイムゾーンでは負の値になります。値が –1 の場合は、タイムゾーンが未定義であることを示します。 |
| tod_tinterval | DWORD | 4 | +28 | +28 | クロックの 1 ティックあたりの時間間隔です。整数値 1 につき 1/10000 秒 (0.0001 秒) を表します。 |
| tod_day | DWORD | 4 | +32 | +32 | 月の日です。有効な値は 1 から 31 です。 |
| tod_month | DWORD | 4 | +36 | +36 | 年の月です。有効な値は 1 から 12 です。 |
| tod_year | DWORD | 4 | +40 | +40 | 年です。 |
| tod_weekday | DWORD | 4 | +44 | +44 | 曜日です。有効な値は 0 から 6 で、0 が日曜日、1 が月曜日、以下同様です。 |
公式ドキュメント
<b>TIME_OF_DAY_INFO</b> 構造体には、リモートサーバーの時刻に関する情報が格納されます。
出典・ライセンス: 上記「公式ドキュメント」の内容は 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>
// TIME_OF_DAY_INFO (x64 48 / x86 48 バイト)
typedef struct TIME_OF_DAY_INFO {
DWORD tod_elapsedt;
DWORD tod_msecs;
DWORD tod_hours;
DWORD tod_mins;
DWORD tod_secs;
DWORD tod_hunds;
INT tod_timezone;
DWORD tod_tinterval;
DWORD tod_day;
DWORD tod_month;
DWORD tod_year;
DWORD tod_weekday;
} TIME_OF_DAY_INFO;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct TIME_OF_DAY_INFO
{
public uint tod_elapsedt;
public uint tod_msecs;
public uint tod_hours;
public uint tod_mins;
public uint tod_secs;
public uint tod_hunds;
public int tod_timezone;
public uint tod_tinterval;
public uint tod_day;
public uint tod_month;
public uint tod_year;
public uint tod_weekday;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure TIME_OF_DAY_INFO
Public tod_elapsedt As UInteger
Public tod_msecs As UInteger
Public tod_hours As UInteger
Public tod_mins As UInteger
Public tod_secs As UInteger
Public tod_hunds As UInteger
Public tod_timezone As Integer
Public tod_tinterval As UInteger
Public tod_day As UInteger
Public tod_month As UInteger
Public tod_year As UInteger
Public tod_weekday As UInteger
End Structureimport ctypes
from ctypes import wintypes
class TIME_OF_DAY_INFO(ctypes.Structure):
_fields_ = [
("tod_elapsedt", wintypes.DWORD),
("tod_msecs", wintypes.DWORD),
("tod_hours", wintypes.DWORD),
("tod_mins", wintypes.DWORD),
("tod_secs", wintypes.DWORD),
("tod_hunds", wintypes.DWORD),
("tod_timezone", ctypes.c_int),
("tod_tinterval", wintypes.DWORD),
("tod_day", wintypes.DWORD),
("tod_month", wintypes.DWORD),
("tod_year", wintypes.DWORD),
("tod_weekday", wintypes.DWORD),
]#[repr(C)]
pub struct TIME_OF_DAY_INFO {
pub tod_elapsedt: u32,
pub tod_msecs: u32,
pub tod_hours: u32,
pub tod_mins: u32,
pub tod_secs: u32,
pub tod_hunds: u32,
pub tod_timezone: i32,
pub tod_tinterval: u32,
pub tod_day: u32,
pub tod_month: u32,
pub tod_year: u32,
pub tod_weekday: u32,
}import "golang.org/x/sys/windows"
type TIME_OF_DAY_INFO struct {
tod_elapsedt uint32
tod_msecs uint32
tod_hours uint32
tod_mins uint32
tod_secs uint32
tod_hunds uint32
tod_timezone int32
tod_tinterval uint32
tod_day uint32
tod_month uint32
tod_year uint32
tod_weekday uint32
}type
TIME_OF_DAY_INFO = record
tod_elapsedt: DWORD;
tod_msecs: DWORD;
tod_hours: DWORD;
tod_mins: DWORD;
tod_secs: DWORD;
tod_hunds: DWORD;
tod_timezone: Integer;
tod_tinterval: DWORD;
tod_day: DWORD;
tod_month: DWORD;
tod_year: DWORD;
tod_weekday: DWORD;
end;const TIME_OF_DAY_INFO = extern struct {
tod_elapsedt: u32,
tod_msecs: u32,
tod_hours: u32,
tod_mins: u32,
tod_secs: u32,
tod_hunds: u32,
tod_timezone: i32,
tod_tinterval: u32,
tod_day: u32,
tod_month: u32,
tod_year: u32,
tod_weekday: u32,
};type
TIME_OF_DAY_INFO {.bycopy.} = object
tod_elapsedt: uint32
tod_msecs: uint32
tod_hours: uint32
tod_mins: uint32
tod_secs: uint32
tod_hunds: uint32
tod_timezone: int32
tod_tinterval: uint32
tod_day: uint32
tod_month: uint32
tod_year: uint32
tod_weekday: uint32struct TIME_OF_DAY_INFO
{
uint tod_elapsedt;
uint tod_msecs;
uint tod_hours;
uint tod_mins;
uint tod_secs;
uint tod_hunds;
int tod_timezone;
uint tod_tinterval;
uint tod_day;
uint tod_month;
uint tod_year;
uint tod_weekday;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; TIME_OF_DAY_INFO サイズ: 48 バイト(x64)
dim st, 12 ; 4byte整数×12(構造体サイズ 48 / 4 切り上げ)
; tod_elapsedt : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; tod_msecs : DWORD (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; tod_hours : DWORD (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; tod_mins : DWORD (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; tod_secs : DWORD (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; tod_hunds : DWORD (+20, 4byte) st.5 = 値 / 値 = st.5 (lpoke/lpeek も可)
; tod_timezone : INT (+24, 4byte) st.6 = 値 / 値 = st.6 (lpoke/lpeek も可)
; tod_tinterval : DWORD (+28, 4byte) st.7 = 値 / 値 = st.7 (lpoke/lpeek も可)
; tod_day : DWORD (+32, 4byte) st.8 = 値 / 値 = st.8 (lpoke/lpeek も可)
; tod_month : DWORD (+36, 4byte) st.9 = 値 / 値 = st.9 (lpoke/lpeek も可)
; tod_year : DWORD (+40, 4byte) st.10 = 値 / 値 = st.10 (lpoke/lpeek も可)
; tod_weekday : DWORD (+44, 4byte) st.11 = 値 / 値 = st.11 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global TIME_OF_DAY_INFO
#field int tod_elapsedt
#field int tod_msecs
#field int tod_hours
#field int tod_mins
#field int tod_secs
#field int tod_hunds
#field int tod_timezone
#field int tod_tinterval
#field int tod_day
#field int tod_month
#field int tod_year
#field int tod_weekday
#endstruct
stdim st, TIME_OF_DAY_INFO ; NSTRUCT 変数を確保
st->tod_elapsedt = 100
mes "tod_elapsedt=" + st->tod_elapsedt