Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

Natural laws have no pity.


devel / comp.os.ms-windows.programmer.win32 / dll redirection

SubjectAuthor
* dll redirectionmuta...@gmail.com
`- dll redirectionJJ

1
dll redirection

<d5f82492-c24c-417e-a80f-b4caf21c1f07n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=9913&group=comp.os.ms-windows.programmer.win32#9913

  copy link   Newsgroups: comp.os.ms-windows.programmer.win32
X-Received: by 2002:a05:620a:461e:b0:762:5081:31a9 with SMTP id br30-20020a05620a461e00b00762508131a9mr90962qkb.0.1689611957479;
Mon, 17 Jul 2023 09:39:17 -0700 (PDT)
X-Received: by 2002:ad4:55f2:0:b0:635:dddc:1773 with SMTP id
bu18-20020ad455f2000000b00635dddc1773mr84290qvb.1.1689611957216; Mon, 17 Jul
2023 09:39:17 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.os.ms-windows.programmer.win32
Date: Mon, 17 Jul 2023 09:39:16 -0700 (PDT)
Injection-Info: google-groups.googlegroups.com; posting-host=136.158.103.73; posting-account=CeHKkQoAAAAowY1GfiJYG55VVc0s1zaG
NNTP-Posting-Host: 136.158.103.73
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <d5f82492-c24c-417e-a80f-b4caf21c1f07n@googlegroups.com>
Subject: dll redirection
From: mutazi...@gmail.com (muta...@gmail.com)
Injection-Date: Mon, 17 Jul 2023 16:39:17 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 2833
 by: muta...@gmail.com - Mon, 17 Jul 2023 16:39 UTC

I am trying the use of ".local" at the bottom of this:

https://learn.microsoft.com/en-us/windows/win32/dlls/dynamic-link-library-redirection

My application is called pdptest.exe so I created a dummy
text file called pdptest.exe.local

I wanted it to use my own msvcrt.dll in the same directory.

Nothing happened - it still used the normal one provided
by Windows 10.

Then I recompiled pdptest.exe - and voila, it worked - ie
it executed my msvcrt.dll when I ran pdptest.

Then I created another directory and copied pdptest.exe,
pdptest.exe.local and msvcrt.dll to it.

It didn't work - ie it went to the Windows-provided one.

Any idea what is happening?

Although that's still not what I want.

What I would like to be able to do is have my existing
unchanged executables that depend on msvcrt.dll and
that I have put into my c:\winpath execute an msvcrt.dll
from a specified directory, or follow the PATH variable
or some other variable. Or even if they execute an
msvcrt.dll that is in c:\winpath, that would also be ok.

I don't want to create a ".local" dummy file for every
single one of my executables. Nor do I want to change
any of my executables.

Any idea how to do that?

BTW, I wasn't able to rename msvcrt.dll to msvcrt.dxx
in c:\windows\syswow64 so that I could put in my own.

I really want different windows to be able to have a
different PATH variable, so normally syswow64 is
right, and default, but I in select windows I can
change my PATH and start getting my own msvcrt.dll
executed, because all the programs I will be running
will work nicely with that one.

I checked knowndlls as described here:

https://learn.microsoft.com/en-us/windows/win32/dlls/dynamic-link-library-search-order

and msvcrt is on the list.

Maybe I need to delete that?

Thanks. Paul.

Re: dll redirection

<6f0a4mc0sset.16dv94zvc7pn3$.dlg@40tude.net>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=9914&group=comp.os.ms-windows.programmer.win32#9914

  copy link   Newsgroups: comp.os.ms-windows.programmer.win32
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: jj4pub...@outlook.com (JJ)
Newsgroups: comp.os.ms-windows.programmer.win32
Subject: Re: dll redirection
Date: Tue, 18 Jul 2023 05:11:30 +0700
Organization: A noiseless patient Spider
Lines: 70
Message-ID: <6f0a4mc0sset.16dv94zvc7pn3$.dlg@40tude.net>
References: <d5f82492-c24c-417e-a80f-b4caf21c1f07n@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Injection-Info: dont-email.me; posting-host="cda2c0fbdc7dc5d91783619ac9cb3808";
logging-data="1445472"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/UOg2wVuf9lsBj8ALSuH5m9w1uye2Cj6w="
User-Agent: 40tude_Dialog/2.0.15.84
Cancel-Lock: sha1:pxfi9YttcGsEo7vFwNVENSZ6VA8=
X-Bitcoin: 1LcqwCQBQmhcWfWsVEAeyLchkAY8ZfuMnS
X-Face: \*\`0(1j~VfYC>ebz[&O.]=,Nm\oRM{of,liRO#7Eqi4|!]!(Gs=Akgh{J)605>C9Air?pa d{sSZ09u+A7f<^paR"/NH_#<mE1S"hde\c6PZLUB[t/s5-+Iu5DSc?P0+4%,Hl
 by: JJ - Mon, 17 Jul 2023 22:11 UTC

On Mon, 17 Jul 2023 09:39:16 -0700 (PDT), muta...@gmail.com wrote:
> I am trying the use of ".local" at the bottom of this:
>
> https://learn.microsoft.com/en-us/windows/win32/dlls/dynamic-link-library-redirection
>
> My application is called pdptest.exe so I created a dummy
> text file called pdptest.exe.local
>
> I wanted it to use my own msvcrt.dll in the same directory.
>
> Nothing happened - it still used the normal one provided
> by Windows 10.
>
> Then I recompiled pdptest.exe - and voila, it worked - ie
> it executed my msvcrt.dll when I ran pdptest.
>
> Then I created another directory and copied pdptest.exe,
> pdptest.exe.local and msvcrt.dll to it.
>
> It didn't work - ie it went to the Windows-provided one.
>
> Any idea what is happening?
>
> Although that's still not what I want.
>
> What I would like to be able to do is have my existing
> unchanged executables that depend on msvcrt.dll and
> that I have put into my c:\winpath execute an msvcrt.dll
> from a specified directory, or follow the PATH variable
> or some other variable. Or even if they execute an
> msvcrt.dll that is in c:\winpath, that would also be ok.
>
> I don't want to create a ".local" dummy file for every
> single one of my executables. Nor do I want to change
> any of my executables.
>
> Any idea how to do that?
>
> BTW, I wasn't able to rename msvcrt.dll to msvcrt.dxx
> in c:\windows\syswow64 so that I could put in my own.
>
> I really want different windows to be able to have a
> different PATH variable, so normally syswow64 is
> right, and default, but I in select windows I can
> change my PATH and start getting my own msvcrt.dll
> executed, because all the programs I will be running
> will work nicely with that one.
>
> I checked knowndlls as described here:
>
> https://learn.microsoft.com/en-us/windows/win32/dlls/dynamic-link-library-search-order
>
> and msvcrt is on the list.
>
> Maybe I need to delete that?
>
> Thanks. Paul.

If I understand it correctly, the priority of things which affect the DLL
loading is:

1. Application bitness. i.e. 32-bit or 64-bit.

2. Application manifest.

3. DLL redirection.

4. Safe DLL search mode.

5. DLL search order.

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor