topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Sunday September 25, 2022, 12:03 pm
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - GameCat [ switch to compact view ]

Pages: [1]
1
Any updates on this?

2
Thanks for taking a look mouser. I'm in well over my head when it comes to translating headers. (I don't know enough c)

Since I haven't said it yet let me say it now: Thank you so much for your patience and cheerful spirit about this -- i don't think i would be so understanding if i was in your shoes -- if you don't give up I promise I will make sure you have a working delphi plugin framework for farr.

Not at all!! FARR is a great utility that I'm slowly using more. Its usefulness will increase if I can write small plugins as well. You taking a look at the delphi SDK is much more then I expected!


3
I've attached my plugin code. The plugin only exports one function, PluginFunc_DoInit().

I'm using Delphi XE2 to compile the plugin. The example plugin in the SDK doesn't work either when compiled with Delphi XE2.

4
Thanks Mouser, taking a look now....

[some time later...]

From what I can see I've declared the PluginFunc_DoInit() correctly but I have very little experience translating C headers to Delphi so I could be wrong.

I've tried a few variations with no luck. My PluginFunc_DoInit() is never called when the DLL is loaded. The plugin error log reports the same error:

12:30 PM, Wednesday, April 10, 2013
 Error initializing plugin do_init function
C:\Program Files (x86)\FindAndRunRobot\Plugins\test\FarrLocate32.dll

Any ideas?


5
Progress so far:

- I've created a Farr plugin DLL.
- The DLL is loaded by FARR when FARR starts.

The Farr plugin error log shows:

09:31 AM, Wednesday, April 10, 2013
 Error initializing plugin do_init function
C:\Program Files (x86)\FindAndRunRobot\Plugins\FarrPluginTest\FarrPluginTest.dll

The do_init() function exported by my DLL is not being called. I'm guessing the method signiture of my exported function is incorrect?

My do_init() function is declared using:
type
  Fp_GetStrVal = function(JrPluginPointerp:Pointer; varname:PAnsiChar; destbuf:PAnsiChar; maxlen:integer):BOOL; cdecl;
  Fp_SetStrVal = function(JrPluginPointerp:Pointer; varname:PAnsiChar; strbuf:PAnsiChar):BOOL; cdecl;

function PluginFunc_DoInit(
  const fullfilename:PAnsiChar ;
  inhostptr:Pointer;
  const hostname:PAnsiChar;
  const hostversionstring:PAnsiChar;
  incallbackfp_GetStrVal:FP_GetStrVal;
  incallbackfp_SetStrVal:FP_SetStrVal
): BOOL; cdecl;




Is there a way to have more detailed information added to the plugin error log?




6
Is there a guide to developering Farr plugins somewhere?




7
I can but I don't know c++ so I will need some help/guidance.

8
Does anyone have a working example of a FARR plugin for Delphi?

There is a Delphi FARR Plugin example in the SDK but it doesn't work when compiled with Delphi XE2. The example is a few years old and might have been written before Delphi added unicode support.

Pages: [1]