[prev in list] [next in list] [prev in thread] [next in thread]
List: wine-patches
Subject: ndis.sys: Convert ndis.sys to a native driver as it should be.
From: Francois Gouget <fgouget () free ! fr>
Date: 2015-02-28 17:30:59
Message-ID: alpine.DEB.2.11.1502281830110.9599 () amboise
[Download RAW message or body]
---
On Windows it's a native driver, like scsiport.sys.
dlls/ndis.sys/Makefile.in | 1 +
dlls/ndis.sys/main.c | 22 ++++++++++------------
2 files changed, 11 insertions(+), 12 deletions(-)
diff --git a/dlls/ndis.sys/Makefile.in b/dlls/ndis.sys/Makefile.in
index d469e4e..33b1843 100644
--- a/dlls/ndis.sys/Makefile.in
+++ b/dlls/ndis.sys/Makefile.in
@@ -1,4 +1,5 @@
MODULE = ndis.sys
+EXTRADLLFLAGS = -Wb,--subsystem,native
C_SRCS = \
main.c
diff --git a/dlls/ndis.sys/main.c b/dlls/ndis.sys/main.c
index 99a0498..820b4af 100644
--- a/dlls/ndis.sys/main.c
+++ b/dlls/ndis.sys/main.c
@@ -18,23 +18,21 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include "config.h"
-
#include <stdarg.h>
+#include "ntstatus.h"
+#define WIN32_NO_STATUS
#include "windef.h"
#include "winbase.h"
+#include "winternl.h"
+#include "ddk/wdm.h"
+#include "wine/debug.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(ndis);
-BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, LPVOID reserved)
+NTSTATUS WINAPI DriverEntry(DRIVER_OBJECT *driver, UNICODE_STRING *path)
{
- switch (reason)
- {
- case DLL_WINE_PREATTACH:
- return FALSE; /* prefer native version */
- case DLL_PROCESS_ATTACH:
- DisableThreadLibraryCalls(instance);
- break;
- }
+ TRACE("(%p, %s)\n", driver, debugstr_w(path->Buffer));
- return TRUE;
+ return STATUS_SUCCESS;
}
--
2.1.4
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic