IoConnectInterruptEx needs extra lib on Win7?

Hi all,

My WDM driver can be built successfully when using traditional
line-based interrupt handling, but it failed to link when I switch to
IoConnectInterruptEx to handle MSI. mydriver.cpp depends on mywdm.lib.
The errors are something like these:

…\mywdm.lib(mywdm.obj) : error LNK2001: unresolved external symbol
WdmlibIoConnectInterruptEx
…\mywdm.lib(lmywdm.obj) : error LNK2001: unresolved external symbol
WdmlibIoDisconnectInterruptEx

I knew that I need to use Iointex.lib to compile the driver for
pre-Vista version of Windows, but now I’m targeting Win7x64, why DDK
complaints it? Do I need to explicitly specify any TARGETLIBS?

Thanks.

-solotim

Are you including iointex.h? if so, stop including it and use the definition in wdm.h or ntddk.h

d

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of solotim
Sent: Friday, January 20, 2012 8:23 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] IoConnectInterruptEx needs extra lib on Win7?

Hi all,

My WDM driver can be built successfully when using traditional line-based interrupt handling, but it failed to link when I switch to IoConnectInterruptEx to handle MSI. mydriver.cpp depends on mywdm.lib.
The errors are something like these:

…\mywdm.lib(mywdm.obj) : error LNK2001: unresolved external symbol WdmlibIoConnectInterruptEx
…\mywdm.lib(lmywdm.obj) : error LNK2001: unresolved external symbol WdmlibIoDisconnectInterruptEx

I knew that I need to use Iointex.lib to compile the driver for pre-Vista version of Windows, but now I’m targeting Win7x64, why DDK complaints it? Do I need to explicitly specify any TARGETLIBS?

Thanks.

-solotim


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

AH. That might be the reason, I’ll check that. I’m not the author of
that library… Thank you !

2012/1/21 Doron Holan :
> Are you including iointex.h? if so, stop including it and use the definition in wdm.h or ntddk.h
>
> d
>
> -----Original Message-----
> From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of solotim
> Sent: Friday, January 20, 2012 8:23 PM
> To: Windows System Software Devs Interest List
> Subject: [ntdev] IoConnectInterruptEx needs extra lib on Win7?
>
> Hi all,
>
> My WDM driver can be built successfully when using traditional line-based interrupt handling, but it failed to link when I switch to IoConnectInterruptEx to handle MSI. mydriver.cpp depends on mywdm.lib.
> The errors are something like these:
>
> …\mywdm.lib(mywdm.obj) : error LNK2001: unresolved external symbol WdmlibIoConnectInterruptEx
> …\mywdm.lib(lmywdm.obj) : error LNK2001: unresolved external symbol WdmlibIoDisconnectInterruptEx
>
> I knew that I need to use Iointex.lib to compile the driver for pre-Vista version of Windows, but now I’m targeting Win7x64, why DDK complaints it? Do I need to explicitly specify any TARGETLIBS?
>
> Thanks.
>
> -solotim
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer
>
>
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

By the way, I didn’t know the answer immediately. All I did was run

Findstr IoConnectInterruptEx *

In the ddk’s inc\ddk directory, saw this header and wdm.h as the 2 hits and opened up both to see what they contained.

d

debt from my phone


From: solotim
Sent: 1/21/2012 3:35 AM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] IoConnectInterruptEx needs extra lib on Win7?

AH. That might be the reason, I’ll check that. I’m not the author of
that library… Thank you !

2012/1/21 Doron Holan :
> Are you including iointex.h? if so, stop including it and use the definition in wdm.h or ntddk.h
>
> d
>
> -----Original Message-----
> From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of solotim
> Sent: Friday, January 20, 2012 8:23 PM
> To: Windows System Software Devs Interest List
> Subject: [ntdev] IoConnectInterruptEx needs extra lib on Win7?
>
> Hi all,
>
> My WDM driver can be built successfully when using traditional line-based interrupt handling, but it failed to link when I switch to IoConnectInterruptEx to handle MSI. mydriver.cpp depends on mywdm.lib.
> The errors are something like these:
>
> …\mywdm.lib(mywdm.obj) : error LNK2001: unresolved external symbol WdmlibIoConnectInterruptEx
> …\mywdm.lib(lmywdm.obj) : error LNK2001: unresolved external symbol WdmlibIoDisconnectInterruptEx
>
> I knew that I need to use Iointex.lib to compile the driver for pre-Vista version of Windows, but now I’m targeting Win7x64, why DDK complaints it? Do I need to explicitly specify any TARGETLIBS?
>
> Thanks.
>
> -solotim
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer
>
>
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

Hi Doron,

I’m back after a long vacation.
I disabled all “include <iointex.h>” statements in the library code
and built a new lib, but it doesn’t resolve the problem. Later I just
stopped using that library and tried to call IoConnectInterruptEx
directly in my own driver code, the same error happens again. I’m sure
that no iointex get involved in my code. (I used to use grep command
in msys terminal)

The command I used to compile the driver is:
c:\WinDDK\ddkbuild.cmd -W7X64 chk .

Any suggestion? Thanks.

Regards,
solotim

2012/1/21 Doron Holan :
> By the way, I didn’t know the answer immediately. All I did was run
>
> Findstr IoConnectInterruptEx *
>
> In the ddk’s inc\ddk directory, saw this header and wdm.h as the 2 hits and
> opened up both to see what they contained.
>
> d
>
> debt from my phone
> ________________________________
> From: solotim
> Sent: 1/21/2012 3:35 AM
>
> To: Windows System Software Devs Interest List
> Subject: Re: [ntdev] IoConnectInterruptEx needs extra lib on Win7?
>
> AH. That might be the reason, I’ll check that. I’m not the author of
> that library… Thank you !
>
> 2012/1/21 Doron Holan :
>> Are you including iointex.h? if so, stop including it and use the
>> definition in wdm.h or ntddk.h
>>
>> d
>>
>> -----Original Message-----
>> From: xxxxx@lists.osr.com
>> [mailto:xxxxx@lists.osr.com] On Behalf Of solotim
>> Sent: Friday, January 20, 2012 8:23 PM
>> To: Windows System Software Devs Interest List
>> Subject: [ntdev] IoConnectInterruptEx needs extra lib on Win7?
>>
>> Hi all,
>>
>> My WDM driver can be built successfully when using traditional line-based
>> interrupt handling, but it failed to link when I switch to
>> IoConnectInterruptEx to handle MSI. mydriver.cpp depends on mywdm.lib.
>> The errors are something like these:
>>
>> …\mywdm.lib(mywdm.obj) : error LNK2001: unresolved external symbol
>> WdmlibIoConnectInterruptEx
>> …\mywdm.lib(lmywdm.obj) : error LNK2001: unresolved external symbol
>> WdmlibIoDisconnectInterruptEx
>>
>> I knew that I need to use Iointex.lib to compile the driver for pre-Vista
>> version of Windows, but now I’m targeting Win7x64, why DDK complaints it? Do
>> I need to explicitly specify any TARGETLIBS?
>>
>> Thanks.
>>
>> -solotim
>>
>> —
>> NTDEV is sponsored by OSR
>>
>> For our schedule of WDF, WDM, debugging and other seminars visit:
>> http://www.osr.com/seminars
>>
>> To unsubscribe, visit the List Server section of OSR Online at
>> http://www.osronline.com/page.cfm?name=ListServer
>>
>>
>>
>> —
>> NTDEV is sponsored by OSR
>>
>> For our schedule of WDF, WDM, debugging and other seminars visit:
>> http://www.osr.com/seminars
>>
>> To unsubscribe, visit the List Server section of OSR Online at
>> http://www.osronline.com/page.cfm?name=ListServer
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer</iointex.h>

