User forums > Help

Help Plugin Installation

<< < (4/4)

Ceniza:

--- Quote from: mispunt ---Sorry, but how does an exception looks like? (can't remember :oops:)
--- End quote ---


--- Code: ---if (LoadXMLResource(bleh) == FAILED)
{
  throw cbPluginError("Couldn't load resource file... please reboot your system");
}
--- End code ---

That's just an example of how it would look in the ctor or the OnAttach() method in the plugin.

The code that loads the plugin would be something like:


--- Code: ---try
{
  LoadPlugin(thePlugin);
  // ...
}
catch (cbPluginError &error)
{
  // What to do when the error is catched
}
--- End code ---

bungle:

--- Quote from: grv575 on September 08, 2005, 11:17:56 pm ---That's what I got (memory access violation)  when the zip and plugin dll resources were not in the correct directory.   The plugin should probably be more fault tolerant here when it load, the resources, or even better add failsafe code (like try catch I around the plugin loader code.

AHH,  if the zipped xrc and dll files are not in the correct directories, where should they be?  When I compiled them they were nowhere near where the other plugin files are, so I just moved the 2 files into the same directories as the others.
When compiled the files were in:-
help_plugin.zip in C:\Program Files\CodeBlocks\src\devel\share\CodeBlocks
help_plugin.dll in C:\Program Files\CodeBlocks\src\devel\share\CodeBlocks\plugins

help_plugin.zip moved to C:|program files\codeblocks\share\codeblocks
help_plugin.dll moved to C:|program files\codeblocks\share\codeblocks\plugins

If this can be solved by simply moving the files that would be good.
Thanks in advance
STEVE
--- End quote ---

Navigation

[0] Message Index

[*] Previous page

Go to full version