Hello there,
I have some questions regarding the SDK for the Virtual Channel Bridge.
1) I am confused about the string I found in the code. It states that GetSDKVersion only applies to PCoIP Sessions. Am I guessing right that this is obsolete?
LOG_MESSAGE("The SDK Version string of locally running SDK is : %s \n", localVersionStr);
LOG_MESSAGE("The SDK Version number of locally running SDK is : %d \n", localVersionNum);
if (ok == FALSE) {
LOG_MESSAGE("Not in PCoIP Session - GetSDKVersion only applies to PCoIP sessions.\n");
} else {
LOG_MESSAGE("The SDK Version string of remotely running SDK is : %s \n", remoteVersionStr);
LOG_MESSAGE("The SDK Version number of remotely running SDK is : %d \n", remoteVersionNum);
}
}
This Screenshot is made from a connection running with blast:
2) Why am I getting the msgbox when I am running a normal rdp session via Microsoft “Remote Desktop Connection”. I am not sure if I am getting the concept of TimerCallback() right. I even get the msgbox while I am connected and running my pingpong.. and why is my .dll used for the normal connection?
VOID CALLBACK TimerCallback(PVOID lpParameter, BOOLEAN reserved)
{
clock_t timeNew = clock();
LOG_MESSAGE("TimeNew: ", timeNew);
float secondsPast = ((float)(timeNew - timeMsgReceived)) / CLOCKS_PER_SEC;
LOG_MESSAGE("seconds past: ", secondsPast);
if (secondsPast >= 11)
{ DeleteTimerQueueTimer(NULL, timerHandle, NULL);
int msgbox = MessageBox(NULL, "Warning! The Connection is slow or has broken", "Client", MB_OK);
}
}
Does this correlate with what i found in the thread VMware Horizon View RDP Virtual Channel Bridge SDK
3) When running the .exe in a view rdp session it says:
But I am in a View Session. It is working for Blast and PCoIP.
--------------EDIT--------------
4) I accidently ran my virtual channel bridge without having added the registry value "view enabled=1" and it worked anyway. So I am wondering if to do so is obsolete too?
--------------EDIT--------------
I appreciate any hint
Best regards
Hannes
Hi Hannes, let me do my best to answer your questions.
1) The reference to PCoIP is outdated. I've entered a bug to track the issue.
2) Without the context of how the timer callback was installed I can't answer the question. Is it installed as part of your server-side application? Your client-side virtual channel plugin? Why do you think it should not be called? etc.
3) The message is printed based on the return value from VDP_IsViewSession(). That function currently just checks for PCoIP and Blast. This is a known issue and has already been fixed in the next release.
4) The "View Enabled" registry key is checked by vdp_rdpvcbridge.dll but that DLL is only used when making PCoIP and Blast connections. When using "Remote Desktop Connection" to make RDP connections Microsoft's DLL does not check the "View Enabled" registry key so it will always be loaded. Oddly enough, when looking into this issue I found that making a View/RDP connection does not load the plugins at all. I've entered a bug to track the issue.
Clayton Wishoff
Staff II Engineer
VMware, Inc.
Hi Hannes, let me do my best to answer your questions.
1) The reference to PCoIP is outdated. I've entered a bug to track the issue.
2) Without the context of how the timer callback was installed I can't answer the question. Is it installed as part of your server-side application? Your client-side virtual channel plugin? Why do you think it should not be called? etc.
3) The message is printed based on the return value from VDP_IsViewSession(). That function currently just checks for PCoIP and Blast. This is a known issue and has already been fixed in the next release.
4) The "View Enabled" registry key is checked by vdp_rdpvcbridge.dll but that DLL is only used when making PCoIP and Blast connections. When using "Remote Desktop Connection" to make RDP connections Microsoft's DLL does not check the "View Enabled" registry key so it will always be loaded. Oddly enough, when looking into this issue I found that making a View/RDP connection does not load the plugins at all. I've entered a bug to track the issue.
Clayton Wishoff
Staff II Engineer
VMware, Inc.
Thank you Clayton, that made things clearer!
Sorry for the late response, to 2): I see what i wrote is quiete unclear
To clarify: I was using - or at least I was trying to use - a timer in the vchan-ping-client that would tell me when I was having a slow connection or a disconnection.
So what surprises me, beside that the function is not working properly yet, is that when I am starting a rdp connection with microsofts remote desktop connection I will get my messagebox.
My conclusion is that the .dll is called when I am starting a RDP session. But shouldn't it only be called when I am using view/RDP?
Is that what you meant in 4)? What is "it"?
When using "Remote Desktop Connection" to make RDP connections Microsoft's DLL does not check the "View Enabled" registry key so it will always be loaded.
Regarding #4, "it" referred to your plugin DLL. Also regarding #4, the statement about the DLLs not loading with a View/RDP connection isn't completely accurate. We've found that sometimes they won't load in this case if your client is a VM and you've connected to the console using vSphere. It's currently under investigation.
Regarding #2, if you could post a small code sample that shows the issue somewhere I can take a look. I find that's easier than playing 20 questions
Clayton Wishoff
Staff II Engineer
VMware, Inc.
Thank you
------
2)
This is my callback in vchan-ping-client:
VOID CALLBACK TimerCallback(PVOID lpParameter, BOOLEAN reserved)
{
clock_t timeNew = clock();
LOG_MESSAGE("TimeNew: ", timeNew);
float secondsPast = ((float)(timeNew - timeMsgReceived)) / CLOCKS_PER_SEC;
LOG_MESSAGE("seconds past: ", secondsPast);
if (secondsPast >= 11)
{
DeleteTimerQueueTimer(NULL, timerHandle, NULL);
int msgbox = MessageBox(NULL, "Warning! The Connection is slow or has broken!", "Client", MB_OK);
}
}
----------------------
And it is called at virtual channel entry:
VDP_RDPVCBRIDGE_API
BOOL VCAPITYPE
VirtualChannelEntry(PCHANNEL_ENTRY_POINTS pEntryPoints) // IN
{
//millisec
DWORD start = 15000;
DWORD interval = 3000;
//Create timer to check if server is still sending messages to client
//After every specified period, the callback function is called
/*
* You must make a copy the CHANNEL_ENTRY_POINTS structure.
* Just saving the pointer is not good enough.
*/
g_entryPoints = *pEntryPoints;
/*
* This is an array of channels that we are interested in.
* For this example there is just a single channel.
*/
CHANNEL_DEF channelDefs[] = { { VCHAN_NAME, 0 } };
UINT rc = g_entryPoints.pVirtualChannelInit(&g_connectionHandle,
channelDefs,
ARRAYSIZE(channelDefs),
VIRTUAL_CHANNEL_VERSION_WIN2000,
ConnectionEventProc);
if (rc != CHANNEL_RC_OK) {
LOG_ERROR("VirtualChannelInit(\"%s\") failed (err=%d)\n", VCHAN_NAME, rc);
return FALSE;
}
return TRUE;
}
clock_t timeNew = clock(); LOG_MESSAGE("TimeNew: ", timeNew); float secondsPast = ((float)(timeNew - timeMsgReceived)) / CLOCKS_PER_SEC; LOG_MESSAGE("seconds past: ", secondsPast); if (secondsPast >= 11)#define LOG_MESSAGE(...)#define LOG_ERROR(...)
#define LOG_MESSAGE(...)
#define LOG_ERROR(...)
VOID CALLBACK TimerCallback(PVOID lpParameter, BOOLEAN reserved)
{
clock_t timeNew = clock();
LOG_MESSAGE("TimeNew: ", timeNew);
float secondsPast = ((float)(timeNew - timeMsgReceived)) / CLOCKS_PER_SEC;
LOG_MESSAGE("seconds past: ", secondsPast);
if (secondsPast >= 11)
{
DeleteTimerQueueTimer(NULL, timerHandle, NULL);
int msgbox = MessageBox(NULL, "Warning! The Connection is slow or has broken!", "Client", MB_OK);
}
}
Right now the callback is triggered no matter what display protocoll, so I am aware it is wrong at the moment.
I am just confused why the message will also appear when connecting without view:
I can't really help with the timer callback but let me try to answer this
> I am just confused why the message will also appear when connecting without view
The registry location, HKCU\Software\Microsoft\Terminal Server Client\Default\AddIns, is the location defined by Remote Desktop Connection as the place to look for plugins to load. View is trying to emulate this behavior so it looks there as well. So your client-side virtual channel plugin is loaded by Remote Desktop Connection as well as View.