From: Manfred Wilner on
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
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
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
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
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.
> .
>