[wdmaudiodev] Re: build problem

  • From: "David A. Hoatson" <dhoatson@xxxxxxx>
  • To: <wdmaudiodev@xxxxxxxxxxxxx>
  • Date: Tue, 4 Nov 2003 10:38:39 -0800

Oops - just noticed that you were using READ_PORT_ - not READ_REGISTER_.
Sorry about that!

Have you tried just hard coding the assembler for reading the port into the
DLL?  It has been too many years since I had to write to a device that used
ports!

Thank you,

David A. Hoatson


----- Original Message ----- 
From: "David A. Hoatson" <dhoatson@xxxxxxx>
To: <wdmaudiodev@xxxxxxxxxxxxx>
Sent: Tuesday, November 04, 2003 10:32 AM
Subject: Re: [wdmaudiodev] build problem


> Hello,
>
> You would have to write a kernel mode stub driver that mapped the
hardware
> address space into user mode space.  Then you can read and write directly
> to the hardware from the DLL.
>
> See: ZwMapViewOfSection
>
> As I recall, there is an example driver "MapMem" (or some such thing) in
> the DDK source.
>
> Thank you,
>
> David A. Hoatson
>
> ----- Original Message ----- 
> From: "Victor V Lyamtsev" <vvl@xxxxxxxxxxxxx>
> To: <wdmaudiodev@xxxxxxxxxxxxx>
> Sent: Tuesday, November 04, 2003 7:29 AM
> Subject: [wdmaudiodev] build problem
>
>
> > 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/
> >
> >
>


******************

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/

Other related posts: