2000-07-01 05:51:55 +02:00
|
|
|
/* attach_dll.cc: crt0 for attaching cygwin DLL from a non-cygwin app.
|
|
|
|
|
|
|
|
This file is part of Cygwin.
|
|
|
|
|
|
|
|
This software is a copyrighted work licensed under the terms of the
|
|
|
|
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
|
|
|
|
details. */
|
|
|
|
|
2000-07-08 06:36:27 +02:00
|
|
|
#undef __INSIDE_CYGWIN__
|
2010-08-30 03:57:37 +02:00
|
|
|
#include "winlean.h"
|
2007-08-02 16:30:17 +02:00
|
|
|
#include <time.h> /* Needed since call to sys/time.h via sys/cygwin.h
|
|
|
|
complains otherwise */
|
2000-07-08 06:36:27 +02:00
|
|
|
#include <sys/cygwin.h>
|
2000-07-01 05:51:55 +02:00
|
|
|
#include "crt0.h"
|
|
|
|
|
|
|
|
/* for a loaded dll */
|
2013-04-23 11:44:36 +02:00
|
|
|
PVOID
|
2000-07-01 05:51:55 +02:00
|
|
|
cygwin_attach_dll (HMODULE h, MainFunc f)
|
|
|
|
{
|
2000-07-17 21:18:21 +02:00
|
|
|
static struct per_process u;
|
2000-07-15 04:48:11 +02:00
|
|
|
(void) _cygwin_crt0_common (f, &u);
|
2000-07-01 05:51:55 +02:00
|
|
|
|
|
|
|
/* jump into the dll. */
|
2000-07-15 04:48:11 +02:00
|
|
|
return dll_dllcrt0 (h, &u);
|
2000-07-01 05:51:55 +02:00
|
|
|
}
|