[rs-devel] RE: [Litestep] dev: mod_ctl: kudos and user sanity
Status: Beta
Brought to you by:
obada
From: Mudiaga O. <ob...@in...> - 2002-01-30 22:10:41
|
I'm not sure I understand what exactly Nexter meant but all the same... > Okay, from what I've seen so far, you're talking about a function that > basically replaces the version info structure that is a native > part of all > windows executables/libraries - and seldom used by LS modules. Not quiet... I think it's only in binaries that put it in their resource file (probably why seldom used by LS modules). It's another idea to use the same data structures, but doing so doesn't make things any simpler - neither for ls nor mods - it requires modules to use resources (or create complex data) which still needs to be "parsed" by ls... Surely not easier than Maduin's LMMODULEINFO suggestion but more flexible. Again, it should be as simple as posible for module writers to present their about info - just a simple text string. One shouldn't have to look up any reference or header file. Just know the right field names. > As a lazy (ex?)coder, I think reinventing the wheel isn't quite > justifiable > unless the existing weel happens to be square. mod_ctl("about") is just like SMTP (email) headers which is about 30 yaers old and it still kicking - it isn't reinventing. ... but ignoring the native windows version info infrastructure is a good thing - that thing happens not to be a wheel, but a rocket engine. I doubt anybody would be able to use without looking up the PSDK 5 times or example code 2 times. I like avoiding the PSDK where I can... /* * it's so simple, i have to add * a complete C implementation */ DLLEXPORT const char * mod_ctl(const char * cmd, const char * arg, char * not_used) { if (strcmp(cmd, "about") == 0) { if (arg == NULL) { return "MODULE_SIGNATURE:\n" "author: somebody\n" "version: 1.1"; } } return NULL; } If you still don't like it yet, you brobably never will... ~Mudi (wondering what happened to all the module coders...) |