[shell-coding] Re: Compiling LS modules with DEV-C++
- From: ilmcuts <ilmcuts@xxxxxxx>
- To: shell-coding@xxxxxxxxxxxxx
- Date: Tue, 18 Nov 2003 14:44:35 +0100
At 17:37 17.11.2003 -0500, Brian Wolven wrote:
I edited all the bang
function arguments so that they conform to the prototype, but some string
functions are unhappy when that is done, e.g., in this bang:
void BangWinMove(HWND hCaller, LPCSTR pszArgs)
this line generates errors:
else if (strstr(strlwr(pszArgs),"centered"))
unless it is changed to this:
else if (strstr(strlwr((char *)pszArgs),"centered"))
Please don't do that... strlwr modifies the source string and you thus
modify an internal buffer in the core. In this case it most likely won't
cause any harm, but you should should still avoid it if possible. As far as
I can see you have two choices here, either make a copy of the source
string or use a case insensitive strstr replacement, for example StrStrI.
__________________________________________________
Subscription options and archive:
http://www.freelists.org/list/shell-coding
- Follow-Ups:
- [shell-coding] Re: Compiling LS modules with DEV-C++
- From: Brian Wolven
- References:
- [shell-coding] Compiling LS modules with DEV-C++
- From: Brian Wolven
- [shell-coding] Re: Compiling LS modules with DEV-C++
- From: Kevin Schaffer
- [shell-coding] Re: Compiling LS modules with DEV-C++
- From: ilmcuts
- [shell-coding] Re: Compiling LS modules with DEV-C++
- From: Brian Wolven
Other related posts:
- » [shell-coding] Compiling LS modules with DEV-C++
- » [shell-coding] Re: Compiling LS modules with DEV-C++
- » [shell-coding] Re: Compiling LS modules with DEV-C++
- » [shell-coding] Re: Compiling LS modules with DEV-C++
- » [shell-coding] Re: Compiling LS modules with DEV-C++
- » [shell-coding] Re: Compiling LS modules with DEV-C++
- » [shell-coding] Re: Compiling LS modules with DEV-C++
- » [shell-coding] Re: Compiling LS modules with DEV-C++
- » [shell-coding] Re: Compiling LS modules with DEV-C++
- » [shell-coding] Re: Compiling LS modules with DEV-C++
- » [shell-coding] Re: Compiling LS modules with DEV-C++
- » [shell-coding] Re: Compiling LS modules with DEV-C++
- » [shell-coding] Re: Compiling LS modules with DEV-C++
- » [shell-coding] Re: Compiling LS modules with DEV-C++
- » [shell-coding] Re: Compiling LS modules with DEV-C++
- » [shell-coding] Re: Compiling LS modules with DEV-C++
- » [shell-coding] Re: Compiling LS modules with DEV-C++
I edited all the bang function arguments so that they conform to the prototype, but some string functions are unhappy when that is done, e.g., in this bang:
void BangWinMove(HWND hCaller, LPCSTR pszArgs)
this line generates errors:
else if (strstr(strlwr(pszArgs),"centered"))
unless it is changed to this:
else if (strstr(strlwr((char *)pszArgs),"centered"))
__________________________________________________ Subscription options and archive: http://www.freelists.org/list/shell-coding
- [shell-coding] Re: Compiling LS modules with DEV-C++
- From: Brian Wolven
- [shell-coding] Compiling LS modules with DEV-C++
- From: Brian Wolven
- [shell-coding] Re: Compiling LS modules with DEV-C++
- From: Kevin Schaffer
- [shell-coding] Re: Compiling LS modules with DEV-C++
- From: ilmcuts
- [shell-coding] Re: Compiling LS modules with DEV-C++
- From: Brian Wolven