${CMAKE_CURRENT_SOURCE_DIR}/addin.h)
if(CHANNEL_STATIC_CLIENT_ENTRIES)
-list(REMOVE_DUPLICATES CHANNEL_STATIC_CLIENT_ENTRIES)
+ list(REMOVE_DUPLICATES CHANNEL_STATIC_CLIENT_ENTRIES)
endif()
foreach(STATIC_ENTRY ${CHANNEL_STATIC_CLIENT_ENTRIES})
set(ENTRY_POINT_NAME "${STATIC_MODULE_CHANNEL}_${${STATIC_MODULE}_CLIENT_ENTRY}")
if(${${STATIC_MODULE}_CLIENT_ENTRY} STREQUAL "VirtualChannelEntry")
set(ENTRY_POINT_IMPORT "extern BOOL VCAPITYPE ${ENTRY_POINT_NAME}(PCHANNEL_ENTRY_POINTS);")
+ elseif(${${STATIC_MODULE}_CLIENT_ENTRY} STREQUAL "VirtualChannelEntryEx")
+ set(ENTRY_POINT_IMPORT "extern BOOL VCAPITYPE ${ENTRY_POINT_NAME}(PCHANNEL_ENTRY_POINTS,PVOID);")
else()
set(ENTRY_POINT_IMPORT "extern UINT ${ENTRY_POINT_NAME}();")
endif()
free(ppAddins);
}
+extern const STATIC_ENTRY CLIENT_VirtualChannelEntryEx_TABLE[];
+
+BOOL freerdp_channels_is_virtual_channel_entry_ex(LPCSTR pszName)
+{
+ int i;
+ STATIC_ENTRY* entry;
+
+ for (i = 0; CLIENT_VirtualChannelEntryEx_TABLE[i].name != NULL; i++)
+ {
+ entry = (STATIC_ENTRY*) &CLIENT_VirtualChannelEntryEx_TABLE[i];
+
+ if (!strcmp(entry->name, pszName))
+ return TRUE;
+ }
+
+ return FALSE;
+}
+
void* freerdp_channels_load_static_addin_entry(LPCSTR pszName, LPSTR pszSubsystem, LPSTR pszType, DWORD dwFlags)
{
int i, j;
}
else
{
+ if (dwFlags & FREERDP_ADDIN_CHANNEL_ENTRYEX)
+ {
+ if (!freerdp_channels_is_virtual_channel_entry_ex(pszName))
+ return NULL;
+ }
+
return (void*) CLIENT_STATIC_ADDIN_TABLE[i].entry;
}
}
drdynvc_main.c
drdynvc_main.h)
-add_channel_client_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_NAME} FALSE "VirtualChannelEntry")
-
+add_channel_client_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_NAME} FALSE "VirtualChannelEntryEx")
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Channels/${CHANNEL_NAME}/Client")
+
}
/* drdynvc is always built-in */
-#define VirtualChannelEntry drdynvc_VirtualChannelEntry
+#define VirtualChannelEntryEx drdynvc_VirtualChannelEntryEx
-BOOL VCAPITYPE VirtualChannelEntry(PCHANNEL_ENTRY_POINTS_EX pEntryPoints, PVOID pInitHandle)
+BOOL VCAPITYPE VirtualChannelEntryEx(PCHANNEL_ENTRY_POINTS_EX pEntryPoints, PVOID pInitHandle)
{
UINT rc;
drdynvcPlugin* drdynvc;
PVIRTUALCHANNELENTRY entry = NULL;
PVIRTUALCHANNELENTRYEX entryEx = NULL;
- entry = freerdp_load_channel_addin_entry(name, NULL, NULL, FREERDP_ADDIN_CHANNEL_STATIC);
+ entryEx = (PVIRTUALCHANNELENTRYEX) freerdp_load_channel_addin_entry(name, NULL, NULL,
+ FREERDP_ADDIN_CHANNEL_STATIC | FREERDP_ADDIN_CHANNEL_ENTRYEX);
- if (!strcmp(name, "drdynvc"))
- entryEx = (PVIRTUALCHANNELENTRYEX) entry;
+ if (!entryEx)
+ entry = freerdp_load_channel_addin_entry(name, NULL, NULL, FREERDP_ADDIN_CHANNEL_STATIC);
if (entryEx)
{
#define FREERDP_ADDIN_CHANNEL_STATIC 0x00001000
#define FREERDP_ADDIN_CHANNEL_DYNAMIC 0x00002000
#define FREERDP_ADDIN_CHANNEL_DEVICE 0x00004000
+#define FREERDP_ADDIN_CHANNEL_ENTRYEX 0x00008000
struct _FREERDP_ADDIN
{
PVIRTUALCHANNELENTRY entry = NULL;
if (freerdp_load_static_channel_addin_entry)
- entry = freerdp_load_static_channel_addin_entry(pszName, pszSubsystem, pszType,
- dwFlags);
+ entry = freerdp_load_static_channel_addin_entry(pszName, pszSubsystem, pszType, dwFlags);
+
+ if (dwFlags & FREERDP_ADDIN_CHANNEL_ENTRYEX)
+ return entry; /* don't warn, don't try dynamic entries for VirtualChannelEntryEx */
if (!entry)
- entry = freerdp_load_dynamic_channel_addin_entry(pszName, pszSubsystem, pszType,
- dwFlags);
+ entry = freerdp_load_dynamic_channel_addin_entry(pszName, pszSubsystem, pszType, dwFlags);
if (!entry)
WLog_WARN(TAG, "Failed to load channel %s [%s]", pszName, pszSubsystem);