
Power Builder 9.0
-------------------------------

1. New "workspace"->"WorkSpace"

2. New  "Target" -> "Application"

3. new "PB Object" -> "Window"

4. Add source code in Application Object's "Declare"->"Global External Functions"
function integer wxoPrepare(long frmhd, long apphd, long parhd) library "wxoexecstd.dll"
function integer wxoSendMessage(long DestHandle,long LocalHandle,string pHead,long Value,string pText) library "wxoexecstd.dll"


5. Add source code in Application Object's "Open"
//========================
open(w_hello)	//!!!Repace w_hello with your window name
if CommandLine<>"" then 
	commandline = trim(commandline)+' '
	
	string as_array[]
	long i,p,ipos
	i = 1
	ipos = 1
	p=pos(commandline,' ',ipos)
	do while p>0 
		as_array[i]=mid(commandline,ipos,p - ipos)
		ipos = p+1
		p=pos(commandline,' ',ipos)
		i++
	loop
	
	long giApp,giCtrl
	string gsUrl
	giApp = long(as_array[1])
	giCtrl = long(as_array[2])
	gsUrl = as_array[3]
	
	wxoPrepare(Handle(w_hello),0,giApp)	//!!!Repace w_hello with your window name
	wxoSendMessage(giApp,Handle(w_hello),"EMEX",0,"0")	//!!!Repace w_hello with your window name
	
end if
//========================
		
6. New "Project" -> "Application Wizard" 

7. Menu "Run" -> "Deploy Workspace" , compile your workspace to exe file.

8. Rename your exe file with "_pbwxo.exe"

9. create a new folder, copy pb.exe(can be renamed), _pbwxo.exe, wxoexecstd.dll and other neccesary dll file of power builder. 

10.  run wxoConfig.exe, Open the pb.exe, choose right output directory, then "generate"

11. run WebServ.exe

12. use IE/Chrome/FireFox/Safari/Opera, "http://127.0.0.1:8080/index.htm?pb", Goodlucky!

fenglinyushu@163.com
QQ45300355
