using the KHMEXP macro in the header files. However, since the same
header files are used to declare imports when building applications
and plug-ins that use nidmgr32.dll, the KHMEXP macro should switch to
__declspec(import) so that the relevant import table entries are
created.
To make this switch, the source files that go into nidmgr32.dll are
compiled with the special macro _NIMLIB_ defined that indicates that
the KHMEXP should expand to __declspec(dllexport). In the absence of
this macro, KHMEXP will expand to __declspec(dllimport).
ticket: 5584
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19618
dc483132-0cff-0310-8789-
dd5450dbe970
#define KHMEXP_EXP __declspec(dllexport)
#define KHMEXP_IMP __declspec(dllimport)
+#ifdef _NIMLIB_
#define KHMEXP KHMEXP_EXP
+#else
+#define KHMEXP KHMEXP_IMP
+#endif
+
#endif
/* Generic permission values */
#ifndef __KHIMAIRA_KCONFIGINTERNAL_H
#define __KHIMAIRA_KCONFIGINTERNAL_H
+#define _NIMLIB_
+
#include<windows.h>
#include<kconfig.h>
#include<khlist.h>
#ifndef __KHIMAIRA_KCREDDBINTERNAL_H__
#define __KHIMAIRA_KCREDDBINTERNAL_H__
+#define _NIMLIB_
+
#include<windows.h>
#include<kcreddb.h>
#include<kmq.h>
#ifndef __KHIMAIRA_KHERRORINTERNAL_H
#define __KHIMAIRA_KHERRORINTERNAL_H
+#define _NIMLIB_
+
#include<windows.h>
#include<kherr.h>
#include<utils.h>
#ifndef __KHIMAIRA_KMMINTERNAL_H
#define __KHIMAIRA_KMMINTERNAL_H
+#define _NIMLIB_
+
#include<windows.h>
#include<shlwapi.h>
#include<strsafe.h>
\note This callback is required.
*/
-KHMEXP khm_int32 KHMAPI init_module(kmm_module h_module);
+KHMEXP_EXP khm_int32 KHMAPI init_module(kmm_module h_module);
/*! \brief Type for init_module() */
typedef khm_int32 (KHMAPI *init_module_t)(kmm_module);
Essentially, this is a message subscriber for KMQ messages.
*/
-KHMEXP khm_int32 KHMAPI _plugin_proc(khm_int32 msg_type, khm_int32 msg_subtype, khm_ui_4 uparam, void * vparam);
+KHMEXP_EXP khm_int32 KHMAPI _plugin_proc(khm_int32 msg_type, khm_int32 msg_subtype, khm_ui_4 uparam, void * vparam);
/*! \brief Type for init_plugin() */
typedef kmq_callback_t _plugin_proc_t;
\note This callback is not required.
*/
-KHMEXP khm_int32 KHMAPI exit_module(kmm_module h_module);
+KHMEXP_EXP khm_int32 KHMAPI exit_module(kmm_module h_module);
/*! \brief Type for exit_module() */
typedef khm_int32 (KHMAPI *exit_module_t)(kmm_module);
#ifndef __KHIMAIRA_KMQINTERNAL_H
#define __KHIMAIRA_KMQINTERNAL_H
+#define _NIMLIB_
+
#include<windows.h>
#include<kmq.h>
#include<khlist.h>
}
/* called by the NetIDMgr module manager */
-KHMEXP khm_int32 KHMAPI init_module(kmm_module h_module) {
+KHMEXP_EXP khm_int32 KHMAPI init_module(kmm_module h_module) {
khm_int32 rv = KHM_ERROR_SUCCESS;
kmm_plugin_reg pi;
wchar_t buf[256];
}
/* called by the NetIDMgr module manager */
-KHMEXP khm_int32 KHMAPI exit_module(kmm_module h_module) {
+KHMEXP_EXP khm_int32 KHMAPI exit_module(kmm_module h_module) {
exit_imports();
exit_error_funcs();
void init_krb();
void exit_krb();
-KHMEXP khm_int32 KHMAPI init_module(kmm_module h_module);
-KHMEXP khm_int32 KHMAPI exit_module(kmm_module h_module);
/* globals */
extern kmm_module h_khModule;
}
/* called by the NetIDMgr module manager */
-KHMEXP khm_int32 KHMAPI init_module(kmm_module h_module) {
+KHMEXP_EXP khm_int32 KHMAPI init_module(kmm_module h_module) {
khm_int32 rv = KHM_ERROR_SUCCESS;
kmm_plugin_reg pi;
wchar_t buf[256];
}
/* called by the NetIDMgr module manager */
-KHMEXP khm_int32 KHMAPI exit_module(kmm_module h_module) {
+KHMEXP_EXP khm_int32 KHMAPI exit_module(kmm_module h_module) {
exit_imports();
exit_error_funcs();
void init_krb();
void exit_krb();
-KHMEXP khm_int32 KHMAPI init_module(kmm_module h_module);
-KHMEXP khm_int32 KHMAPI exit_module(kmm_module h_module);
/* globals */
extern kmm_module h_khModule;
/* $Id$ */
#define NOEXPORT
+#define _NIMLIB_
+
#include<khuidefs.h>
#include<intaction.h>
#include<utils.h>
/* $Id$ */
+#define _NIMLIB_
+
#include<khuidefs.h>
#include<utils.h>
#include<intalert.h>
Alerter
***********************************************************************/
+
khui_alert * kh_alerts = NULL;
CRITICAL_SECTION cs_alerts;
/* $Id$ */
+#define _NIMLIB_
+
#include<khuidefs.h>
#include<kmm.h>
#include<configui.h>
/* $Id$ */
+#define _NIMLIB_
+
#include<khuidefs.h>
#include<utils.h>
#include<assert.h>
/* $Id$ */
+#define _NIMLIB_
+
#include<khuidefs.h>
#include<utils.h>
#ifdef DEBUG
/* $Id$ */
+#define _NIMLIB_
+
#include<khuidefs.h>
/* $Id$ */
#define NOEXPORT
+#define _NIMLIB_
#include<khuidefs.h>
#include<utils.h>
/* $Id$ */
+#define _NIMLIB_
+
#include<khuidefs.h>
#include<commctrl.h>
#include<assert.h>
}
+
/* $Id$ */
+#define _NIMLIB_
+
#include<khuidefs.h>
#include<intaction.h>
}
+
/* $Id$ */
+#define _NIMLIB_
+
#include<khuidefs.h>
extern void alert_init(void);
/* $Id$ */
+#define _NIMLIB_
+
#include<shlwapi.h>
#include<khuidefs.h>
#include<netidmgr_intver.h>
/* $Id$ */
+#define _NIMLIB_
+
#include<perfstat.h>
#include<hashtable.h>
#include<stdlib.h>
/* $Id$ */
+#define _NIMLIB_
+
#include<mstring.h>
#include<kherror.h>
#include<strsafe.h>
/* $Id$ */
+#define _NIMLIB_
+
#include<windows.h>
#include<utils.h>
#include<malloc.h>
/* $Id$ */
+#define _NIMLIB_
+
#include<windows.h>
#include<sync.h>
#include<assert.h>