Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/mingw/samples/simpledll/dll.c')
-rw-r--r--winsup/mingw/samples/simpledll/dll.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/winsup/mingw/samples/simpledll/dll.c b/winsup/mingw/samples/simpledll/dll.c
new file mode 100644
index 000000000..7f743bfcd
--- /dev/null
+++ b/winsup/mingw/samples/simpledll/dll.c
@@ -0,0 +1,33 @@
+
+#include <windows.h>
+
+BOOL WINAPI
+DllMain (HANDLE hDll, DWORD dwReason, LPVOID lpReserved)
+{
+ switch (dwReason)
+ {
+ case DLL_PROCESS_ATTACH:
+ printf ("DLL Attached.\n");
+ break;
+
+ case DLL_PROCESS_DETACH:
+ printf ("DLL Detached.\n");
+ break;
+
+ case DLL_THREAD_ATTACH:
+ printf ("DLL Thread Attached.\n");
+ break;
+
+ case DLL_THREAD_DETACH:
+ printf ("DLL Thread Detached.\n");
+ break;
+ }
+ return TRUE;
+}
+
+void
+Test ()
+{
+ printf ("Test Function called!\n");
+}
+