Thanks, res. I understand the config files better now. Unfortunately,
it looks like it wasn't the path that was causing the problem. Your
suggestion about using -verbose helped to identify that the plugin was
being registered, just not loaded, with the following code:
if (!csInitializer::RequestPlugins(GetObjectRegistry(),
CS_REQUEST_PLUGIN("eridanus.suis", iSUIS)))
{
ReportError("Unable to initialize SUIS plugin!");
}
This code actually causes an error on my machine (it's just a standard
"Report this to Microsoft" window that pops up... I can't seem to figure
out what exactly the exception is, it's just some kind of unhandled
exception) On the other hand, if I use the following code:
csRef<iPluginManager> plugMgr = csQueryRegistry<iPluginManager>
(GetObjectRegistry());
csRef<iSUIS> mySuis = csLoadPlugin<iSUIS> (plugMgr, "eridanus.suis");
if (!mySuis.IsValid())
{
ReportError("Unable to initialize SUIS!");
}
It works fine. Any idea why this code would work, and the previous one
wouldn't?
~Scott
res wrote:
> On 31.12.2007 04:20, Scott Johnson wrote:
>
>> Hello Everyone:
>>
>> I'm working on a plugin for the game I'm developing, and I have run into
>> a situation where the system terminates unexpectedly due to an error
>> (I'm assuming some kind of segfault or something). I think it might
>> have something to do with the system not finding the correct path for
>> the plugin, which happens to be in the same directory as the
>> executable.
>>
>
> If you run with -verbose on the command line (note the absence of the
> usual '=-scf') you can see which paths are scanned for plugins.
>
>
>> What's the easiest way of inputting the path to look for
>> plugins into a config file and then setting it in-game?
>>
>
> There's no way to set that through the config system; however, you call
> can specify paths to scan for plugins as a parameter to scfInitialize().
> (The call to that function is usually wrapped by CS' csInitializer stuff
> - but you can safely call scfInitialize() multiple times.)
> If you require configurability from a file you'd have to manually write
> a bit of glue code.
>
> -f.r.
>
>
> ------------------------------------------------------------------------
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2005.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> ------------------------------------------------------------------------
>
> _______________________________________________
> Crystal-main mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/crystal-main
> Unsubscribe: mailto:[EMAIL PROTECTED]
>
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Crystal-main mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/crystal-main
Unsubscribe: mailto:[EMAIL PROTECTED]