私はrdp仮想チャネルアプリケーションを開発しています。私はレジストリ内のクライアント側dllを登録して、クライアントdllがロードされていることを理解しようとしています。 pVirtualChannelInit
をpEntryPoints
に電話したときに固まってしまいました。 これは結果を返さないだけで、デバッガはこの関数の逆アセンブルされたコードに行きます。しかし、この呼び出しで停止しない場合は、VirtualChannelEntry
が2度目(なぜ?)呼び出されました。VirtualChannelInit stucks
デバッガをmstsc.exeに使用する場合。 最初の呼び出し後しばらくすると、コンソールに私はこれを見ることができます: First-chance exception at 0x00000004 in mstsc.exe: 0xC0000005: an access violation in the performance at 0x00000004.
//グーグル で2回目の呼び出しの後に翻訳されたRDPセッションが画面に表示されているとき:pEntryPointsで
First-chance exception at 0x773EC42D (KernelBase.dll) in mstsc.exe: 0x000006BA: RPC server is unavailable.
First-chance exception at 0x773EC42D (KernelBase.dll) in mstsc.exe: 0x000006BA: RPC server is unavailable.
First-chance exception at 0x773EC42D (KernelBase.dll) in mstsc.exe: 0x000006BA: RPC server is unavailable.
First-chance exception at 0x773EC42D in mstsc.exe: Microsoft C++ exception: unsigned long at memory location 0x06CCF8C0.
First-chance exception at 0x773EC42D in mstsc.exe: Microsoft C++ exception: unsigned long at memory location 0x06CCF8C0.
First-chance exception at 0x773EC42D in mstsc.exe: Microsoft C++ exception: [rethrow] at memory location 0x00000000.
First-chance exception at 0x773EC42D in mstsc.exe: Microsoft C++ exception: [rethrow] at memory location 0x00000000.
First-chance exception at 0x773EC42D in mstsc.exe: Microsoft C++ exception: unsigned long at memory location 0x06CCF8C0.
First-chance exception at 0x773EC42D in mstsc.exe: Microsoft C++ exception: unsigned long at memory location 0x06CCF8C0.
First-chance exception at 0x773EC42D in mstsc.exe: Microsoft C++ exception: [rethrow] at memory location 0x00000000.
First-chance exception at 0x773EC42D in mstsc.exe: Microsoft C++ exception: [rethrow] at memory location 0x00000000.
ポインタは常に、次のとおりです。
pVirtualChannelInit - 0x00000004 pVirtualChannelOpen - 0x0000ffff pVirtualChannelClose - 0x000000b8 pVirtualChannelWrite - 0x00000000 (Why 0?)
HANDLE ClientHandle = NULL;
CHANNEL_DEF pChannel[1];
CHANNEL_ENTRY_POINTS SavedEntryPoints;
PCHANNEL_INIT_EVENT_FN pChannelInitEventProc;
BOOL VCAPITYPE VirtualChannelEntry(PCHANNEL_ENTRY_POINTS pEntryPoints)
{
ofstream myfile;
myfile.open ("D:\\Projects\\bench_cli\\ConsoleApplication1\\Release\\example.txt");
myfile << "Writing this to a file.\n";
UINT retval1 = 0;
ZeroMemory(&pChannel[0], sizeof(CHANNEL_DEF));
strcpy(pChannel[0].name, "Bench");
pChannel[0].options = CHANNEL_OPTION_ENCRYPT_RDP | CHANNEL_OPTION_COMPRESS_RDP;
pChannelInitEventProc = VirtualChannelInitEvent;
memcpy(&SavedEntryPoints, pEntryPoints, sizeof(CHANNEL_ENTRY_POINTS));
myfile << " copied" << endl;
// call VirtualChannelInit using the function pointer in
// PCHANNEL_ENTRY_POINTS
myfile << "Initing" << endl;
retval1 = pEntryPoints->pVirtualChannelInit (&ClientHandle,
pChannel, 1, VIRTUAL_CHANNEL_VERSION_WIN2000,
pChannelInitEventProc); //here we stuck
myfile << " init" << endl; //this never printed
myfile.close();
return TRUE;
}
VOID VCAPITYPE VirtualChannelInitEvent(LPVOID pInitHandle, UINT event, LPVOID pData, UINT dataLength)
{
...//never called
}
私の回答は役に立ちましたか? – manuell
あなたの答えをありがとう、私はできるだけ早くそれをチェックします。 – Dimson
ニュースはありますか?私は現在、仮想チャネルのものをやっています。私は助けることができます:-) – manuell