From 2f4ea160514b89afad5f688e5fe6c03296656648 Mon Sep 17 00:00:00 2001 From: jsorg71 Date: Wed, 13 Jul 2005 01:07:00 +0000 Subject: got vnc mod working in win32 --- xrdp/xrdp_login_wnd.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'xrdp') diff --git a/xrdp/xrdp_login_wnd.c b/xrdp/xrdp_login_wnd.c index 163705f9..cdc1b7d6 100644 --- a/xrdp/xrdp_login_wnd.c +++ b/xrdp/xrdp_login_wnd.c @@ -94,6 +94,8 @@ static int APP_CC xrdp_wm_setup_mod(struct xrdp_wm* self, struct xrdp_mod_data* mod_data) { + void* func; + if (self == 0) { return 1; @@ -103,10 +105,18 @@ xrdp_wm_setup_mod(struct xrdp_wm* self, self->mod_handle = g_load_library(mod_data->lib); if (self->mod_handle != 0) { - self->mod_init = (struct xrdp_mod* (*)(void)) - g_get_proc_address(self->mod_handle, "mod_init"); - self->mod_exit = (int (*)(struct xrdp_mod*)) - g_get_proc_address(self->mod_handle, "mod_exit"); + func = g_get_proc_address(self->mod_handle, "mod_init"); + if (func == 0) + { + func = g_get_proc_address(self->mod_handle, "_mod_init"); + } + self->mod_init = (struct xrdp_mod* (*)(void))func; + func = g_get_proc_address(self->mod_handle, "mod_exit"); + if (func == 0) + { + func = g_get_proc_address(self->mod_handle, "_mod_exit"); + } + self->mod_exit = (int (*)(struct xrdp_mod*))func; if (self->mod_init != 0 && self->mod_exit != 0) { self->mod = self->mod_init(); -- cgit v1.2.1