WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

Winsock
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

Invalid Page Fault with Compiled EXE

Keywords:     Invalid Page Fault

Question:

The following script, idea.wbt, works fine with Winbatch 32I-97d since I just updated Winbatch and internet extender.

"guided.ver" is a simple text file that contains the single line: 19980211

	;idea.wbt
	AddExtender("WWWSK32I.DLL")
	URL="http://dmie.jpl.nasa.gov/guided.ver"
	serv=httpGetServer(URL, "")
	path=httpGetpath(URL, "")
	a=httpRecvText(serv, path, 1000, 0)
	message("File Contents are", a)
When I compiled with Win32 WBC97D dll(2.4dbp), I get the error upon execution of idea.exe when it attempts to execute the statement:
	a=httpRecvText(serv, path, 1000, 0)

	IDEA caused an invalid page fault in
	module WWWSK32I.DLL at 014f:012a700a.
The compile goes fine. The uncompiled script is okay under WinBatch. It's the Exe that fails.

Answer:

  1. Modify the script slightly as follows....

  2. Make sure the same version of the wwwsk32i.dll is being used in both cases. I think that the compiled version is finding an older copy and using that.

    The BIGEXE does not solve the problem. If an old copy is being used, it must be hunted down and killed. The modified script should help find it.

	;idea.wbt
	AddExtender("WWWSK32I.DLL")

	ver=wxGetInfo(0,0)
	Message("WWWSK32I.DLL Version",ver)
	where=FileLocate("WWWSK32I.DLL")
	Message("Using DLL at",where)

	URL="http://dmie.jpl.nasa.gov/guided.ver"
	serv=httpGetServer(URL, "")
	path=httpGetpath(URL, "")
	a=httpRecvText(serv, path, 1000, 0)
	message("File Contents are", a)

Question (continued):

Good Call! Before I even tried your code, as soon as I read your tip I used FIND to locate WWWSK32I.DLL; I had three. One in my Winbatch\system directory (the new one) and two old versions (4/16/97): one in the "code" directory where I author and execute the .wbt files and the other in the directory where I was executing idea.exe

Duh! Thank you for opening my eyes! Now I will need to automate the detection and elimination of any old WWWSK32I.DLL on systems of users who will receive the final product since using code below would be too late as once an extender is loaded, there is no way of unloading it. Would I guess also that when a BIGEXE file is executed, the included dlls are extracted only at initial execution when the included files are not present in the current directory (or they could be in the windows\system directory as well, correct?) and thus if the executing program deleted WWWSK32I.DLL before it was "Added" then the add would fail without re-executing the program. If this is true, then one solution would be upon detection of an outdated dll would be to delete it and then message the user to relaunch the program and exit before attempting to add (and only add after confirming the existence of the required dll)

Answer:

killit=IniReadPvt("XXYYZZ","deldll",0,"WWW-PROD.INI")
if killit==123
   TimeDelay(2)	  ; Wait for other copy to exit
   where=FileLocate("WWWSK32I.DLL")
   FileDelete(where)
   IniWritePvt("XXYYZZ","deldll",123,"WWW-PROD.INI")
   Run(WinExeName(""),"")
   exit
endif

AddExtender("wwwsk32i.dll")
ver=wxGetInfo(0,0)
if ver

It actually *might* work.



Article ID:   W12612
Filename:   Invalid Page Fault with Compiled EXE.txt
File Created: 2017:07:28:12:58:52
Last Updated: 1999:04:15:15:48:24