btw: back to Phil's original few postings in this thread:
InternetGetConnectedState is defined as returning a BOOL, and has an __out LPDWORD and an __in DWORD as its parameters.
The correct ⎕NA syntax therefore would be
⎕NA'I4 WinINet|InternetGetConnectedState >I4 I4'
On my laptop I then get
InternetGetConnectedState 0 0
1 18
The 1 (the BOOL return value) says that I'm connected to the internet (which since I'm accesssing the Forums seems reasonable) and the 18 (=0x12) says the PC has Remote Access System installed and that it's attached to the internet via a LAN.
On a more general note, I suspect that Dyalog APL generated a syserror 995 and therefore dropped an aplcore, which contains the workspace and some other information. In general syserrors are generated when the interpreter discovers that there's a problem from which it cannot recover; a 995 says that the called DLL function has crashed. You can configure APL so that it will generate a trappable event rather than generating a syserror 995, but it is very much on you head be it .. the underlying function call has failed catastrophically, and it could have scribbled on any part of your workspace. If you set ErrorOnExternalException=1 either on the command line on in the registry, Dyalog APL will generate an error 91, EXTERNAL DLL EXCEPTION, rather than the syserror 995.
You may be able to )copy an aplcore or parts of an aplcore - but if the workspace in the aplcore is damaged, the )copy may also cause APL to crash with a different syserror; I'd recommend taking a copy of the initial aplcore, or configure APL to generate a new aplcore name each time one occurs.
To alter the name of the aplcore, set APLCoreName in the registry (I have it set to aplcore_121U64_* or aplcore_130C32_* etc so that I can tell which version of APL generated the aplcore). To )copy from an aplcore on Windows, don't forget to put a trailing "." on the aplcore name (otherwise APL will append ".DWS" and fail to find the aplcore file).