!lpc

重要 Lpc は alpc でエミュレートされるようになりました。代わりに !alpc 拡張コマンドを使用してください。

!lpc 拡張コマンドは、ターゲット システム内のすべてのローカル プロシージャ コール (LPC) ポートとメッセージに関する情報を表示します。

!lpc message MessageID 
!lpc port Port 
!lpc scan Port 
!lpc thread Thread 
!lpc PoolSearch 
!lpc

パラメーター

message
(Windows Server 2003、Windows XP、および Windows 2000 のみ) キュー内のメッセージを含むサーバー ポートや、このメッセージを待っているスレッド (存在する場合) など、メッセージに関する情報を表示します。

MessageID
(Windows Server 2003、Windows XP、Windows 2000のみ) 表示するメッセージのメッセージ ID を指定します。 このパラメーターの値が 0 であるか、このパラメーターが省略されている場合、!lpc message コマンドはメッセージの概要リストを表示します。 (Windows 2000 Service Pack 1 (SP1) では、概要には LPC ゾーン内のすべてのメッセージが含まれます。 Service Pack 2 (SP2) を適用した Windows 2000、Windows XP、およびそれ以降のバージョンの Windows では、概要にはカーネル プール内のすべてのメッセージが含まれます。 ページアウトされたメッセージは含まれません。)

port
(Windows Server 2003、Windows XP、および Windows 2000 のみ) ポートの名前、セマフォの状態、キュー内のメッセージ、ランダウン キュー内のスレッド、そのハンドル数、その参照、関連ポートなどのポート情報を表示します。

scan
(Windows Server 2003、Windows XP、および Windows 2000 のみ) 指定したポートおよびそれに接続されているすべてのポートに関する概要情報を表示します。

ポート
(Windows Server 2003、Windows XP、および Windows 2000 のみ) 表示するポートのアドレスを 16 進数で指定します。 !lpc port コマンドが使用され、Port が 0 か省略されていると、すべての LPC ポートの概要リストが表示されます。 !lpc scan コマンドが使用されている場合、Port は、実際のポートのアドレスを指定する必要があります。

スレッド
(Windows Server 2003、Windows XP、および Windows 2000 のみ) ランダウン ポート キューに指定されたスレッドを含むすべてのポートのポート情報を表示します。

Thread
(Windows Server 2003、Windows XP、および Windows 2000 のみ) スレッドの 16 進アドレスを指定します。 これが 0 または省略されている場合、!lpc thread コマンドは、LPC 操作を実行しているすべてのスレッドの概要リストを表示します。

PoolSearch
(Windows Server 2003 および Windows XP のみ) !lpc message コマンドはカーネル プール内のメッセージを検索します。 !lpc PoolSearch を使用するたびに、この設定はオンとオフを切り替えます (初期設定ではカーネル プールを検索しません)。 これは、MessageID としてゼロ以外の値を指定する !lpc message コマンドに影響を与えます。

DLL

Kdexts.dll

追加情報

LPC の詳細については、Windows Driver Kit (WDK) のドキュメントと、Mark Russinovich および David Solomon 著の『Microsoft Windows Internals』を参照してください。

備考

この拡張コマンドは、Windows Vista 以降のバージョンの Windows ではサポートされていません。

Windows Server 2003、Windows XP、および Windows 2000 では、!lpc に引数を指定しないと、デバッガー コマンド ウィンドウにこの拡張コマンドのヘルプが表示されます。

メッセージへの返信を待っているとマークされているスレッドがある場合は、遅延メッセージの ID を指定した !lpc message コマンドを使用します。 このコマンドは、指定されたメッセージ、それを含むポート、および関連するすべてのスレッドを表示します。

メッセージが見つからず、読み取りエラー (「ゾーン セグメントにアクセスできません」など) がなかった場合は、サーバーがメッセージを受け取っています。

この場合、サーバー ポートは通常、!lpc thread コマンドを使用して見つけることができます。 返信を待っているスレッドは、サーバー通信キューにリンクされます。 このコマンドは、指定されたスレッドを含んでいるすべてのポートを表示します。 ポート アドレスがわかったら、!lpc port コマンドを使用します。 各スレッドに関するより具体的な情報は、各スレッドのアドレスを指定した !lpc threadコマンドを使用することによって取得できます。

Windows XP システムからのこの拡張コマンドからの出力の例をいくつか示します。

この例では、すべての LPC ポートが表示されます。

kd> !lpc port
Scanning 225 objects
       1  Port: 0xe1405650 Connection: 0xe1405650  Communication: 0x00000000  'SeRmCommandPort' 
       1  Port: 0xe141ef50 Connection: 0xe141ef50  Communication: 0x00000000  'SmApiPort' 
       1  Port: 0xe13c5740 Connection: 0xe13c5740  Communication: 0x00000000  'ApiPort' 
       1  Port: 0xe13d9550 Connection: 0xe13d9550  Communication: 0x00000000  'SbApiPort' 
       3  Port: 0xe13d8830 Connection: 0xe141ef50  Communication: 0xe13d8910  ' 
80000004  Port: 0xe13d8910 Connection: 0xe141ef50  Communication: 0xe13d8830  ' 
       3  Port: 0xe13d8750 Connection: 0xe13d9550  Communication: 0xe13a4030  ' 
       .....

前の例では、アドレス e14ae238 のポートにはメッセージがありません。つまり、すべてのメッセージが取得され、新しいメッセージは到着していません。

kd> !lpc port e14ae238

Server connection port e14ae238  Name: ApiPort
 Handles: 1   References: 107
    Server process  : 84aa0140 (csrss.exe)
    Queue semaphore : 84a96da8
 Semaphore state 0 (0x0)
    The message queue is empty
    The LpcDataInfoChainHead queue is empty

前の例では、ポート 0xe14ae238 には、キューに入れられているものの、まだサーバーによって取得されていないメッセージがあります。

kd> !lpc port 0xe14ae238

Server connection port e14ae238  Name: ApiPort
 Handles: 1   References: 108
    Server process  : 84aa0140 (csrss.exe)
    Queue semaphore : 84a96da8
 Semaphore state 0 (0x0)
        Messages in queue:
 0000 e20d9b80 - Busy  Id=0002249c  From: 0584.0680  Context=00000021  [e14ae248 . e14ae248]
 Length=0098007c  Type=00000001 (LPC_REQUEST)
                   Data: 00000000 0002021e 00000584 00000680 002f0001 00000007
    The message queue contains 1 messages
    The LpcDataInfoChainHead queue is empty

残りの Windows XP の例は、この拡張コマンドで使用できる他のオプションに関するものです。

kd> !lpc message 222be
Searching message 222be in threads ...
Client thread 842a4db0 waiting a reply from 222be
Searching thread 842a4db0 in port rundown queues ...

Server communication port 0xe114a3c0
    Handles: 1   References: 1
    The LpcDataInfoChainHead queue is empty
        Connected port: 0xe1e7b948      Server connection port: 0xe14ae238

Client communication port 0xe1e7b948
    Handles: 1   References: 3
    The LpcDataInfoChainHead queue is empty

Server connection port e14ae238  Name: ApiPort
 Handles: 1   References: 107
    Server process  : 84aa0140 (csrss.exe)
    Queue semaphore : 84a96da8
 Semaphore state 0 (0x0)
    The message queue is empty
    The LpcDataInfoChainHead queue is empty
Done.
kd> !lpc thread 842a4db0
Searching thread 842a4db0 in port rundown queues ...

Server communication port 0xe114a3c0
    Handles: 1   References: 1
    The LpcDataInfoChainHead queue is empty
        Connected port: 0xe1e7b948      Server connection port: 0xe14ae238

Client communication port 0xe1e7b948
    Handles: 1   References: 3
    The LpcDataInfoChainHead queue is empty

Server connection port e14ae238  Name: ApiPort
 Handles: 1   References: 107
    Server process  : 84aa0140 (csrss.exe)
    Queue semaphore : 84a96da8
 Semaphore state 0 (0x0)
    The message queue is empty
    The LpcDataInfoChainHead queue is empty
kd> !lpc scan e13d8830
Scanning 225 objects
       3  Port: 0xe13d8830 Connection: 0xe141ef50  Communication: 0xe13d8910  ' 
80000004  Port: 0xe13d8910 Connection: 0xe141ef50  Communication: 0xe13d8830  ' 
Scanning 3 objects