Hi
First of all, why don't you deklare your hook function in the desired type ?
#ifdef __SASC
SAVEDS ASM ULONG ConstructLI_TextFunc(REG(a0) struct Hook *hook, REG(a2) Object *obj, REG(a1) struct NList_ConstructMessage *ncm)
{
#endif
#ifdef __GNUC__
static ULONG ConstructLI_TextFunc(void)
...
Second, if you wish to cast a function-pointer, you must also specify all arguments like this:
APTR foobar (ULONG arg1, UBYTE arg2)
{
/* This function expects two arguments and returns an APTR.
*/
APTR result;
/* Do anything with the arguments and 'result'...
*/
...
return result;
}
void f ()
{
/* This function want's to cast a pointer to the function "foobar" defined above
* to a function pointer that expects a different returnvalue.
*/
ULONG(*fctptr)(ULONG,UBYTE); /* this is a functionpointer */
/* Now we cast a pointer to "foobar" to the type required for the function pointer:
*/
fctPtr = (ULONG(*)(ULONG,UBYTE)foobar;
/* That's it, now you could call "foobar" using the function pointer 'fctptr'...
*/
...
Noster