Prev: virtual NIC and embedded Linux as USB Device connected to WinXP
Next: Best form to represent paths for both user-space and kernel?
From: Manfred Wilner on 9 Apr 2010 15:39 I have build a support DLL for modification of some printer properties and have now difficulties to link to the DLL and the functions in it. For 1. when looking into the DLL with Dependency Walker I see that there are two DLL's included which seem not to be on systems before Win 7 (IEShims.DLL and Wer.Dll) and 2. when trying to load the support DLL with LoadLibrary I get error 127 (The specified procedure could not be found) and the function fails to provide a handle and 3. When linking to the DLL I am getting a fatal error LNK1107: invalid or corrupt file: cannot read at 0x298 Is the reason for these errors in the incompatibility of the WDK and VS compiler? What can I do to overcome the problem? -- \Manfred
From: Maxim S. Shatskih on 9 Apr 2010 23:13 What tools and their build envs you used to build a DLL? The code built with Win7 build env will not run on pre-Win7 OSes. -- Maxim S. Shatskih Windows DDK MVP maxim(a)storagecraft.com http://www.storagecraft.com "Manfred Wilner" <mwilner(a)noemail.noemail> wrote in message news:7C38C95D-4734-4268-AD9A-7354431A4287(a)microsoft.com... >I have build a support DLL for modification of some printer properties and > have now difficulties to link to the DLL and the functions in it. > For 1. when looking into the DLL with Dependency Walker I see that there are > two DLL's included which seem not to be on systems before Win 7 (IEShims.DLL > and Wer.Dll) and > 2. when trying to load the support DLL with LoadLibrary I get error 127 (The > specified procedure could not be found) and the function fails to provide a > handle and > 3. When linking to the DLL I am getting a fatal error LNK1107: invalid or > corrupt file: cannot read at 0x298 > > Is the reason for these errors in the incompatibility of the WDK and VS > compiler? > What can I do to overcome the problem? > > -- > \Manfred >
From: Tim Roberts on 10 Apr 2010 00:15 Manfred Wilner <mwilner(a)noemail.noemail> wrote: > >I have build a support DLL for modification of some printer properties and >have now difficulties to link to the DLL and the functions in it. >For 1. when looking into the DLL with Dependency Walker I see that there are >two DLL's included which seem not to be on systems before Win 7 (IEShims.DLL >and Wer.Dll) and You will find those are "delay load" DLLs. It doesn't matter that they aren't present. >2. when trying to load the support DLL with LoadLibrary I get error 127 (The >specified procedure could not be found) and the function fails to provide a >handle and >3. When linking to the DLL I am getting a fatal error LNK1107: invalid or >corrupt file: cannot read at 0x298 If I had to guess, I'd guess that you built a 32-bit DLL and are trying to load it in a 64-bit application. -- Tim Roberts, timr(a)probo.com Providenza & Boekelheide, Inc.
From: Manfred Wilner on 7 May 2010 10:24 Thank you and sorry for not responding earlier but I got pulled away off what I was doing. I think you are right I am compiling the DLL in the WDK but within the Win Server 2008 x86 environment. And then I am testing in XP. I will recompile in XP and test again. -- \Manfred "Maxim S. Shatskih" wrote: > What tools and their build envs you used to build a DLL? > > The code built with Win7 build env will not run on pre-Win7 OSes. > > -- > Maxim S. Shatskih > Windows DDK MVP > maxim(a)storagecraft.com > http://www.storagecraft.com > > "Manfred Wilner" <mwilner(a)noemail.noemail> wrote in message news:7C38C95D-4734-4268-AD9A-7354431A4287(a)microsoft.com... > >I have build a support DLL for modification of some printer properties and > > have now difficulties to link to the DLL and the functions in it. > > For 1. when looking into the DLL with Dependency Walker I see that there are > > two DLL's included which seem not to be on systems before Win 7 (IEShims.DLL > > and Wer.Dll) and > > 2. when trying to load the support DLL with LoadLibrary I get error 127 (The > > specified procedure could not be found) and the function fails to provide a > > handle and > > 3. When linking to the DLL I am getting a fatal error LNK1107: invalid or > > corrupt file: cannot read at 0x298 > > > > Is the reason for these errors in the incompatibility of the WDK and VS > > compiler? > > What can I do to overcome the problem? > > > > -- > > \Manfred > > > . >
From: Manfred Wilner on 7 May 2010 10:25
Thank you and sorry for not responding earlier but I got pulled away off what I was doing. I think Maxim is right I am compiling the DLL in the WDK but within the Win Server 2008 x86 environment. And then I am testing in XP. I will recompile in XP and test again. -- \Manfred "Tim Roberts" wrote: > Manfred Wilner <mwilner(a)noemail.noemail> wrote: > > > >I have build a support DLL for modification of some printer properties and > >have now difficulties to link to the DLL and the functions in it. > >For 1. when looking into the DLL with Dependency Walker I see that there are > >two DLL's included which seem not to be on systems before Win 7 (IEShims.DLL > >and Wer.Dll) and > > You will find those are "delay load" DLLs. It doesn't matter that they > aren't present. > > >2. when trying to load the support DLL with LoadLibrary I get error 127 (The > >specified procedure could not be found) and the function fails to provide a > >handle and > >3. When linking to the DLL I am getting a fatal error LNK1107: invalid or > >corrupt file: cannot read at 0x298 > > If I had to guess, I'd guess that you built a 32-bit DLL and are trying to > load it in a 64-bit application. > -- > Tim Roberts, timr(a)probo.com > Providenza & Boekelheide, Inc. > . > |