I have been failing to get a handle on the window the CLI is running from in C. The call to FindTask(0L) will land me both a structure to Task as well as Process, the overlapping technique a popular one, I%&$#?@!%&$#?@!%&$#?@!8217;m finding. However attempts to use the data in this structure do not work.
Process has .pr_WindowPtr which is typed as APTR. I thought it would be easy but thus far it hasn%&$#?@!%&$#?@!%&$#?@!8217;t worked.
*UPDATE*
I'm an idiot. I was trying to open dos.library with a DOSBase variable, guessing the name, when in fact, it was DosLibrary instead. Sigh. C'est la vie.