From: MERC::"uunet!WKUVX1.BITNET!MacroMan" 27-APR-1993 00:26:20.39 To: MACRO32 CC: Subj: Re: Patching call to CLI$DCL_PARSE? > I'm trying to find a way to grab onto all command lines passed to >CLI$DCL_PARSE by *another* process for the life of the image they are running. >Are the DCL callback routines stored in a library, or are they a part of each >process' permanent P1 space? My thoughts are: > >Requesting process queues an AST to the target process which does: > >- Add an image exit handler to delete the AST memory upon image rundown >- Find local address for CLI$DCL_PARSE symbol >- Search through P0 image sections for calls to that address >- Change the code to call into the AST (kernel mode AST - no delete) > *before* calling CLI$DCL_PARSE. My code would do it's thang and jump > into CLI$DCL_PARSE so the stack remains hunky-dorey. > > Any thoughts on why this might not work, or better ways to achieve >the same result? I'm having a hard time figuring out how to determine >what the address for CLI$DCL_PARSE is. The requesting process will go into >action when an image-activation-audit-alarm is triggerred upon running certain >images. Is the alarm generated before or after the image fixup phase? If it >is before, am I gonna be unable to change the CLI$DCL... address because the >fixer-upper will just change it back on me? Any good thoughts on methods for >scanning through the image sections in search of the call? CLI$DCL_PARSE (or any other CLI$xxx's) is _not_ a system service nor is it a tranfser vector in a shareable image. It's supported by an object module in starlet.olb. and is linked into your image. If you can find its address within an image, all the power to you! However, if you must know, it requests the services of the CLI by building a cli service request block and then, calls SYS$CLI. SYS$CLI _is_ a sys. service vector and it's address is known and fixed. You could look into intercepting the SYS$CLI system service. As for the rest, the structure of the service request blocks and the service request codes are in $CLIDEF and $CLISERVDEF. >What exactly *IS* the price of tea in China? Who cares! I buy mine in america! BJS- /Brian Schenkenberger/Schenkenberg@Eisner.DECUS.Org/Space for Rent/ /VMS Software Support/Vitronics, Inc./Eatontown, NJ/(908) 542-0600/ /Independent Consult./Tmesis Consulting/Jackson, NJ/(908) 363-7551/ /@Monmouth-ETDL1.Army.Mil/CIS: 70253,114/