Could you post your build log?

mm

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of solotim
Sent: Saturday, January 28, 2012 8:02 PM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] IoConnectInterruptEx needs extra lib on Win7?

Hi Doron,

I’m back after a long vacation.
I disabled all “include <iointex.h>” statements in the library code and
built a new lib, but it doesn’t resolve the problem. Later I just stopped
using that library and tried to call IoConnectInterruptEx directly in my own
driver code, the same error happens again. I’m sure that no iointex get
involved in my code. (I used to use grep command in msys terminal)

The command I used to compile the driver is:
c:\WinDDK\ddkbuild.cmd -W7X64 chk .

Any suggestion? Thanks.

Regards,
solotim

2012/1/21 Doron Holan :
> By the way, I didn’t know the answer immediately. All I did was run
>
> Findstr IoConnectInterruptEx *
>
> In the ddk’s inc\ddk directory, saw this header and wdm.h as the 2
> hits and opened up both to see what they contained.
>
> d
>
> debt from my phone
> ________________________________
> From: solotim
> Sent: 1/21/2012 3:35 AM
>
> To: Windows System Software Devs Interest List
> Subject: Re: [ntdev] IoConnectInterruptEx needs extra lib on Win7?
>
> AH. That might be the reason, I’ll check that. I’m not the author of
> that library… Thank you !
>
> 2012/1/21 Doron Holan :
>> Are you including iointex.h? if so, stop including it and use the
>> definition in wdm.h or ntddk.h
>>
>> d
>>
>> -----Original Message-----
>> From: xxxxx@lists.osr.com
>> [mailto:xxxxx@lists.osr.com] On Behalf Of solotim
>> Sent: Friday, January 20, 2012 8:23 PM
>> To: Windows System Software Devs Interest List
>> Subject: [ntdev] IoConnectInterruptEx needs extra lib on Win7?
>>
>> Hi all,
>>
>> My WDM driver can be built successfully when using traditional
>> line-based interrupt handling, but it failed to link when I switch to
>> IoConnectInterruptEx to handle MSI. mydriver.cpp depends on mywdm.lib.
>> The errors are something like these:
>>
>> …\mywdm.lib(mywdm.obj) : error LNK2001: unresolved external symbol
>> WdmlibIoConnectInterruptEx
>> …\mywdm.lib(lmywdm.obj) : error LNK2001: unresolved external symbol
>> WdmlibIoDisconnectInterruptEx
>>
>> I knew that I need to use Iointex.lib to compile the driver for
>> pre-Vista version of Windows, but now I’m targeting Win7x64, why DDK
>> complaints it? Do I need to explicitly specify any TARGETLIBS?
>>
>> Thanks.
>>
>> -solotim
>>
>> —
>> NTDEV is sponsored by OSR
>>
>> For our schedule of WDF, WDM, debugging and other seminars visit:
>> http://www.osr.com/seminars
>>
>> To unsubscribe, visit the List Server section of OSR Online at
>> http://www.osronline.com/page.cfm?name=ListServer
>>
>>
>>
>> —
>> NTDEV is sponsored by OSR
>>
>> For our schedule of WDF, WDM, debugging and other seminars visit:
>> http://www.osr.com/seminars
>>
>> To unsubscribe, visit the List Server section of OSR Online at
>> http://www.osronline.com/page.cfm?name=ListServer
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer</iointex.h>

Sure. This is the log when I build the driver with the my static lib.

BUILD: Examining c:\users\sew\projects\mdm_d~1\dwh_br~1\src\phy\drv
directory for files to compile.
1>Compiling and Linking
c:\users\sew\projects\mdm_d~1\dwh_br~1\src\phy\drv *************
1>‘nmake.exe /nologo BUILDMSG=Stop. -i BUILD_PASS=PASS2 LINKONLY=1
NOPASS0=1 MAKEDIR_RELATIVE_TO_BASEDIR=’
1>c:\users\sew\projects\mdm_d~1\dwh_br~1\src\phy\drv: TARGETPATH is …/…/…/bin
1> link.exe /out:…/…/…/bin\amd64\spaa_psy_win7_64.sys
/machine:amd64 @c:\users\sew\projects\mdm_d~1\dwh_br~1\src\phy\drv\objchk_win7_amd64\amd64\lnk.rsp
1>Microsoft (R) Incremental Linker Version 9.00.30729.207
1>Copyright (C) Microsoft Corporation. All rights reserved.
1>/MERGE:_PAGE=PAGE
1>/MERGE:_TEXT=.text
1>/SECTION:INIT,d
1>/OPT:REF
1>/OPT:ICF
1>/IGNORE:4198,4010,4037,4039,4065,4070,4078,4087,4089,4221,4108,4088,4218,4218,4235
1>/INCREMENTAL:NO
1>/release
1>/NODEFAULTLIB
1>/WX
1>/debug
1>/debugtype:cv,fixup,pdata
1>/version:6.1
1>/osversion:6.1
1>c:\WinDDK\760016~1.1\lib\win7\amd64\hotpatch.obj
1>/functionpadmin:6
1>/pdbcompress
1>/STACK:0x40000,0x1000
1>/driver /driver:wdm
1>/base:0x10000
1>/align:0x0080
1>/subsystem:native,1.10
1>/entry:GsDriverEntry
1>/out:…/…/…/bin\amd64\spaa_psy_win7_64.sys
1>c:\users\sew\projects\mdm_d~1\dwh_br~1\src\phy\drv\objchk_win7_amd64\amd64\driver.obj
1>c:\users\sew\projects\mdm_d~1\dwh_br~1\src\phy\drv\objchk_win7_amd64\amd64\psy_util.obj
1>c:\WinDDK\760016~1.1\lib\win7\amd64\BufferOverflowK.lib
1>c:\WinDDK\760016~1.1\lib\win7\amd64\wdm.lib
1>…/…/common/wdm/stdlib/objchk_win7_amd64/amd64/spaa_lwdm.lib
1>driver.obj : MSIL .netmodule or module compiled with /GL found;
restarting link with /LTCG; add /LTCG to the link command line to
improve linker performance
1>Microsoft (R) Incremental Linker Version 9.00.30729.207
1>Copyright (C) Microsoft Corporation. All rights reserved.
1>/MERGE:_PAGE=PAGE
1>/MERGE:_TEXT=.text
1>/SECTION:INIT,d
1>/OPT:REF
1>/OPT:ICF
1>/IGNORE:4198,4010,4037,4039,4065,4070,4078,4087,4089,4221,4108,4088,4218,4218,4235
1>/INCREMENTAL:NO
1>/release
1>/NODEFAULTLIB
1>/WX
1>/debug
1>/debugtype:cv,fixup,pdata
1>/version:6.1
1>/osversion:6.1
1>c:\WinDDK\760016~1.1\lib\win7\amd64\hotpatch.obj
1>/functionpadmin:6
1>/pdbcompress
1>/STACK:0x40000,0x1000
1>/driver /driver:wdm
1>/base:0x10000
1>/align:0x0080
1>/subsystem:native,1.10
1>/entry:GsDriverEntry
1>/out:…/…/…/bin\amd64\spaa_psy_win7_64.sys
1>c:\users\sew\projects\mdm_d~1\dwh_br~1\src\phy\drv\objchk_win7_amd64\amd64\driver.obj
1>c:\users\sew\projects\mdm_d~1\dwh_br~1\src\phy\drv\objchk_win7_amd64\amd64\psy_util.obj
1>c:\WinDDK\760016~1.1\lib\win7\amd64\BufferOverflowK.lib
1>c:\WinDDK\760016~1.1\lib\win7\amd64\wdm.lib
1>…/…/common/wdm/stdlib/objchk_win7_amd64/amd64/spaa_lwdm.lib
1>spaa_lwdm.lib(lwdm_common.obj) : error LNK2001: unresolved external
symbol __imp_IoConnectInterruptEx
1>errors in directory c:\users\sew\projects\mdm_d~1\dwh_br~1\src\phy\drv
1>c:\users\sew\projects\mdm_d~1\dwh_br~1\src\phy\drv\spaa_lwdm.lib(lwdm_common.obj)
: error LNK2001: unresolved external symbol __imp_IoConnectInterruptEx
1>spaa_lwdm.lib(lwdm_common.obj) : error LNK2001: unresolved external
symbol __imp_IoDisconnectInterruptEx
1>c:\users\sew\projects\mdm_d~1\dwh_br~1\src\phy\drv\spaa_lwdm.lib(lwdm_common.obj)
: error LNK2001: unresolved external symbol
__imp_IoDisconnectInterruptEx
1>…/…/…/bin\amd64\spaa_psy_win7_64.sys : fatal error LNK1120: 2
unresolved externals
1>c:\users\sew\projects\mdm_d~1\dwh_br~1/bin\amd64\spaa_psy_win7_64.sys
: error LNK1120: 2 unresolved externals

