ndis.sys: Convert ndis.sys to a native driver as it should be.
Francois Gouget
fgouget at free.fr
Sat Feb 28 11:30:59 CST 2015
---
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
More information about the wine-patches
mailing list