I have both a client DLL and a server-side application, as according to the WinAPI virtual channel documentation:
hVirtChannel = WTSVirtualChannelOpenEx(dwSessionId,
const_cast<LPSTR>(CHANNELNAME), 0);
if (hVirtChannel == nullptr)
DisplayError(TEXT("WTSVirtualChannelOpen"));
That is the server code to open the channel. dwSessionId is equal to 2, which is the correct session id for my running remote desktop session.
CHANNELNAME is equal to sysinf. DisplayError() is my own custom function, all it does is use the Windows API to tell me the most recent error.
Server Registry File:
REGEDIT4
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\AddIns\tssysinfo]
"Name"="sysinf"
"Type"=dword:00000003
Client Registry File:
REGEDIT4
[HKEY_CURRENT_USER\Software\Microsoft\Terminal Server Client\Default\AddIns\tssysinfo]
"Name" = "C:\TSAddInDLL\ClientCPP.dll"
Does anyone have any ideas why this is not working?