PW Explorer SS4 - 559 throws error on returning AAHOOK_SUCCESS from an AAACTIONHOOK.

I am using the SDK for SELECTSeries 4 (111) against the explorer version 559.  When my Action Hook returns AAHOOK_SUCCESS, I get a ProjectWise error [58002] - "Invalid argument passed to a dmsapi function."   this is after it has left the hook function.   This code has worked for several Select Series versiosn with no changes.  I understood that for an Action Hook, AAHOOK_SUCCESS did not call next in chain. Is that still the case?

Parents
  • I think the cause may be related to not dealing with pResult in your code. According to the help (from SS3 docs) for "Hook Function Return Values", for AAHOOK_SUCCESS:

    action hook: Function's action was performed by the action hook. The caller should skip its default action and call aaApi_CallHookChain() function for post hooks, if it is providing them. In this case the caller should return the value of the AARESULT buffer pointed by pResult as the return value.

    Just a hunch, but it may be that there is some built in post hook that was added in SS4 that caused this to rear up on you now.

Reply
  • I think the cause may be related to not dealing with pResult in your code. According to the help (from SS3 docs) for "Hook Function Return Values", for AAHOOK_SUCCESS:

    action hook: Function's action was performed by the action hook. The caller should skip its default action and call aaApi_CallHookChain() function for post hooks, if it is providing them. In this case the caller should return the value of the AARESULT buffer pointed by pResult as the return value.

    Just a hunch, but it may be that there is some built in post hook that was added in SS4 that caused this to rear up on you now.

Children