2012/1/29 Martin O’Brien :
> Could you post your build log?
>
>
> mm
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of solotim
> Sent: Saturday, January 28, 2012 8:02 PM
> To: Windows System Software Devs Interest List
> Subject: Re: [ntdev] IoConnectInterruptEx needs extra lib on Win7?
>
> Hi Doron,
>
> I’m back after a long vacation.
> I disabled all “include <iointex.h>” statements in the library code and
> built a new lib, but it doesn’t resolve the problem. Later I just stopped
> using that library and tried to call IoConnectInterruptEx directly in my own
> driver code, the same error happens again. I’m sure that no iointex get
> involved in my code. (I used to use grep command in msys terminal)
>
> The command I used to compile the driver is:
> c:\WinDDK\ddkbuild.cmd -W7X64 chk .
>
> Any suggestion? Thanks.
>
> Regards,
> solotim
>
> 2012/1/21 Doron Holan :
>> By the way, I didn’t know the answer immediately. All I did was run
>>
>> Findstr IoConnectInterruptEx *
>>
>> In the ddk’s inc\ddk directory, saw this header and wdm.h as the 2
>> hits and opened up both to see what they contained.
>>
>> d
>>
>> debt from my phone
>> ________________________________
>> From: solotim
>> Sent: 1/21/2012 3:35 AM
>>
>> To: Windows System Software Devs Interest List
>> Subject: Re: [ntdev] IoConnectInterruptEx needs extra lib on Win7?
>>
>> AH. That might be the reason, I’ll check that. I’m not the author of
>> that library… Thank you !
>>
>> 2012/1/21 Doron Holan :
>>> Are you including iointex.h? if so, stop including it and use the
>>> definition in wdm.h or ntddk.h
>>>
>>> d
>>>
>>> -----Original Message-----
>>> From: xxxxx@lists.osr.com
>>> [mailto:xxxxx@lists.osr.com] On Behalf Of solotim
>>> Sent: Friday, January 20, 2012 8:23 PM
>>> To: Windows System Software Devs Interest List
>>> Subject: [ntdev] IoConnectInterruptEx needs extra lib on Win7?
>>>
>>> Hi all,
>>>
>>> My WDM driver can be built successfully when using traditional
>>> line-based interrupt handling, but it failed to link when I switch to
>>> IoConnectInterruptEx to handle MSI. mydriver.cpp depends on mywdm.lib.
>>> The errors are something like these:
>>>
>>> …\mywdm.lib(mywdm.obj) : error LNK2001: unresolved external symbol
>>> WdmlibIoConnectInterruptEx
>>> …\mywdm.lib(lmywdm.obj) : error LNK2001: unresolved external symbol
>>> WdmlibIoDisconnectInterruptEx
>>>
>>> I knew that I need to use Iointex.lib to compile the driver for
>>> pre-Vista version of Windows, but now I’m targeting Win7x64, why DDK
>>> complaints it? Do I need to explicitly specify any TARGETLIBS?
>>>
>>> Thanks.
>>>
>>> -solotim
>>>
>>> —
>>> NTDEV is sponsored by OSR
>>>
>>> For our schedule of WDF, WDM, debugging and other seminars visit:
>>> http://www.osr.com/seminars
>>>
>>> To unsubscribe, visit the List Server section of OSR Online at
>>> http://www.osronline.com/page.cfm?name=ListServer
>>>
>>>
>>>
>>> —
>>> NTDEV is sponsored by OSR
>>>
>>> For our schedule of WDF, WDM, debugging and other seminars visit:
>>> http://www.osr.com/seminars
>>>
>>> To unsubscribe, visit the List Server section of OSR Online at
>>> http://www.osronline.com/page.cfm?name=ListServer
>>
>> —
>> NTDEV is sponsored by OSR
>>
>> For our schedule of WDF, WDM, debugging and other seminars visit:
>> http://www.osr.com/seminars
>>
>> To unsubscribe, visit the List Server section of OSR Online at
>> http://www.osronline.com/page.cfm?name=ListServer
>>
>>
>> —
>> NTDEV is sponsored by OSR
>>
>> For our schedule of WDF, WDM, debugging and other seminars visit:
>> http://www.osr.com/seminars
>>
>> To unsubscribe, visit the List Server section of OSR Online at
>> http://www.osronline.com/page.cfm?name=ListServer
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer</iointex.h>

This is a different error, now the missing resolved import is __imp_IoConnectInterruptEx, not WdmlibIoConnectInterruptEx. This is good. The fix is not to mark yourself as a wdm driver. This is a non wdm API. Just remove the wdm directive from your sources file. Wdm doesn’t mean anything anymore anyway, it hasn’t since win2k

