applicationopen : 시스템 시작시에 셋팅하는 것들...
/* 글로벌 변수 */
Boolean gb_jTier = true /* jTier인제 아닌지를 판단한다. */
String gs_Real_yn = 'Y' /* 운영디비인지 테스트디비인지... */
String soh = char(1)
n_func_agent f
dso d
String gs_CurrentDirectory
String gs_MainDirectory
String gs_Player
String gs_Enter_Tab = 'ENTER' /* ENTER or TAB */
String gs_system_dir
String gs_HostName
Long gl_os_bit
/* 코딩 */
gs_CurrentDirectory = GetCurrentDirectory ( ) + '\'
Boolean bValid
int i_Pos
string s_TempDirectory
if Right(gs_CurrentDirectory, 1) = '\' then
s_TempDirectory = Left(gs_CurrentDirectory, Len(gs_CurrentDirectory) - 1)
else
s_TempDirectory = gs_CurrentDirectory
end if
i_Pos = lastPos(s_TempDirectory, '\')
gs_MainDirectory = Left(gs_CurrentDirectory, i_Pos)
/* Path 설정하기... */
Boolean b_Valid
String s_Path
s_Path = gs_MainDirectory + 'api'
b_Valid = f.SetPath(s_Path)
if Not(b_Valid) then
Halt
end if
Boolean lb_Receive
Long ll_Receive
string l_path, l_exe_env // 실행환경을 조사한다. 파워빌더, Runtime, Appeon
unsignedlong l_handle
l_path = space(1024)
l_handle = Handle(GetApplication())
f.GetModuleFilename(l_handle, l_path, 1024)
l_exe_env = Upper(Right(l_path,Len(l_path) - LastPos(l_path,'\')))
if l_exe_env = "WEBLIBRARY.DLL" then
//Messagebox("확인","APPEON에서 작동")
gs_player = "APPEON"
else
if Handle(GetApplication()) = 0 THEN
//Messagebox("확인","파워빌더에서 소스로 작동")
gs_player = "SRC"
else
//Messagebox("확인","실제 컴파일된 exe에서 작동")
gs_player = "EXE"
end if
end if
/* 컴퓨터 이름 가져오기... */
gs_HostName = space(128)
f.gethostname ( gs_HostName, len(gs_HostName) )
gs_HostName = trim(gs_HostName)
Boolean gb_jTier = true /* jTier인제 아닌지를 판단한다. */
String gs_Real_yn = 'Y' /* 운영디비인지 테스트디비인지... */
String soh = char(1)
n_func_agent f
dso d
String gs_CurrentDirectory
String gs_MainDirectory
String gs_Player
String gs_Enter_Tab = 'ENTER' /* ENTER or TAB */
String gs_system_dir
String gs_HostName
Long gl_os_bit
/* 코딩 */
gs_CurrentDirectory = GetCurrentDirectory ( ) + '\'
Boolean bValid
int i_Pos
string s_TempDirectory
if Right(gs_CurrentDirectory, 1) = '\' then
s_TempDirectory = Left(gs_CurrentDirectory, Len(gs_CurrentDirectory) - 1)
else
s_TempDirectory = gs_CurrentDirectory
end if
i_Pos = lastPos(s_TempDirectory, '\')
gs_MainDirectory = Left(gs_CurrentDirectory, i_Pos)
/* Path 설정하기... */
Boolean b_Valid
String s_Path
s_Path = gs_MainDirectory + 'api'
b_Valid = f.SetPath(s_Path)
if Not(b_Valid) then
Halt
end if
Boolean lb_Receive
Long ll_Receive
string l_path, l_exe_env // 실행환경을 조사한다. 파워빌더, Runtime, Appeon
unsignedlong l_handle
l_path = space(1024)
l_handle = Handle(GetApplication())
f.GetModuleFilename(l_handle, l_path, 1024)
l_exe_env = Upper(Right(l_path,Len(l_path) - LastPos(l_path,'\')))
if l_exe_env = "WEBLIBRARY.DLL" then
//Messagebox("확인","APPEON에서 작동")
gs_player = "APPEON"
else
if Handle(GetApplication()) = 0 THEN
//Messagebox("확인","파워빌더에서 소스로 작동")
gs_player = "SRC"
else
//Messagebox("확인","실제 컴파일된 exe에서 작동")
gs_player = "EXE"
end if
end if
/* 컴퓨터 이름 가져오기... */
gs_HostName = space(128)
f.gethostname ( gs_HostName, len(gs_HostName) )
gs_HostName = trim(gs_HostName)