Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
At first I thought it might be the extender and tried both the 34 and 44 level ones with the same error. I then tried the compiled version of the program and it failed as well (and has not been recompiled since it last worked).
Because the compiled version does not work, I am assuming that the problem is not with the extender but with the ehllapi interface. The only thing there is that I have a old version of Extra v6.7 and nothing has changed with that as well. It is the same version that I originally wrote and debugged my code on.
Since "nothing has changed", I'm a little at lost as to where to look. Have you any suggestions? I may try to reinstall Extra but I'm not sure what that might accomplish as the error does not suggest a missing dll.
In terms of nothing having changed, perhaps it's something more subtle, such as a timing issue. Perhaps there's something unusual happening in terms of the condition of the mainframe session that's causing the error to occur. Or, is there a chance that something's been changed w/respect the standard vs. enhanced interface settings in either the call to ehllapiInit() or the emulator's HLLAPI configuration settings? If there's now a mismatch between the call to ehllapiInit() and the emulator's configuration then the 202 error is a likely result.
WIL Extender Error: 202: Enhanced HLLAPI Extender: Incorrect parameters were specified or the Length is zero or greater than 128 bytes. Be sure the parameters are correct and are the right length. Result = ehllapiGetWindowStatus(0)wwwbatch.ini:
[Enhanced HLLAPI Extender] LastError=2 "HllApiX() : WWHLL_GetWindowStatus()"Sample program
AddExtender('WWHLL44I.DLL') IntControl(38,1,"J:\WinBatch\errorlog.txt",0,0) ;Route fatal errors to a log file KeyTAB = '@T' KeyENTER = '@E' KeyCLEAR = '@C' KeyRESET = '@R' KeyPF3 = '@3' Username = 'xxxxxx' Password = 'xxxxxx' Who = 'who' TSO = 'TSO' CICSLogOff = 'cesf logoff' GoSub InitInterface TimeDelay(2) GoSub ConnectToPS TimeDelay(5) GoSub GetWindowStatus Exit ;------------------------------------------------------------------------------------------------------- :InitInterface ;ErrorMode(@OFF) ehllapiInit('D:\Program Files\E!PC\EHLAPI32.DLL','HLLAPI',1 | 4) ResultCode = LastError() ErrorMode(@CANCEL) TempMsg = StrCat('ehllapiInit("EHLAPI32.DLL","",1 | 4) RC = ',ResultCode,@CRLF) Title01 = 'Test ehllapiInit()' ;Message(Title01,TempMsg) Return ;------------------------------------------------------------------------------------------------------- :ConnectToPS ;ErrorMode(@OFF) ehllapiConnectPS('a') ResultCode = LastError() ErrorMode(@CANCEL) TempMsg = StrCat('ehllapiConnectPS("a") RC = ',ResultCode,@CRLF) Title01 = 'Test ehllapiConnectPS()' ;Message(Title01,TempMsg) Return ;------------------------------------------------------------------------------------------------------- :GetWindowStatus ;ErrorMode(@OFF) Result = ehllapiGetWindowStatus(0) ResultCode = LastError() ErrorMode(@CANCEL) TempMsg = StrCat('ehllapiGetWindowStatus(0) RC = ',ResultCode,@CRLF) if (ResultCode == 0) TempMsg = StrCat(TempMsg,@CRLF,'Status Flags = ',Result[0]) if (Result[0] & 8) TempMsg = StrCat(TempMsg,@CRLF,'The window is visible.') endif if (Result[0] & 16) TempMsg = StrCat(TempMsg,@CRLF,'The window is hidden.') endif if (Result[0] & 128) TempMsg = StrCat(TempMsg,@CRLF,'The window is active.') endif if (Result[0] & 256) TempMsg = StrCat(TempMsg,@CRLF,'The window is deactivated.') endif if (Result[0] & 1024) TempMsg = StrCat(TempMsg,@CRLF,'The window is minimized.') endif if (Result[0] & 2048) TempMsg = StrCat(TempMsg,@CRLF,'The window is maximized.') endif TempMsg = StrCat(TempMsg,@CRLF,'X Coordinate = ',Result[1]) TempMsg = StrCat(TempMsg,@CRLF,'Y Coordinate = ',Result[2]) TempMsg = StrCat(TempMsg,@CRLF,'Window Width = ',Result[3]) TempMsg = StrCat(TempMsg,@CRLF,'Window Height = ',Result[4]) TempMsg = StrCat(TempMsg,@CRLF,'Z Order = ',Result[5]) endif ;Message(Title01,TempMsg) Return ;-------------------------------------------------------------------------------------------------------
From the help topic for "ehllapiInit()":
Attachmate myExtra! Enterprise [v7.0]
hllapi-dll = "EHLAPI32.DLL"
hllapi-func = "hllapi"
personality-flags = 0 | 4 = 4 (*NOTE*)
Attachmate can be configured to use either the standard or enhanced HLLAPI interface specifications. This is a global setting in Attachmate and it affects all of the terminal emulator sessions that are running on a given workstation. Bit #0 should be enabled in the personality-flags [e.g. 1 | 4 = 5] if Attachmate has been been configured to use the enhanced HLLAPI interface specifications.
The setting is a global setting, not one that is specific to any particular emulator session that you have configured. It is highly likely that the emulator was switched into standard mode from enhanced mode for the HLLAPI interface API, and now the change is affecting your emulator session & your script that was previously executing properly.
Article ID: W16827
File Created: 2007:07:03:14:26:26
Last Updated: 2007:07:03:14:26:26