ホーム › NetworkManagement.NetShell › PNS_HELPER_START_FN
PNS_HELPER_START_FN
コールバックシグネチャ
DWORD PNS_HELPER_START_FN(
GUID* pguidParent,
DWORD dwVersion
);パラメーター
| フィールド | 型 | 説明 |
|---|---|---|
| pguidParent | GUID* | ヘルパー DLL の登録先となる親。 |
| dwVersion | DWORD | 親ヘルパー DLL のバージョン。 |
公式ドキュメント
NS_HELPER_START_FN コマンドは、ヘルパーの開始関数です。開始関数は、ヘルパーがコンテキストを登録するための機会を提供するもので、 RegisterContext 関数で登録されます。以下は開始関数の例です。SampleStartHelper はアプリケーション定義の関数名のプレースホルダーである点に注意してください。
戻り値
成功した場合は NO_ERROR を返します。それ以外の戻り値はエラーを示します。
解説(Remarks)
開始関数の一般的な実装は次のとおりです。
DWORD WINAPI SampleStartHelper(
CONST GUID *pguidParent,
DWORD dwVersion
)
{
DWORD dwErr;
NS_CONTEXT_ATTRIBUTES attMyAttributes;
ZeroMemory(&attMyAttributes, sizeof(attMyAttributes));
attMyAttributes.pwszContext = L"samplecontext";
attMyAttributes.guidHelper = g_SampleGuid;
attMyAttributes.dwVersion = 1;
attMyAttributes.dwFlags = 0;
attMyAttributes.ulNumTopCmds = g_ulSampleNumTopCmds;
attMyAttributes.pTopCmds = (CMD_ENTRY (*)[])&g_SampleTopCmds;
attMyAttributes.ulNumGroups = g_ulSampleCmdGroups;
attMyAttributes.pCmdGroups = (CMD_GROUP_ENTRY (*)[])&g_SampleCmdsGroups;
attMyAttributes.pfnCommitFn = SampleCommit;
attMyAttributes.pfnDumpFn = SampleDump;
attMyAttributes.pfnConnectFn = SampleConnect;
dwErr = RegisterContext( &attMyAttributes );
return dwErr;
}
出典・ライセンス: 上記「公式ドキュメント」の内容は Microsoft の Win32 API ドキュメント(MicrosoftDocs/sdk-api)を日本語に翻訳・改変したものです。© Microsoft Corporation. CC BY 4.0 で提供。
Microsoft 公式リファレンス: 英語 (en-us) · 日本語 (ja-jp) · 原文ソース (GitHub)
Microsoft 公式リファレンス: 英語 (en-us) · 日本語 (ja-jp) · 原文ソース (GitHub)