Google 网上论坛不再支持新的 Usenet 帖子或订阅项。历史内容仍可供查看。

StrStr() not in some versions of Shell32.dll?

已查看 42 次
跳至第一个未读帖子

Phil Himsworth

未读,
2002年4月9日 18:02:372002/4/9
收件人
I've been developing a program on Windows 2000 which ran fine on that OS,
but didn't run at all on a Windows 98 machine... the problem was traced to
the function StrStr() not being found in Shell32.dll in Win98.

The platform SDK mentions nothing of this, so what's going on? Is it because
the program was linked on a Win2000 machine?

I've got round the problem so far by writing my own version of StrStr, but
this seems a bit wasteful... but if StrStr won't work on Win9x, it seems I
have no choice...

Ta

Phil, just me


Chris

未读,
2002年4月10日 11:10:142002/4/10
收件人
Link against SHLWAPI.DLL.
There are no string commands in SHELL32.DLL on the "old" types of
Windows: 95, 98 or ME

Regards
Chris

Alex Blekhman

未读,
2002年4月10日 11:40:342002/4/10
收件人
"Chris" <dsl...@vip.cybercity.dk> wrote in message
news:3cb45599...@news.cybercity.dk...

> Link against SHLWAPI.DLL.
> There are no string commands in SHELL32.DLL on the "old" types of
> Windows: 95, 98 or ME

..or use standard strstr() from C/C++ Runtime Library.


Phil Himsworth

未读,
2002年4月10日 14:12:112002/4/10
收件人
Alex Blekhman <tkfx....@yahoo.com> slipped me a tenner and said,

> > Link against SHLWAPI.DLL.
> > There are no string commands in SHELL32.DLL on the "old" types of
> > Windows: 95, 98 or ME
>
> ..or use standard strstr() from C/C++ Runtime Library.

I'm trying to avoid that to get round this CRT/CreateThread malarkey... I've
no idea what it is other than 'bad' so I thought it'd be easier if I just
avoided any functions from it. Which isn't too bad; the only function I've
not found in the Win32 API is atoi(), but I managed to find the source and
it's tiny anyway, so that's not a problem.

If I link with shlwapi.dll will it know to use that rather than the Shell32
one? I seem to remember I'm #including shlwapi.h but I don't recall linking
to it...

Ta muchly,

Phil, just me


Michael Daniloff

未读,
2002年4月10日 15:23:212002/4/10
收件人
"Phil Himsworth" <ph...@flippet.neeeet> wrote in message news:<a8voc7$c8v$1...@news6.svr.pol.co.uk>...

StrStr is in Shlwapi.dll (version 4.71), not in Shell32.
According to Platform SDK it is available on Win98.

You can investigate Shlwapi.dll on your Win98 machine.
Get the version, run dumpbin, etc...

Regards,

Michael

Chris

未读,
2002年4月11日 11:39:442002/4/11
收件人
On Wed, 10 Apr 2002 19:12:11 +0100, "Phil Himsworth"
<ph...@flippet.neeeet> wrote:

>the only function I've
>not found in the Win32 API is atoi(), but I managed to find the source and
>it's tiny anyway, so that's not a problem.

In SHLWAPI there is also StrToInt which is the equivalent to atoi in
MSVCRT.

Regards
Chris

Phil Himsworth

未读,
2002年4月11日 14:10:172002/4/11
收件人
Chris <dsl...@vip.cybercity.dk> slipped me a tenner and said,

> In SHLWAPI there is also StrToInt which is the equivalent to atoi in
> MSVCRT.

Ooo, handy... ta...

Phil, just me

Andy Lutomirski

未读,
2002年4月12日 10:42:432002/4/12
收件人

"Phil Himsworth" <ph...@flippet.neeeet> wrote in message
news:a91v84$i5m$1...@newsg1.svr.pol.co.uk...

>
> I'm trying to avoid that to get round this CRT/CreateThread malarkey...
I've
> no idea what it is other than 'bad' so I thought it'd be easier if I just
> avoided any functions from it. Which isn't too bad; the only function I've
> not found in the Win32 API is atoi(), but I managed to find the source and
> it's tiny anyway, so that's not a problem.

All you need to do to ensure the CRT works is to use _beginthreadex instead
of CreateThread. Still a pain, though.

Andy

0 个新帖子