2013-05-08 Keith Marshall <keithmarshall@users.sourceforge.net>
+ Extend DMH services to delay-loaded DLL clients.
+
+ * src/dmhcore.h (dmh_bind): New function; declare it.
+ * src/dmhcore.cpp (dmh_bind): Implement it; it provides an API through
+ which the setup tool makes its existing DMH services available to post
+ install hooks in mingw-get-0.dll, which cannot be loaded until after
+ the providing package has been downloaded and unpacked.
+
+2013-05-08 Keith Marshall <keithmarshall@users.sourceforge.net>
+
Avoid unnecessary command line globbing in GUI applications.
* src/guimain.cpp src/guistub.cpp (_CRT_glob): Declare as extern "C";
*/
static dmhTypeGeneric *dmh = NULL;
+EXTERN_C dmhTypeGeneric *dmh_bind( dmhTypeGeneric *dmh_preset )
+{
+ /* Initialisation hook; this is called by the setup tool, to
+ * bind its pre-assigned message handler to the corresponding
+ * service within a dynamically loaded DLL.
+ */
+ if( dmh == NULL ) dmh = dmh_preset;
+ return dmh;
+}
+
/* Initialisation requires this constructor.
*/
dmhTypeGeneric::dmhTypeGeneric( const char* name ):progname( name ){}
* $Id$
*
* Written by Keith Marshall <keithmarshall@users.sourceforge.net>
- * Copyright (C) 2009, 2012, MinGW.org Project
+ * Copyright (C) 2009, 2012, 2013, MinGW.org Project
*
*
* Declaration of the classes on which the implementation of the
#define DMHCORE_H 1
#include "dmh.h"
+#include <stdarg.h>
class dmhTypeGeneric
{
static const char *notification_format;
};
+EXTERN_C dmhTypeGeneric *dmh_bind( dmhTypeGeneric* );
+
#endif /* DMHCORE_H: $RCSfile$: end of file */