Hi ,
This is poorani.
I am facing ?ATL/Com dll registration failure in XP and 2k3 when we build the COM dll using WDK7600 build environment? issue.
-
Build the ATL/Comcomponent using the ?WDK7600 ?Win7? Build environment. The ATL/Com component are not registering in the XP and Win2003 but installing in Win7 and Vista. Same issue is seen when we build the ATL/Com component using the ?WDK7600-WindowsVista and Windows Server 2008? build environment.
-
Build the ATL/Com component using the ?WDK7600 ?Windows server 2003? Build environment. The ATL/Com component are registering in the XP, Win2003, Win7 and Vista. But the WSD supported API?s are not present in this .We have to use the WSD API to support the WSD port in our driver.
-
Build the ATL/Com component using the ?WDK7600 ?Windows XP? Build environment. The CIO component are installing in the XP, Win2003, Win7 and Vista in 32 bit.
-
If we set _NT_TARGET_VERSION= $(_NT_TARGET_VERSION_WINXP) or _NT_TARGET_VERSION_WS03 entry in sources file then build the ATL/Com component in the ?WDK7600 ?Win7? Build environment .COM dll registered properly in XP. Also in Vista and Win7. But the WSD supported API not present in this.
I m using the WDK 7600 Version: 7600.16385.0
The same issue is seen with WDK6000 Build Environment.
Basically the Com Dll registration is started failing from WDK-Vista Build Environment.
Please help me out to resolve the issue.
Thanks for your help.
Does the dll even load in the failure case? You can run depends.exe and see if all of the imports are present on xp.
d
tiny phone keyboard + fat thumbs = you do the muth
-----Original Message-----
From: xxxxx@gmail.com
Sent: Tuesday, February 02, 2010 8:02 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] WDK7600 Build environment issue
Hi ,
This is poorani.
I am facing ?ATL/Com dll registration failure in XP and 2k3 when we build the COM dll using WDK7600 build environment? issue.
1. Build the ATL/Comcomponent using the ?WDK7600 ?Win7? Build environment. The ATL/Com component are not registering in the XP and Win2003 but installing in Win7 and Vista. Same issue is seen when we build the ATL/Com component using the ?WDK7600-WindowsVista and Windows Server 2008? build environment.
2. Build the ATL/Com component using the ?WDK7600 ?Windows server 2003? Build environment. The ATL/Com component are registering in the XP, Win2003, Win7 and Vista. But the WSD supported API?s are not present in this .We have to use the WSD API to support the WSD port in our driver.
3. Build the ATL/Com component using the ?WDK7600 ?Windows XP? Build environment. The CIO component are installing in the XP, Win2003, Win7 and Vista in 32 bit.
4. If we set _NT_TARGET_VERSION= $(_NT_TARGET_VERSION_WINXP) or _NT_TARGET_VERSION_WS03 entry in sources file then build the ATL/Com component in the ?WDK7600 ?Win7? Build environment .COM dll registered properly in XP. Also in Vista and Win7. But the WSD supported API not present in this.
I m using the WDK 7600 Version: 7600.16385.0
The same issue is seen with WDK6000 Build Environment.
Basically the Com Dll registration is started failing from WDK-Vista Build Environment.
Please help me out to resolve the issue.
Thanks for your help.
—
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
I have verified in depends.exe.Depended dll are loaded properly in Failure case.
Did you run depends.exe on the xp machine or the machine you built the dll on. Have you debugged the registration code in your dll?
d
tiny phone keyboard + fat thumbs = you do the muth
-----Original Message-----
From: xxxxx@gmail.com
Sent: Tuesday, February 02, 2010 8:45 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] WDK7600 Build environment issue
I have verified in depends.exe.Depended dll are loaded properly in Failure case.
—
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
>WSD supported API?s are not present in this
Then the API is not present in pre-Vista OS.
Why do you think that this API is not Vista+ only?
–
Maxim S. Shatskih
Windows DDK MVP
xxxxx@storagecraft.com
http://www.storagecraft.com
I have verified the depends.exe in xp machine.Depended dll are loaded properly in XP.
I was trying to debug the Dll register code in xp but the breakpoints was not hitting in dllregister function in my code.
When i am trying to register the COM dll in XP machine(using regsvr32 ), i m getting the Below error.
“Load Library (C:\winnt\system32\test.dll”) Failed-The specified procedure could not be found"
Thanks.
Google for ntdll!ShowSnaps, this is the way to turn on DbgPrints about any missing exports.
Then run rundll32 under the debugger.
I think there was also ShowLoaderSnaps value in the registry - for Image File Execution Options or something like.
–
Maxim S. Shatskih
Windows DDK MVP
xxxxx@storagecraft.com
http://www.storagecraft.com
wrote in message news:xxxxx@ntdev…
>I have verified the depends.exe in xp machine.Depended dll are loaded properly in XP.
> I was trying to debug the Dll register code in xp but the breakpoints was not hitting in dllregister function in my code.
>
> When i am trying to register the COM dll in XP machine(using regsvr32 ), i m getting the Below error.
> “Load Library (C:\winnt\system32\test.dll”) Failed-The specified procedure could not be found"
>
> Thanks.
>
Or run gflags and it will set the snaps for you
d
tiny phone keyboard + fat thumbs = you do the muth
-----Original Message-----
From: Maxim S. Shatskih
Sent: Tuesday, February 02, 2010 9:05 PM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] WDK7600 Build environment issue
Google for ntdll!ShowSnaps, this is the way to turn on DbgPrints about any missing exports.
Then run rundll32 under the debugger.
I think there was also ShowLoaderSnaps value in the registry - for Image File Execution Options or something like.
–
Maxim S. Shatskih
Windows DDK MVP
xxxxx@storagecraft.com
http://www.storagecraft.com
wrote in message news:xxxxx@ntdev…
>I have verified the depends.exe in xp machine.Depended dll are loaded properly in XP.
> I was trying to debug the Dll register code in xp but the breakpoints was not hitting in dllregister function in my code.
>
> When i am trying to register the COM dll in XP machine(using regsvr32 ), i m getting the Below error.
> “Load Library (C:\winnt\system32\test.dll”) Failed-The specified procedure could not be found"
>
> Thanks.
>
—
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
Could you please Expalin What is purpose of running GFLags?How to run that.
Thanks…
Check out the books Windows Internals or Advanced Windows Debugging. Good
discussions on it written by guys much smarter than me…it’s basically used
to set a global variable which contains the settings for all sorts of
debugging, tracing, etc.
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@gmail.com
Sent: Tuesday, February 02, 2010 9:57 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] WDK7600 Build environment issue
Could you please Expalin What is purpose of running GFLags?How to run that.
Thanks…
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
I would use depends/dumpbin and view the export table of the DLL you’re
supposed to be linking against and view the import table of the exe that
loads it. Maybe use process explorer, etc, to verify exactly which DLL/path
it is in fact loading. The Microsoft logger.exe tool (which ships with
debugging tools for windows) may be of some help. You could run regsvr32
under it and have it hook LoadLibrary, GetProcAddress, etc, and perhaps that
will tell you just what’s going on.
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@gmail.com
Sent: Tuesday, February 02, 2010 9:00 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] WDK7600 Build environment issue
I have verified the depends.exe in xp machine.Depended dll are loaded
properly in XP.
I was trying to debug the Dll register code in xp but the breakpoints was
not hitting in dllregister function in my code.
When i am trying to register the COM dll in XP machine(using regsvr32 ), i m
getting the Below error.
“Load Library (C:\winnt\system32\test.dll”) Failed-The specified procedure
could not be found"
Thanks.
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
i have verified the exported function in depends.exe .Everything is fine.
My Doubt is why COM dll registration is failing in XP and 2003 not in vista and Win7 when we build the dll using WDK7600-win7 Build Environment.If we build the same dll in the DDK version then registration fine all os.[We have migrated the Build Environment from DDK 3670 to WDK 7600.After migration only we are facing thsi issue.]
Process Explorer and Process Monitor tool also used to verify this issue.I could not get much information that.
xxxxx@gmail.com wrote:
i have verified the exported function in depends.exe .Everything is fine.
My Doubt is why COM dll registration is failing in XP and 2003 not in vista and Win7 when we build the dll using WDK7600-win7 Build Environment.If we build the same dll in the DDK version then registration fine all os.[We have migrated the Build Environment from DDK 3670 to WDK 7600.After migration only we are facing thsi issue.]
The PE header in executable files has a field that marks the minimum
operating system where the file will run. The later versions of the DDK
mark the executables with a version matching the build environment. If
you build an exe in the Win 7 build environment, it’s marked as
requiring Win 7.
It’s just that simple. That’s why we always suggest building in the
environment for the oldest ystem you need to support.
–
Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.
> My Doubt is why COM dll registration is failing in XP and 2003 not in vista and Win7 when we build
the dll using WDK7600-win7 Build Environment
Any code which will run on XP must be built by w2k or XP build env.
–
Maxim S. Shatskih
Windows DDK MVP
xxxxx@storagecraft.com
http://www.storagecraft.com
Thank you for your information.
Just want to clarify my understanding is correct or not.If we are supporting the OS from Windows 2k3 to Win7 then we have to use the W2k3 Environment to build.
One more doubt - If i add IFunctionDiscovery in my code and Build it in Win700-w2k3 build environment then getting the build error in IFunctionDiscovery(IFunctionDiscovery is supported from Vista On wards).How to resolve that?Basically we want to support single dll for all the OS.Is it possible?
Thank you for your help.
Put this in your sources file
_NT_TARGET_VERSION=$(_NT_TARGET_VERSION_WINXP)
NTDDI_VERSION=NTDDI_VISTA
_NT_TARGET_VERSION sets the default versions for a variety of settings, including NTDDI_VERSION. These settings all say you are target XP. Specifying NTDDI_VERSION then overrides the default value that _NT_TARGET_VERSION sets, which says that want to use the APIs available in Vista and earlier.
It is now up to you to make sure you do not import anything XP does not export. COM interfaces are easier to manage since you typically do not import anything new to support a new COM interface, just a new QI() call.
d
-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@gmail.com
Sent: Wednesday, February 03, 2010 8:07 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] WDK7600 Build environment issue
Thank you for your information.
Just want to clarify my understanding is correct or not.If we are supporting the OS from Windows 2k3 to Win7 then we have to use the W2k3 Environment to build.
One more doubt - If i add IFunctionDiscovery in my code and Build it in Win700-w2k3 build environment then getting the build error in IFunctionDiscovery(IFunctionDiscovery is supported from Vista On wards).How to resolve that?Basically we want to support single dll for all the OS.Is it possible?
Thank you for your help.
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
if i include _NT_TARGET_VERSION=$(_NT_TARGET_VERSION_WINXP) NTDDI_VERSION=NTDDI_VISTA in the source file, still i am gettign the linker error for IFunctionDiscovery .
IFunctionDiscovery is an interface no? that means that there really should not be a lib to link against. What are the linker errors you are getting? … regardless, if you want one DLL to run on all OS’s, including XP which does not have funcdisc.dll on it, you will need to LoadLibrary the DLL and get the function pointers via GetProcAddress. Once you do this, you don’t need the lib when building.
d
-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@gmail.com
Sent: Wednesday, February 03, 2010 10:09 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] WDK7600 Build environment issue
if i include _NT_TARGET_VERSION=$(_NT_TARGET_VERSION_WINXP) NTDDI_VERSION=NTDDI_VISTA in the source file, still i am gettign the linker error for IFunctionDiscovery .
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
> One more doubt - If i add IFunctionDiscovery in my code and Build it in Win700-w2k3 build
environment then getting the build error in IFunctionDiscovery(IFunctionDiscovery is supported from
Vista On wards).How to resolve that?
This is correct. You cannot use IFunctionDiscovery on pre-Vista.
So, create 2 binaries - one pre-Vista not using IFunctionDiscovery, and one Vista+ using IFunctionDiscovery. Use the macros to build the 2 binaries off the same source.
Use Vista build env to build the Vista+ binary and XP build env to build the older one.
Or - even better, if possible - try to eliminate IFunctionDiscovery forever from your DLL, this will give you only 1 binary.
Or another way: emulate IFunctionDiscovery using, say, SetupDiXxx calls, for pre-Vista.
–
Maxim S. Shatskih
Windows DDK MVP
xxxxx@storagecraft.com
http://www.storagecraft.com
> if i include _NT_TARGET_VERSION=$(_NT_TARGET_VERSION_WINXP)
NTDDI_VERSION=NTDDI_VISTA in the source file, still i am gettign the linker error for
IFunctionDiscovery .
Wrong way. Even if you will build OK - the code will not work pre-Vista.
–
Maxim S. Shatskih
Windows DDK MVP
xxxxx@storagecraft.com
http://www.storagecraft.com