d

debt from my phone


From: solotim
Sent: 1/28/2012 8:43 PM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] IoConnectInterruptEx needs extra lib on Win7?

Sure. This is the log when I build the driver with the my static lib.

BUILD: Examining c:\users\sew\projects\mdm_d~1\dwh_br~1\src\phy\drv
directory for files to compile.
1>Compiling and Linking
c:\users\sew\projects\mdm_d~1\dwh_br~1\src\phy\drv *************
1>‘nmake.exe /nologo BUILDMSG=Stop. -i BUILD_PASS=PASS2 LINKONLY=1
NOPASS0=1 MAKEDIR_RELATIVE_TO_BASEDIR=’
1>c:\users\sew\projects\mdm_d~1\dwh_br~1\src\phy\drv: TARGETPATH is …/…/…/bin
1> link.exe /out:…/…/…/bin\amd64\spaa_psy_win7_64.sys
/machine:amd64 @c:\users\sew\projects\mdm_d~1\dwh_br~1\src\phy\drv\objchk_win7_amd64\amd64\lnk.rsp
1>Microsoft (R) Incremental Linker Version 9.00.30729.207
1>Copyright (C) Microsoft Corporation. All rights reserved.
1>/MERGE:_PAGE=PAGE
1>/MERGE:_TEXT=.text
1>/SECTION:INIT,d
1>/OPT:REF
1>/OPT:ICF
1>/IGNORE:4198,4010,4037,4039,4065,4070,4078,4087,4089,4221,4108,4088,4218,4218,4235
1>/INCREMENTAL:NO
1>/release
1>/NODEFAULTLIB
1>/WX
1>/debug
1>/debugtype:cv,fixup,pdata
1>/version:6.1
1>/osversion:6.1
1>c:\WinDDK\760016~1.1\lib\win7\amd64\hotpatch.obj
1>/functionpadmin:6
1>/pdbcompress
1>/STACK:0x40000,0x1000
1>/driver /driver:wdm
1>/base:0x10000
1>/align:0x0080
1>/subsystem:native,1.10
1>/entry:GsDriverEntry
1>/out:…/…/…/bin\amd64\spaa_psy_win7_64.sys
1>c:\users\sew\projects\mdm_d~1\dwh_br~1\src\phy\drv\objchk_win7_amd64\amd64\driver.obj
1>c:\users\sew\projects\mdm_d~1\dwh_br~1\src\phy\drv\objchk_win7_amd64\amd64\psy_util.obj
1>c:\WinDDK\760016~1.1\lib\win7\amd64\BufferOverflowK.lib
1>c:\WinDDK\760016~1.1\lib\win7\amd64\wdm.lib
1>…/…/common/wdm/stdlib/objchk_win7_amd64/amd64/spaa_lwdm.lib
1>driver.obj : MSIL .netmodule or module compiled with /GL found;
restarting link with /LTCG; add /LTCG to the link command line to
improve linker performance
1>Microsoft (R) Incremental Linker Version 9.00.30729.207
1>Copyright (C) Microsoft Corporation. All rights reserved.
1>/MERGE:_PAGE=PAGE
1>/MERGE:_TEXT=.text
1>/SECTION:INIT,d
1>/OPT:REF
1>/OPT:ICF
1>/IGNORE:4198,4010,4037,4039,4065,4070,4078,4087,4089,4221,4108,4088,4218,4218,4235
1>/INCREMENTAL:NO
1>/release
1>/NODEFAULTLIB
1>/WX
1>/debug
1>/debugtype:cv,fixup,pdata
1>/version:6.1
1>/osversion:6.1
1>c:\WinDDK\760016~1.1\lib\win7\amd64\hotpatch.obj
1>/functionpadmin:6
1>/pdbcompress
1>/STACK:0x40000,0x1000
1>/driver /driver:wdm
1>/base:0x10000
1>/align:0x0080
1>/subsystem:native,1.10
1>/entry:GsDriverEntry
1>/out:…/…/…/bin\amd64\spaa_psy_win7_64.sys
1>c:\users\sew\projects\mdm_d~1\dwh_br~1\src\phy\drv\objchk_win7_amd64\amd64\driver.obj
1>c:\users\sew\projects\mdm_d~1\dwh_br~1\src\phy\drv\objchk_win7_amd64\amd64\psy_util.obj
1>c:\WinDDK\760016~1.1\lib\win7\amd64\BufferOverflowK.lib
1>c:\WinDDK\760016~1.1\lib\win7\amd64\wdm.lib
1>…/…/common/wdm/stdlib/objchk_win7_amd64/amd64/spaa_lwdm.lib
1>spaa_lwdm.lib(lwdm_common.obj) : error LNK2001: unresolved external
symbol __imp_IoConnectInterruptEx
1>errors in directory c:\users\sew\projects\mdm_d~1\dwh_br~1\src\phy\drv
1>c:\users\sew\projects\mdm_d~1\dwh_br~1\src\phy\drv\spaa_lwdm.lib(lwdm_common.obj)
: error LNK2001: unresolved external symbol __imp_IoConnectInterruptEx
1>spaa_lwdm.lib(lwdm_common.obj) : error LNK2001: unresolved external
symbol __imp_IoDisconnectInterruptEx
1>c:\users\sew\projects\mdm_d~1\dwh_br~1\src\phy\drv\spaa_lwdm.lib(lwdm_common.obj)
: error LNK2001: unresolved external symbol
__imp_IoDisconnectInterruptEx
1>…/…/…/bin\amd64\spaa_psy_win7_64.sys : fatal error LNK1120: 2
unresolved externals
1>c:\users\sew\projects\mdm_d~1\dwh_br~1/bin\amd64\spaa_psy_win7_64.sys
: error LNK1120: 2 unresolved externals

