This is more in the nature of a general Skill question, but this topic seems to be the most active, so forgive the intrusion. Does anyone know if there's a means to hook or override native code function objects? For example, if I wanted to log all invocations of the various ipc* functions it would be handy to be able to place a routine of my own in the control flow, grab and log the args and then pass control to the "real" ipc routine. All the ipc* functions show up as being read-only and any attempt at assigning a new function to the symbol results in an error. Any input or insight will be appreciated. Steve
Here is an example that may be useful. The ipc356_out command is called when you select File -> Export -> IPC356 from the main Allegro menu. You want to do something a little different then the generic ipc356_out function. First you would need to build the function you do wish to execute (some special extracta routines or specialized database reads, perhaps using a customized form UI). Let's say that you call this compiled Skill function "my_IPC_out". You can use the axlCmdRegister utility to "create" a user-defined Allegro command or, in this case, you would use this utility to redefine the existing Allegro command. axlCmdRegister("ipc356_out" 'my_IPC_out) Now when you enter ipc356_out from the Allegro command line the compiled function "my_IPC_out is executed. If you want to call the custom function from the Allegro menu you could .... axlCmdRegister("ipc356_private" 'my_IPC_out) and then modify your Allegro menu from .... MENUITEM "IP&C 356...", "ipc356 out" to .... MENUITEM "IP&C 356...", "ipc356_private"
Or you could just use: axlCmdRegister("ipc356 out" 'my_IPC_out) and make no Allegro menu changes.
I think the function you are after is clearFnWriteProtect However, this will not work with system functions, such as ipcBeginProcess. I doubt that you can (or would want to) hijack these commands directly.