ホーム › NetworkManagement.Rras › PPP_CCP_INFO
PPP_CCP_INFO
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 | ||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| dwError | DWORD | 4 | +0 | +0 | ネゴシエーションが失敗した場合に、エラーを指定します。 | ||||||
| dwCompressionAlgorithm | DWORD | 4 | +4 | +4 | ローカルコンピューターが使用する圧縮アルゴリズムを指定します。次の表に、このメンバーに指定できる値を示します。
| ||||||
| dwOptions | DWORD | 4 | +8 | +8 | ローカルコンピューターの圧縮オプションを指定します。次のオプションがサポートされています。 | ||||||
| dwRemoteCompressionAlgorithm | DWORD | 4 | +12 | +12 | リモートコンピューターが使用する圧縮アルゴリズムを指定します。次の表に、このメンバーに指定できる値を示します。
| ||||||
| dwRemoteOptions | DWORD | 4 | +16 | +16 | リモートコンピューターの圧縮オプションを指定します。次のオプションがサポートされています。 |
公式ドキュメント
PPP_CCP_INFO 構造体には、圧縮制御プロトコル (Compression Control Protocol, CCP) のネゴシエーション結果を示す情報が格納されます。
出典・ライセンス: 上記「公式ドキュメント」の内容は 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>
// PPP_CCP_INFO (x64 20 / x86 20 バイト)
typedef struct PPP_CCP_INFO {
DWORD dwError;
DWORD dwCompressionAlgorithm;
DWORD dwOptions;
DWORD dwRemoteCompressionAlgorithm;
DWORD dwRemoteOptions;
} PPP_CCP_INFO;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct PPP_CCP_INFO
{
public uint dwError;
public uint dwCompressionAlgorithm;
public uint dwOptions;
public uint dwRemoteCompressionAlgorithm;
public uint dwRemoteOptions;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure PPP_CCP_INFO
Public dwError As UInteger
Public dwCompressionAlgorithm As UInteger
Public dwOptions As UInteger
Public dwRemoteCompressionAlgorithm As UInteger
Public dwRemoteOptions As UInteger
End Structureimport ctypes
from ctypes import wintypes
class PPP_CCP_INFO(ctypes.Structure):
_fields_ = [
("dwError", wintypes.DWORD),
("dwCompressionAlgorithm", wintypes.DWORD),
("dwOptions", wintypes.DWORD),
("dwRemoteCompressionAlgorithm", wintypes.DWORD),
("dwRemoteOptions", wintypes.DWORD),
]#[repr(C)]
pub struct PPP_CCP_INFO {
pub dwError: u32,
pub dwCompressionAlgorithm: u32,
pub dwOptions: u32,
pub dwRemoteCompressionAlgorithm: u32,
pub dwRemoteOptions: u32,
}import "golang.org/x/sys/windows"
type PPP_CCP_INFO struct {
dwError uint32
dwCompressionAlgorithm uint32
dwOptions uint32
dwRemoteCompressionAlgorithm uint32
dwRemoteOptions uint32
}type
PPP_CCP_INFO = record
dwError: DWORD;
dwCompressionAlgorithm: DWORD;
dwOptions: DWORD;
dwRemoteCompressionAlgorithm: DWORD;
dwRemoteOptions: DWORD;
end;const PPP_CCP_INFO = extern struct {
dwError: u32,
dwCompressionAlgorithm: u32,
dwOptions: u32,
dwRemoteCompressionAlgorithm: u32,
dwRemoteOptions: u32,
};type
PPP_CCP_INFO {.bycopy.} = object
dwError: uint32
dwCompressionAlgorithm: uint32
dwOptions: uint32
dwRemoteCompressionAlgorithm: uint32
dwRemoteOptions: uint32struct PPP_CCP_INFO
{
uint dwError;
uint dwCompressionAlgorithm;
uint dwOptions;
uint dwRemoteCompressionAlgorithm;
uint dwRemoteOptions;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; PPP_CCP_INFO サイズ: 20 バイト(x64)
dim st, 5 ; 4byte整数×5(構造体サイズ 20 / 4 切り上げ)
; dwError : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; dwCompressionAlgorithm : DWORD (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; dwOptions : DWORD (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; dwRemoteCompressionAlgorithm : DWORD (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; dwRemoteOptions : DWORD (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global PPP_CCP_INFO
#field int dwError
#field int dwCompressionAlgorithm
#field int dwOptions
#field int dwRemoteCompressionAlgorithm
#field int dwRemoteOptions
#endstruct
stdim st, PPP_CCP_INFO ; NSTRUCT 変数を確保
st->dwError = 100
mes "dwError=" + st->dwError