2012/1/29 Martin O’Brien :
> Could you post your build log?
>
>
> mm
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of solotim
> Sent: Saturday, January 28, 2012 8:02 PM
> To: Windows System Software Devs Interest List
> Subject: Re: [ntdev] IoConnectInterruptEx needs extra lib on Win7?
>
> Hi Doron,
>
> I’m back after a long vacation.
> I disabled all “include <iointex.h>” statements in the library code and
> built a new lib, but it doesn’t resolve the problem. Later I just stopped
> using that library and tried to call IoConnectInterruptEx directly in my own
> driver code, the same error happens again. I’m sure that no iointex get
> involved in my code. (I used to use grep command in msys terminal)
>
> The command I used to compile the driver is:
> c:\WinDDK\ddkbuild.cmd -W7X64 chk .
>
> Any suggestion? Thanks.
>
> Regards,
> solotim
>
> 2012/1/21 Doron Holan :
>> By the way, I didn’t know the answer immediately. All I did was run
>>
>> Findstr IoConnectInterruptEx *
>>
>> In the ddk’s inc\ddk directory, saw this header and wdm.h as the 2
>> hits and opened up both to see what they contained.
>>
>> d
>>
>> debt from my phone
>> ________________________________
>> From: solotim
>> Sent: 1/21/2012 3:35 AM
>>
>> To: Windows System Software Devs Interest List
>> Subject: Re: [ntdev] IoConnectInterruptEx needs extra lib on Win7?
>>
>> AH. That might be the reason, I’ll check that. I’m not the author of
>> that library… Thank you !
>>
>> 2012/1/21 Doron Holan :
>>> Are you including iointex.h? if so, stop including it and use the
>>> definition in wdm.h or ntddk.h
>>>
>>> d
>>>
>>> -----Original Message-----
>>> From: xxxxx@lists.osr.com
>>> [mailto:xxxxx@lists.osr.com] On Behalf Of solotim
>>> Sent: Friday, January 20, 2012 8:23 PM
>>> To: Windows System Software Devs Interest List
>>> Subject: [ntdev] IoConnectInterruptEx needs extra lib on Win7?
>>>
>>> Hi all,
>>>
>>> My WDM driver can be built successfully when using traditional
>>> line-based interrupt handling, but it failed to link when I switch to
>>> IoConnectInterruptEx to handle MSI. mydriver.cpp depends on mywdm.lib.
>>> The errors are something like these:
>>>
>>> …\mywdm.lib(mywdm.obj) : error LNK2001: unresolved external symbol
>>> WdmlibIoConnectInterruptEx
>>> …\mywdm.lib(lmywdm.obj) : error LNK2001: unresolved external symbol
>>> WdmlibIoDisconnectInterruptEx
>>>
>>> I knew that I need to use Iointex.lib to compile the driver for
>>> pre-Vista version of Windows, but now I’m targeting Win7x64, why DDK
>>> complaints it? Do I need to explicitly specify any TARGETLIBS?
>>>
>>> Thanks.
>>>
>>> -solotim
>>>
>>> —
>>> NTDEV is sponsored by OSR
>>>
>>> For our schedule of WDF, WDM, debugging and other seminars visit:
>>> http://www.osr.com/seminars
>>>
>>> To unsubscribe, visit the List Server section of OSR Online at
>>> http://www.osronline.com/page.cfm?name=ListServer
>>>
>>>
>>>
>>> —
>>> NTDEV is sponsored by OSR
>>>
>>> For our schedule of WDF, WDM, debugging and other seminars visit:
>>> http://www.osr.com/seminars
>>>
>>> To unsubscribe, visit the List Server section of OSR Online at
>>> http://www.osronline.com/page.cfm?name=ListServer
>>
>> —
>> NTDEV is sponsored by OSR
>>
>> For our schedule of WDF, WDM, debugging and other seminars visit:
>> http://www.osr.com/seminars
>>
>> To unsubscribe, visit the List Server section of OSR Online at
>> http://www.osronline.com/page.cfm?name=ListServer
>>
>>
>> —
>> NTDEV is sponsored by OSR
>>
>> For our schedule of WDF, WDM, debugging and other seminars visit:
>> http://www.osr.com/seminars
>>
>> To unsubscribe, visit the List Server section of OSR Online at
>> http://www.osronline.com/page.cfm?name=ListServer
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer</iointex.h>

Thank you! It works.
Just curiosity, if the ‘wdm’ directive doesn’t mean anything, why it
is given as a optional directive, purely historical reason?
It sounds like that I’m pretty safe to ignore TARGETTYPE completely
for most of the conditions…

-solotim

