Go to the FreeLists Home Page Home Signup Help Login
 



Browse shell-coding: This Month's ArchiveMain Archive PageRelated postsPrevious by DateNext by Date

[shell-coding] Re: Compiling LS modules with DEV-C++

  • From: "Brian Wolven" <brian.wolven@xxxxxxxxxxx>
  • To: <shell-coding@xxxxxxxxxxxxx>
  • Date: Tue, 18 Nov 2003 08:54:50 -0500
ilmcuts wrote:
> 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.

Ahh - I'll take the safer approach then. Is that (StrStrI) one of the
functions in strsafe.h? I'm planning on going through the code and
bringing it, erm, up to code, so to speak. =P


__________________________________________________
Subscription options and archive:
http://www.freelists.org/list/shell-coding

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++




  • [ Home | Signup | Help | Login | Archives | Lists ]

    All trademarks and copyrights within the FreeLists archives are owned by their respective owners.
    Everything else ©2008 Avenir Technologies, LLC.