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

ilmcuts wrote:
> At 18:16 11.11.2003 -0500, Brian Wolven wrote:
>> void WinPlaceBang(HWND caller, char* arg)
>
> try "const char*" instead of just "char*"

That changed the error from:

198 C:\LiteStep\modules\archive\winmaster\winplace.cpp
invalid conversion from `void (*)(HWND__*, char*)' to `void

on this line in initModuleEx:

 AddBangCommand("!winplace", WinPlaceBang);

to this error:

140 C:\LiteStep\modules\archive\winmaster\winplace.cpp
invalid conversion from `const char*' to `char*'

on this line in WinPlaceBang:

 WinPlace(arg, false);

If I then changed the winplace function def from:

void WinPlace(char *arg, bool curDesk)

to:

void WinPlace(const char *arg, bool curDesk)

then everyone was happy. I loaded the dll, the bangs showed up, and they
even worked. Looks like I now have the [free] tools to be *truly* dangerous
to the LS community. =P  So was that just something that MSVC isn't picky
about and the gnu compiler is? Seems like all the source I looked at did it
the same way (the original format).


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

Other related posts: