I wonder if code with I/O space read and write macros ( like READ_PORT_ULONG ) can be built into dll; I saw DDK examples where it was built into static lib, but all my attempts to build it into dll resulted in "Macro redefinition" errors. Can it be done? SOURCES TARGETNAME=testdll TARGETTYPE=DYNLINK TARGETPATH=obj TARGETEXT=dll DLLENTRY=LibMain C_DEFINES= $(C_DEFINES) -D_WIN32 -DUNICODE -D_UNICODE -DUNDER_NT LINKER_FLAGS=-map INCLUDES= \ ..\inc; \ $(DDK_INC_PATH); \ $(WDM_INC_PATH); MSC_WARNING_LEVEL=-W3 -WX SOURCES=\ testdll.c\ /////////////////////////////////////////////////////////////////////////////// //////////// testdll.c /////////////////////////////////////////////////// #include "wdm.h" #include <windows.h> HANDLE g_hInst; BOOL APIENTRY LibMain( HANDLE hDll, DWORD dwReason, LPVOID lpReserved ) { switch( dwReason ) { case DLL_PROCESS_ATTACH: g_hInst = hDll; break; case DLL_PROCESS_DETACH: break; default: break; } return TRUE; } ****************** WDMAUDIODEV addresses: Post message: mailto:wdmaudiodev@xxxxxxxxxxxxx Subscribe: mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=subscribe Unsubscribe: mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=unsubscribe Moderator: mailto:wdmaudiodev-moderators@xxxxxxxxxxxxx URL to WDMAUDIODEV page: http://www.wdmaudiodev.de/