2012/1/29 Doron Holan :
> This is a different error, now the missing resolved import is
> imp_IoConnectInterruptEx, not WdmlibIoConnectInterruptEx. This? is good.
> The fix is not to mark yourself as a wdm driver. This is a non wdm API. Just
> remove the wdm directive from your sources file. Wdm doesn’t mean anything
> anymore anyway, it hasn’t since win2k
>
> d
>
> debt from my phone
>
______________________________
> From: solotim
> Sent: 1/28/2012 8:43 PM
>
> To: Windows System Software Devs Interest List
> Subject: Re: [ntdev] IoConnectInterruptEx needs extra lib on Win7?
>
> Sure. This is the log when I build the driver with the my static lib.
>
> BUILD: Examining c:\users\sew\projects\mdm_d~1\dwh_br~1\src\phy\drv
> directory for files to compile.
> 1>Compiling and Linking
> c:\users\sew\projects\mdm_d~1\dwh_br~1\src\phy\drv *************
> 1>‘nmake.exe /nologo BUILDMSG=Stop. -i BUILD_PASS=PASS2 LINKONLY=1
> NOPASS0=1 MAKEDIR_RELATIVE_TO_BASEDIR=’
> 1>c:\users\sew\projects\mdm_d~1\dwh_br~1\src\phy\drv: TARGETPATH is
> …/…/…/bin
> 1> link.exe /out:…/…/…/bin\amd64\spaa_psy_win7_64.sys
> /machine:amd64
> @c:\users\sew\projects\mdm_d~1\dwh_br~1\src\phy\drv\objchk_win7_amd64\amd64\lnk.rsp
> 1>Microsoft (R) Incremental Linker Version 9.00.30729.207
> 1>Copyright (C) Microsoft Corporation.? All rights reserved.
> 1>/MERGE:_PAGE=PAGE
> 1>/MERGE:_TEXT=.text
> 1>/SECTION:INIT,d
> 1>/OPT:REF
> 1>/OPT:ICF
> 1>/IGNORE:4198,4010,4037,4039,4065,4070,4078,4087,4089,4221,4108,4088,4218,4218,4235
> 1>/INCREMENTAL:NO
> 1>/release
> 1>/NODEFAULTLIB
> 1>/WX
> 1>/debug
> 1>/debugtype:cv,fixup,pdata
> 1>/version:6.1
> 1>/osversion:6.1
> 1>c:\WinDDK\760016~1.1\lib\win7\amd64\hotpatch.obj
> 1>/functionpadmin:6
> 1>/pdbcompress
> 1>/STACK:0x40000,0x1000
> 1>/driver /driver:wdm
> 1>/base:0x10000
> 1>/align:0x0080
> 1>/subsystem:native,1.10
> 1>/entry:GsDriverEntry
> 1>/out:…/…/…/bin\amd64\spaa_psy_win7_64.sys
> 1>c:\users\sew\projects\mdm_d~1\dwh_br~1\src\phy\drv\objchk_win7_amd64\amd64\driver.obj
> 1>c:\users\sew\projects\mdm_d~1\dwh_br~1\src\phy\drv\objchk_win7_amd64\amd64\psy_util.obj
> 1>c:\WinDDK\760016~1.1\lib\win7\amd64\BufferOverflowK.lib
> 1>c:\WinDDK\760016~1.1\lib\win7\amd64\wdm.lib
> 1>…/…/common/wdm/stdlib/objchk_win7_amd64/amd64/spaa_lwdm.lib
> 1>driver.obj : MSIL .netmodule or module compiled with /GL found;
> restarting link with /LTCG; add /LTCG to the link command line to
> improve linker performance
> 1>Microsoft (R) Incremental Linker Version 9.00.30729.207
> 1>Copyright (C) Microsoft Corporation.? All rights reserved.
> 1>/MERGE:_PAGE=PAGE
> 1>/MERGE:_TEXT=.text
> 1>/SECTION:INIT,d
> 1>/OPT:REF
> 1>/OPT:ICF
> 1>/IGNORE:4198,4010,4037,4039,4065,4070,4078,4087,4089,4221,4108,4088,4218,4218,4235
> 1>/INCREMENTAL:NO
> 1>/release
> 1>/NODEFAULTLIB
> 1>/WX
> 1>/debug
> 1>/debugtype:cv,fixup,pdata
> 1>/version:6.1
> 1>/osversion:6.1
> 1>c:\WinDDK\760016~1.1\lib\win7\amd64\hotpatch.obj
> 1>/functionpadmin:6
> 1>/pdbcompress
> 1>/STACK:0x40000,0x1000
> 1>/driver /driver:wdm
> 1>/base:0x10000
> 1>/align:0x0080
> 1>/subsystem:native,1.10
> 1>/entry:GsDriverEntry
> 1>/out:…/…/…/bin\amd64\spaa_psy_win7_64.sys
> 1>c:\users\sew\projects\mdm_d~1\dwh_br~1\src\phy\drv\objchk_win7_amd64\amd64\driver.obj
> 1>c:\users\sew\projects\mdm_d~1\dwh_br~1\src\phy\drv\objchk_win7_amd64\amd64\psy_util.obj
> 1>c:\WinDDK\760016~1.1\lib\win7\amd64\BufferOverflowK.lib
> 1>c:\WinDDK\760016~1.1\lib\win7\amd64\wdm.lib
> 1>…/…/common/wdm/stdlib/objchk_win7_amd64/amd64/spaa_lwdm.lib
> 1>spaa_lwdm.lib(lwdm_common.obj) : error LNK2001: unresolved external
> symbol __imp_IoConnectInterruptEx
> 1>errors in directory c:\users\sew\projects\mdm_d~1\dwh_br~1\src\phy\drv
> 1>c:\users\sew\projects\mdm_d~1\dwh_br~1\src\phy\drv\spaa_lwdm.lib(lwdm_common.obj)
> : error LNK2001: unresolved external symbol__imp_IoConnectInterruptEx
> 1>spaa_lwdm.lib(lwdm_common.obj) : error LNK2001: unresolved external
> symbol __imp_IoDisconnectInterruptEx
> 1>c:\users\sew\projects\mdm_d~1\dwh_br~1\src\phy\drv\spaa_lwdm.lib(lwdm_common.obj)
> : error LNK2001: unresolved external symbol
>__imp_IoDisconnectInterruptEx
> 1>…/…/…/bin\amd64\spaa_psy_win7_64.sys : fatal error LNK1120: 2
> unresolved externals
> 1>c:\users\sew\projects\mdm_d~1\dwh_br~1/bin\amd64\spaa_psy_win7_64.sys
> : error LNK1120: 2 unresolved externals
>
>
> 2012/1/29 Martin O’Brien :
>> Could you post your build log?
>>
>>
>> mm
>>
>> -----Original Message-----
>> From: xxxxx@lists.osr.com
>> [mailto:xxxxx@lists.osr.com] On Behalf Of solotim
>> Sent: Saturday, January 28, 2012 8:02 PM
>> To: Windows System Software Devs Interest List
>> Subject: Re: [ntdev] IoConnectInterruptEx needs extra lib on Win7?
>>
>> Hi Doron,
>>
>> I’m back after a long vacation.
>> I disabled all “include <iointex.h>” statements in the library code and
>> built a new lib, but it doesn’t resolve the problem. Later I just stopped
>> using that library and tried to call IoConnectInterruptEx directly in my
>> own
>> driver code, the same error happens again. I’m sure that no iointex get
>> involved in my code. (I used to use grep command in msys terminal)
>>
>> The command I used to compile the driver is:
>> c:\WinDDK\ddkbuild.cmd -W7X64 chk .
>>
>> Any suggestion? Thanks.
>>
>> Regards,
>> solotim
>>
>> 2012/1/21 Doron Holan :
>>> By the way, I didn’t know the answer immediately. All I did was run
>>>
>>> Findstr IoConnectInterruptEx *
>>>
>>> In the ddk’s inc\ddk directory, saw this header and wdm.h as the 2
>>> hits and opened up both to see what they contained.
>>>
>>> d
>>>
>>> debt from my phone
>>> ________________________________
>>> From: solotim
>>> Sent: 1/21/2012 3:35 AM
>>>
>>> To: Windows System Software Devs Interest List
>>> Subject: Re: [ntdev] IoConnectInterruptEx needs extra lib on Win7?
>>>
>>> AH. That might be the reason, I’ll check that. I’m not the author of
>>> that library… Thank you !
>>>
>>> 2012/1/21 Doron Holan :
>>>> Are you including iointex.h? if so, stop including it and use the
>>>> definition in wdm.h or ntddk.h
>>>>
>>>> d
>>>>
>>>> -----Original Message-----
>>>> From: xxxxx@lists.osr.com
>>>> [mailto:xxxxx@lists.osr.com] On Behalf Of solotim
>>>> Sent: Friday, January 20, 2012 8:23 PM
>>>> To: Windows System Software Devs Interest List
>>>> Subject: [ntdev] IoConnectInterruptEx needs extra lib on Win7?
>>>>
>>>> Hi all,
>>>>
>>>> My WDM driver can be built successfully when using traditional
>>>> line-based interrupt handling, but it failed to link when I switch to
>>>> IoConnectInterruptEx to handle MSI. mydriver.cpp depends on mywdm.lib.
>>>> The errors are something like these:
>>>>
>>>> …\mywdm.lib(mywdm.obj) : error LNK2001: unresolved external symbol
>>>> WdmlibIoConnectInterruptEx
>>>> …\mywdm.lib(lmywdm.obj) : error LNK2001: unresolved external symbol
>>>> WdmlibIoDisconnectInterruptEx
>>>>
>>>> I knew that I need to use Iointex.lib to compile the driver for
>>>> pre-Vista version of Windows, but now I’m targeting Win7x64, why DDK
>>>> complaints it? Do I need to explicitly specify any TARGETLIBS?
>>>>
>>>> Thanks.
>>>>
>>>> -solotim
>>>>
>>>> —
>>>> NTDEV is sponsored by OSR
>>>>
>>>> For our schedule of WDF, WDM, debugging and other seminars visit:
>>>> http://www.osr.com/seminars
>>>>
>>>> To unsubscribe, visit the List Server section of OSR Online at
>>>> http://www.osronline.com/page.cfm?name=ListServer
>>>>
>>>>
>>>>
>>>> —
>>>> NTDEV is sponsored by OSR
>>>>
>>>> For our schedule of WDF, WDM, debugging and other seminars visit:
>>>> http://www.osr.com/seminars
>>>>
>>>> To unsubscribe, visit the List Server section of OSR Online at
>>>> http://www.osronline.com/page.cfm?name=ListServer
>>>
>>> —
>>> NTDEV is sponsored by OSR
>>>
>>> For our schedule of WDF, WDM, debugging and other seminars visit:
>>> http://www.osr.com/seminars
>>>
>>> To unsubscribe, visit the List Server section of OSR Online at
>>> http://www.osronline.com/page.cfm?name=ListServer
>>>
>>>
>>> —
>>> NTDEV is sponsored by OSR
>>>
>>> For our schedule of WDF, WDM, debugging and other seminars visit:
>>> http://www.osr.com/seminars
>>>
>>> To unsubscribe, visit the List Server section of OSR Online at
>>> http://www.osronline.com/page.cfm?name=ListServer
>>
>> —
>> NTDEV is sponsored by OSR
>>
>> For our schedule of WDF, WDM, debugging and other seminars visit:
>> http://www.osr.com/seminars
>>
>> To unsubscribe, visit the List Server section of OSR Online at
>> http://www.osronline.com/page.cfm?name=ListServer
>>
>>
>> —
>> NTDEV is sponsored by OSR
>>
>> For our schedule of WDF, WDM, debugging and other seminars visit:
>> http://www.osr.com/seminars
>>
>> To unsubscribe, visit the List Server section of OSR Online at
>> http://www.osronline.com/page.cfm?name=ListServer
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer</iointex.h>

TARGETTYPE you always need. In your case, =DRIVER. what is optional is DRIVERTYPE=WDM

d

debt from my phone


From: solotim
Sent: 1/28/2012 9:50 PM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] IoConnectInterruptEx needs extra lib on Win7?

Thank you! It works.
Just curiosity, if the ‘wdm’ directive doesn’t mean anything, why it
is given as a optional directive, purely historical reason?
It sounds like that I’m pretty safe to ignore TARGETTYPE completely
for most of the conditions…

-solotim

2012/1/29 Doron Holan :
> This is a different error, now the missing resolved import is
> imp_IoConnectInterruptEx, not WdmlibIoConnectInterruptEx. This is good.
> The fix is not to mark yourself as a wdm driver. This is a non wdm API. Just
> remove the wdm directive from your sources file. Wdm doesn’t mean anything
> anymore anyway, it hasn’t since win2k
>
> d
>
> debt from my phone
>
______________________________
> From: solotim
> Sent: 1/28/2012 8:43 PM
>
> To: Windows System Software Devs Interest List
> Subject: Re: [ntdev] IoConnectInterruptEx needs extra lib on Win7?
>
> Sure. This is the log when I build the driver with the my static lib.
>
> BUILD: Examining c:\users\sew\projects\mdm_d~1\dwh_br~1\src\phy\drv
> directory for files to compile.
> 1>Compiling and Linking
> c:\users\sew\projects\mdm_d~1\dwh_br~1\src\phy\drv *************
> 1>‘nmake.exe /nologo BUILDMSG=Stop. -i BUILD_PASS=PASS2 LINKONLY=1
> NOPASS0=1 MAKEDIR_RELATIVE_TO_BASEDIR=’
> 1>c:\users\sew\projects\mdm_d~1\dwh_br~1\src\phy\drv: TARGETPATH is
> …/…/…/bin
> 1> link.exe /out:…/…/…/bin\amd64\spaa_psy_win7_64.sys
> /machine:amd64
> @c:\users\sew\projects\mdm_d~1\dwh_br~1\src\phy\drv\objchk_win7_amd64\amd64\lnk.rsp
> 1>Microsoft (R) Incremental Linker Version 9.00.30729.207
> 1>Copyright (C) Microsoft Corporation. All rights reserved.
> 1>/MERGE:_PAGE=PAGE
> 1>/MERGE:_TEXT=.text
> 1>/SECTION:INIT,d
> 1>/OPT:REF
> 1>/OPT:ICF
> 1>/IGNORE:4198,4010,4037,4039,4065,4070,4078,4087,4089,4221,4108,4088,4218,4218,4235
> 1>/INCREMENTAL:NO
> 1>/release
> 1>/NODEFAULTLIB
> 1>/WX
> 1>/debug
> 1>/debugtype:cv,fixup,pdata
> 1>/version:6.1
> 1>/osversion:6.1
> 1>c:\WinDDK\760016~1.1\lib\win7\amd64\hotpatch.obj
> 1>/functionpadmin:6
> 1>/pdbcompress
> 1>/STACK:0x40000,0x1000
> 1>/driver /driver:wdm
> 1>/base:0x10000
> 1>/align:0x0080
> 1>/subsystem:native,1.10
> 1>/entry:GsDriverEntry
> 1>/out:…/…/…/bin\amd64\spaa_psy_win7_64.sys
> 1>c:\users\sew\projects\mdm_d~1\dwh_br~1\src\phy\drv\objchk_win7_amd64\amd64\driver.obj
> 1>c:\users\sew\projects\mdm_d~1\dwh_br~1\src\phy\drv\objchk_win7_amd64\amd64\psy_util.obj
> 1>c:\WinDDK\760016~1.1\lib\win7\amd64\BufferOverflowK.lib
> 1>c:\WinDDK\760016~1.1\lib\win7\amd64\wdm.lib
> 1>…/…/common/wdm/stdlib/objchk_win7_amd64/amd64/spaa_lwdm.lib
> 1>driver.obj : MSIL .netmodule or module compiled with /GL found;
> restarting link with /LTCG; add /LTCG to the link command line to
> improve linker performance
> 1>Microsoft (R) Incremental Linker Version 9.00.30729.207
> 1>Copyright (C) Microsoft Corporation. All rights reserved.
> 1>/MERGE:_PAGE=PAGE
> 1>/MERGE:_TEXT=.text
> 1>/SECTION:INIT,d
> 1>/OPT:REF
> 1>/OPT:ICF
> 1>/IGNORE:4198,4010,4037,4039,4065,4070,4078,4087,4089,4221,4108,4088,4218,4218,4235
> 1>/INCREMENTAL:NO
> 1>/release
> 1>/NODEFAULTLIB
> 1>/WX
> 1>/debug
> 1>/debugtype:cv,fixup,pdata
> 1>/version:6.1
> 1>/osversion:6.1
> 1>c:\WinDDK\760016~1.1\lib\win7\amd64\hotpatch.obj
> 1>/functionpadmin:6
> 1>/pdbcompress
> 1>/STACK:0x40000,0x1000
> 1>/driver /driver:wdm
> 1>/base:0x10000
> 1>/align:0x0080
> 1>/subsystem:native,1.10
> 1>/entry:GsDriverEntry
> 1>/out:…/…/…/bin\amd64\spaa_psy_win7_64.sys
> 1>c:\users\sew\projects\mdm_d~1\dwh_br~1\src\phy\drv\objchk_win7_amd64\amd64\driver.obj
> 1>c:\users\sew\projects\mdm_d~1\dwh_br~1\src\phy\drv\objchk_win7_amd64\amd64\psy_util.obj
> 1>c:\WinDDK\760016~1.1\lib\win7\amd64\BufferOverflowK.lib
> 1>c:\WinDDK\760016~1.1\lib\win7\amd64\wdm.lib
> 1>…/…/common/wdm/stdlib/objchk_win7_amd64/amd64/spaa_lwdm.lib
> 1>spaa_lwdm.lib(lwdm_common.obj) : error LNK2001: unresolved external
> symbol __imp_IoConnectInterruptEx
> 1>errors in directory c:\users\sew\projects\mdm_d~1\dwh_br~1\src\phy\drv
> 1>c:\users\sew\projects\mdm_d~1\dwh_br~1\src\phy\drv\spaa_lwdm.lib(lwdm_common.obj)
> : error LNK2001: unresolved external symbol__imp_IoConnectInterruptEx
> 1>spaa_lwdm.lib(lwdm_common.obj) : error LNK2001: unresolved external
> symbol __imp_IoDisconnectInterruptEx
> 1>c:\users\sew\projects\mdm_d~1\dwh_br~1\src\phy\drv\spaa_lwdm.lib(lwdm_common.obj)
> : error LNK2001: unresolved external symbol
>__imp_IoDisconnectInterruptEx
> 1>…/…/…/bin\amd64\spaa_psy_win7_64.sys : fatal error LNK1120: 2
> unresolved externals
> 1>c:\users\sew\projects\mdm_d~1\dwh_br~1/bin\amd64\spaa_psy_win7_64.sys
> : error LNK1120: 2 unresolved externals
>
>
> 2012/1/29 Martin O’Brien :
>> Could you post your build log?
>>
>>
>> mm
>>
>> -----Original Message-----
>> From: xxxxx@lists.osr.com
>> [mailto:xxxxx@lists.osr.com] On Behalf Of solotim
>> Sent: Saturday, January 28, 2012 8:02 PM
>> To: Windows System Software Devs Interest List
>> Subject: Re: [ntdev] IoConnectInterruptEx needs extra lib on Win7?
>>
>> Hi Doron,
>>
>> I’m back after a long vacation.
>> I disabled all “include <iointex.h>” statements in the library code and
>> built a new lib, but it doesn’t resolve the problem. Later I just stopped
>> using that library and tried to call IoConnectInterruptEx directly in my
>> own
>> driver code, the same error happens again. I’m sure that no iointex get
>> involved in my code. (I used to use grep command in msys terminal)
>>
>> The command I used to compile the driver is:
>> c:\WinDDK\ddkbuild.cmd -W7X64 chk .
>>
>> Any suggestion? Thanks.
>>
>> Regards,
>> solotim
>>
>> 2012/1/21 Doron Holan :
>>> By the way, I didn’t know the answer immediately. All I did was run
>>>
>>> Findstr IoConnectInterruptEx *
>>>
>>> In the ddk’s inc\ddk directory, saw this header and wdm.h as the 2
>>> hits and opened up both to see what they contained.
>>>
>>> d
>>>
>>> debt from my phone
>>> ________________________________
>>> From: solotim
>>> Sent: 1/21/2012 3:35 AM
>>>
>>> To: Windows System Software Devs Interest List
>>> Subject: Re: [ntdev] IoConnectInterruptEx needs extra lib on Win7?
>>>
>>> AH. That might be the reason, I’ll check that. I’m not the author of
>>> that library… Thank you !
>>>
>>> 2012/1/21 Doron Holan :
>>>> Are you including iointex.h? if so, stop including it and use the
>>>> definition in wdm.h or ntddk.h
>>>>
>>>> d
>>>>
>>>> -----Original Message-----
>>>> From: xxxxx@lists.osr.com
>>>> [mailto:xxxxx@lists.osr.com] On Behalf Of solotim
>>>> Sent: Friday, January 20, 2012 8:23 PM
>>>> To: Windows System Software Devs Interest List
>>>> Subject: [ntdev] IoConnectInterruptEx needs extra lib on Win7?
>>>>
>>>> Hi all,
>>>>
>>>> My WDM driver can be built successfully when using traditional
>>>> line-based interrupt handling, but it failed to link when I switch to
>>>> IoConnectInterruptEx to handle MSI. mydriver.cpp depends on mywdm.lib.
>>>> The errors are something like these:
>>>>
>>>> …\mywdm.lib(mywdm.obj) : error LNK2001: unresolved external symbol
>>>> WdmlibIoConnectInterruptEx
>>>> …\mywdm.lib(lmywdm.obj) : error LNK2001: unresolved external symbol
>>>> WdmlibIoDisconnectInterruptEx
>>>>
>>>> I knew that I need to use Iointex.lib to compile the driver for
>>>> pre-Vista version of Windows, but now I’m targeting Win7x64, why DDK
>>>> complaints it? Do I need to explicitly specify any TARGETLIBS?
>>>>
>>>> Thanks.
>>>>
>>>> -solotim
>>>>
>>>> —
>>>> NTDEV is sponsored by OSR
>>>>
>>>> For our schedule of WDF, WDM, debugging and other seminars visit:
>>>> http://www.osr.com/seminars
>>>>
>>>> To unsubscribe, visit the List Server section of OSR Online at
>>>> http://www.osronline.com/page.cfm?name=ListServer
>>>>
>>>>
>>>>
>>>> —
>>>> NTDEV is sponsored by OSR
>>>>
>>>> For our schedule of WDF, WDM, debugging and other seminars visit:
>>>> http://www.osr.com/seminars
>>>>
>>>> To unsubscribe, visit the List Server section of OSR Online at
>>>> http://www.osronline.com/page.cfm?name=ListServer
>>>
>>> —
>>> NTDEV is sponsored by OSR
>>>
>>> For our schedule of WDF, WDM, debugging and other seminars visit:
>>> http://www.osr.com/seminars
>>>
>>> To unsubscribe, visit the List Server section of OSR Online at
>>> http://www.osronline.com/page.cfm?name=ListServer
>>>
>>>
>>> —
>>> NTDEV is sponsored by OSR
>>>
>>> For our schedule of WDF, WDM, debugging and other seminars visit:
>>> http://www.osr.com/seminars
>>>
>>> To unsubscribe, visit the List Server section of OSR Online at
>>> http://www.osronline.com/page.cfm?name=ListServer
>>
>> —
>> NTDEV is sponsored by OSR
>>
>> For our schedule of WDF, WDM, debugging and other seminars visit:
>> http://www.osr.com/seminars
>>
>> To unsubscribe, visit the List Server section of OSR Online at
>> http://www.osronline.com/page.cfm?name=ListServer
>>
>>
>> —
>> NTDEV is sponsored by OSR
>>
>> For our schedule of WDF, WDM, debugging and other seminars visit:
>> http://www.osr.com/seminars
>>
>> To unsubscribe, visit the List Server section of OSR Online at
>> http://www.osronline.com/page.cfm?name=ListServer
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer</iointex.h>

solotim wrote:

Thank you! It works.
Just curiosity, if the ‘wdm’ directive doesn’t mean anything, why it
is given as a optional directive, purely historical reason?

Because some people still build drivers for Win98 and Windows 2000.
Those people need to worry about the WDM subset.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.