Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

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

42 views
Skip to first unread message

Phil Himsworth

unread,
Apr 9, 2002, 6:02:37 PM4/9/02
to
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

unread,
Apr 10, 2002, 11:10:14 AM4/10/02
to
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

unread,
Apr 10, 2002, 11:40:34 AM4/10/02
to
"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

unread,
Apr 10, 2002, 2:12:11 PM4/10/02
to
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

unread,
Apr 10, 2002, 3:23:21 PM4/10/02
to
"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

unread,
Apr 11, 2002, 11:39:44 AM4/11/02
to
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

unread,
Apr 11, 2002, 2:10:17 PM4/11/02
to
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

unread,
Apr 12, 2002, 10:42:43 AM4/12/02
to

"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 new messages