home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Komputer 1997 February
/
PCWK0297.iso
/
lotus
/
english
/
winagent
/
install.dsk
/
OWA.LSS
< prev
next >
Wrap
Text File
|
1995-06-14
|
23KB
|
696 lines
''/*********************************************************************
''
'' Module Name: OWA.lss
''
'' Module Code: COMINST
''
'' Author:
''
'' Creation Date: Jan 26, 1994
''
'' Copyright Lotus Development Corporation, (c) 1994
''
'**
USE "TOOLKIT"
OPTION DECLARE
'** These Are the Required Functions that Products must provide
'***************************************************************
DECLARE PUBLIC FUNCTION ProductRegOWA (prodno%, network$, direction$) AS STRING
DECLARE PUBLIC FUNCTION DefaultUserRegOWA (prodno%, network$, direction$) AS STRING
DECLARE PUBLIC FUNCTION InitOWA (prodno%, network$, direction$, basedir$) AS STRING
DECLARE PUBLIC FUNCTION PrevVersionsOWA (prodno%, network$, direction$) AS STRING
DECLARE PUBLIC FUNCTION PathChangeOWA (prodno%, network$, direction$, destdirsym$, mainprodsonly%) AS STRING
DECLARE PUBLIC FUNCTION InitCopyListOWA (prodno%, network$, direction$) AS STRING
DECLARE PUBLIC FUNCTION PreCopyConfigOWA (prodno%, network$, direction$, lic%) AS STRING
DECLARE PUBLIC FUNCTION AddTheBillBoardsOWA (prodno%, network$, direction$, nbytes&) AS STRING
DECLARE PUBLIC FUNCTION PostCopyConfigOWA (prodno%, network$, direction$, programgroup$) AS STRING
DECLARE PUBLIC FUNCTION AddIconsOWA (prodno%, network$, direction$, programgroup$) AS STRING
DECLARE PUBLIC FUNCTION UIOWA (prodno%, network$, direction$) AS STRING
DECLARE PUBLIC FUNCTION PostSuccessRegOWA (prodno%, network$, direction$) AS STRING
'** Product specific functions
'*****************************
DECLARE FUNCTION GetOWAPathfromLotusIni() AS STRING
DECLARE FUNCTION GetNotesDir() AS STRING
DECLARE FUNCTION UpdateOrganizerIniFiles (prodno%) AS INTEGER
DECLARE SUB OWACCMAILOPTCB (hDlg%, CtrlId%, Classes$, Inst%)
DECLARE SUB OWANOTESOPTCB (hDlg%, CtrlId%, Classes$, Inst%)
DECLARE FUNCTION GetModuleHandle LIB "KRNL386.EXE" (ByVal arg1$) AS INTEGER
DECLARE FUNCTION GetPrivateProfileString LIB "kernel" (ByVal szSect$, ByVal szKey$,_
ByVal szDefault$,ByVal szBuf$,ByVal cbBuf%,ByVal szFile$) AS INTEGER
DECLARE FUNCTION GetProfileString LIB "kernel" (ByVal szSect$, ByVal szKey$,_
ByVal szDefault$,ByVal szBuf$,ByVal cbBuf%) AS INTEGER
DECLARE FUNCTION WritePrivateProfileString LIB "Kernel" (ByVal lpArg1$, ByVal lpArg2$, ByVal lpArg3 As Long, ByVal lpArg4$) AS INTEGER
DECLARE FUNCTION WriteProfileString LIB "Kernel" (ByVal lpArg1$, ByVal lpArg2$, ByVal lpArg3 As Long) AS INTEGER
'**************************** Required Functions *************************
SUB Initialize
Reg_RegisterProductNames "OWA", LdString(SID_OWA_COMMERCIALNAME)
END SUB
'*************************************************************************
PUBLIC FUNCTION ProductRegOWA (prodno%, network$, direction$) AS STRING
ProductRegOWA = gNEXT
Reg_SetSupportedInstallTypes prodno%, 1, 0, 1
Reg_SetProdSizes prodno%, 2 * 1474560, 2 * 1474560
'** If you need Lotusapp or datalens support turn this on.
Reg_SetShareFlags prodno%, 0, 0, 0, 0
'** Toolkit default is for no server supprt, turn on if desired.
Reg_SetSrvSupport prodno%, 0
'** This is the default value the user will see.
Reg_SetProgManagerGroup prodno%, LdString(SID_OWA_COMMERCIALNAME)
END FUNCTION
'*************************************************************************
PUBLIC FUNCTION DefaultUserRegOWA (prodno%, network$, direction$) AS STRING
DIM ripath$, defdir$, temp%, rc%
DefaultUserRegOWA = gNEXT
If network$ = gNODE$ Then
ripath$ = GetSymbolValue(SYM_STF_SRCDIR$) + "owa.ri"
ElseIf network$ = gSTANDARD$ Then
'** GetOWA.... is in this file and illustrates how to
'** retrieve you prod. from lotus.ini
defdir$ = GetOWAPathfromLotusIni()
if defdir$ = "" goto rinotfound
temp% = INSTR(1,LCASE$(defdir$),"owa.exe")
if temp% = 0 goto rinotfound
ripath$ = MID$(defdir$,1,(temp%-1))
ripath$ = ripath$ + "owa.ri"
End If
'' RETURNS TRUE IF SUCCESSFULLY FOUND RI FILE AND READ INFORMATION
'' This functions populates: SYM_NAME$, SYM_COMPANY$, SYM_SERIALNUM$
rc% = Lot_ReadDefaultsfromRi(ripath$)
rinotfound:
END FUNCTION
'*************************************************************************
PUBLIC FUNCTION InitOWA (prodno%, network$, direction$, basedir$) AS STRING
DIM sym$, symname$, defdir$, position%, proddir$, iniPath$, rv%
InitOWA = direction$
'' In the backwards case, keep backing up
If direction$ = gBACK Then
EXIT FUNCTION
End If
'' Setup Default directory settings and the associated
'' text that the user will see
sym$ = Reg_GetDirSymbolList(prodno%)
symname$ = sym$ + gNAME
''These two line register it with the toolkit.
SetListItem sym$, 1, "OWADIR"
SetListItem symname$, 1, "OWADIRNAME"
'** NOTE The path in the string table is lower case and ends with a slash
SetSymbolValue "OWADIR", basedir$ + LdString(SID_OWA_DIR)
'** This will be the name of the directory that shows up in captions in
'** toolkit dialogs (Static text)
SetSymbolValue "OWADIRNAME", LdString(SID_OWA_DIRNAME)
'' Special Cases for setting these symbols
'' Strings should be resourced, but we didn't want to clutter
'' the OWA string table.
SELECT CASE network$
CASE gSERVER$
SetSymbolValue "OWANAME", LdString(SID_OWA_SERVER_DIRNAME)
CASE gDISTRIBUTION$
SetSymbolValue "OWANAME", LdString(SID_OWA_DIST_DIRNAME)
CASE gSTANDARD$
'' check if there is an existing product
defdir$ = GetOWAPathfromLotusIni()
IF defdir$ <> "" THEN
position% = INSTR(1, defdir$, "owa.exe")
proddir$ = MID$(defdir$,1, position% - 1)
ELSE
proddir$ = basedir$ + LdString(SID_OWA_DIR)
END IF
SetSymbolValue "OWADIR", proddir$
CASE gNODE$
iniPath$ = GetWindowsDir() + "owa.ini"
IF DoesFileExist(iniPath$, femExists) THEN
proddir$ = GetIniKeyString(iniPath$,"DIRECTORIES","personal")
rv% = Lot_CleanPath(proddir$)
IF proddir$ = "" THEN
proddir$ = basedir$ + LdString(SID_OWA_DIR)
END IF
ELSE
proddir$ = basedir$ + LdString(SID_OWA_DIR)
END IF
SetSymbolValue "OWADIR", proddir$
END SELECT
END FUNCTION
'*************************************************************************
PUBLIC FUNCTION PrevVersionsOWA (prodno%, network$, direction$) AS STRING
DIM nProducts%, prodIndex%, i%
nProducts% = Reg_GetNumberOfProducts()
FOR prodIndex% = 1 to nProducts%
If Reg_GetPreviousVersion(prodIndex%) <> "" Then
i% = DoMsgBox("Older Versions Found","", MB_OK)
GOTO PREVPRODFOUND
End If
NEXT
PREVPRODFOUND:
END FUNCTION
'*************************************************************************
PUBLIC FUNCTION PathChangeOWA (prodno%, network$, direction$, destdirsym$, mainprodsonly%) AS STRING
DIM path$
PathChangeOWA = gNEXT
path$ = GetSymbolValue (destdirsym$)
'' The following is a psudocode example
''''''rc$ = DetectVersionPriorToDarwin(path$)
''''''If rc$ = "BEAGLE" then
'''''' ShowPathError SID_BEAGLE_FOUND, SID_ERR_EXISTBEAGLE, path$
'''''' PathChangeOWA = gBACK
''''''end if
END FUNCTION
'*************************************************************************
PUBLIC FUNCTION InitCopyListOWA (prodno%, network$, direction$) AS STRING
DIM i%, sym$, chpt$, nextprod$, notused%, FeatureToFind$
ON Error STFQUIT GOTO COPYLISTERROR
InitCopyListOWA = direction$
'' In the backwards case, keep backing up
If direction$ = gBACK Then
EXIT FUNCTION
End If
sym$ = Reg_GetProductAcronym(prodno%) + gTOP$
chpt$ = Lot_GetChapterFromKeyWord(sym$)
If chpt$ = "" Then
ERROR STFQUIT
End IF
SELECT CASE Reg_GetProdSelectedInstallType(prodno%)
CASE gCOMPLETE$
i% = F_COMPLETE
CASE gLAPTOP$
i% = F_LAPTOP
CASE gCUSTOM$
i% = F_CUSTOM
END SELECT
Lot_InitializeCopyList chpt$, i%
'** Make sure to turn off all sections not available on the server.
If network$ = gNODE Then
nextprod$ = Lot_GetNextSibling(chpt$, F_NOTHING)
WHILE (chpt$ <> "" AND chpt$ <> nextprod$)
FeatureToFind$ = Lot_GetChapterValStr(chpt$, F_KEYWORD)
If Lot_IsTheFeatureInstalled(FeatureToFind$) = FALSE Then
notused% = Lot_SetChapterFilesInCopyListInOrOut (chpt$, 0)
End If
chpt$ = Lot_GetNext()
WEND
End If
EXIT FUNCTION
COPYLISTERROR:
ErrorMsg 0, "Developers: You need to have licenser section with OWATOP in INF file"
ERROR STFQUIT
END FUNCTION
'*************************************************************************
PUBLIC FUNCTION UIOWA (prodno%, network$, direction$) AS STRING
DIM notused%
UIOWA = direction$
'' In the backwards case, keep backing up
If direction$ = gBACK Then
EXIT FUNCTION
End If
VALUEERROR:
SELECT CASE Reg_GetProdSelectedInstallType(prodno%)
CASE gCOMPLETE$
notused% = RegisterCallback("OWA","OWACCMAILOPTCB")
UIOWA = PopupModalDlg (DBOWA_CCMAILOPTS1, DBOWA_CCMAILOPTS1)
CASE gLAPTOP$
notused% = RegisterCallback("OWA","OWANOTESOPTCB")
UIOWA = PopupModalDlg (DBOWA_NOTESOPTS1, DBOWA_NOTESOPTS1)
END SELECT
END FUNCTION
'*************************************************************************
PUBLIC FUNCTION PreCopyConfigOWA (prodno%, network$, direction$, lic%) AS STRING
DIM Chapter$, notused%
PreCopyConfigOWA = gNEXT
' Enable the selected network type.
Chapter$ = Lot_GetChapterFromKeyword(GetSymbolValue("NETWORKTYPE"))
notused% = Lot_SetChapterFilesInCopyListInOrOut( Chapter$, 1 )
' Enable the selected agent type.
Chapter$ = Lot_GetChapterFromKeyword(GetSymbolValue("NOTESSERVER"))
notused% = Lot_SetChapterFilesInCopyListInOrOut( Chapter$, 1 )
END FUNCTION
'*************************************************************************
PUBLIC FUNCTION AddTheBillBoardsOWA (prodno%, network$, direction$, nbytes&) AS STRING
AddTheBillBoardsOWA = direction$
'' In the backwards case, keep backing up
If direction$ = gBACK Then
EXIT FUNCTION
End If
'psudo code follows as an example
''''If network$ <> gNODE$ Then
'''' SetListItem "IDC_BMP", 1, STR$(IDD_OWABILLBD1_BMP)
'''' AddToBillboardList GetSymbolValue(SYM_CUIDLL$), DB_OWABILLBD1, "FNameOrgDlgProc", nbytes&
''''End If
END FUNCTION
'*************************************************************************
PUBLIC FUNCTION PostCopyConfigOWA (prodno%, network$, direction$, programgroup$) AS STRING
DIM ripath$, unused%
PostCopyConfigOWA = direction$
'' In the backwards case, keep backing up
If direction$ = gBACK Then
EXIT FUNCTION
End If
If network$ <> gNODE$ Then
SetSymbolValue SYM_CDDRIVE$, GetSymbolValue(SYM_INSTALL_SOURCE)
End If
''** WRITE TO RI FILE
''*******************
ripath$ = GetSymbolValue("OWADIR") + "owa.ri"
If Lot_WriteToRiFile (ripath$) = FALSE Then
'*** SHOULD BE RESOURCED STRING
ErrorMsg SID_OWA,LdString(SID_OWA_ERR_RI) + ripath$
End If
If network$ = gSERVER$ OR network$ = gDISTRIBUTION Then
GOTO SKIPCONFIG
End If
'** Write entries in win.ini
'** Write entries in owa.ini
'** Log the product into \windows\lotus.ini
'** Write the OLE registration
'** Create work directory for standard and node
''''' workdir$ = GetSymbolValue("123WORKDIR")
''''' CreateDir workdir$, cmoNone
''''' IF DoesDirExist(workdir$)=0 THEN
''''' ShowPathError SID_ERR_CREATEDIR, 0, workdir$
''''' END IF
unused%=UpdateOrganizerIniFiles(prodno%)
SKIPCONFIG:
END FUNCTION
'*************************************************************************
PUBLIC FUNCTION AddIconsOWA (prodno%, network$, direction$, programgroup$) AS STRING
DIM ripath$
AddIconsOWA = direction$
'' In the backwards case, keep backing up
If direction$ = gBACK Then
EXIT FUNCTION
End If
'** Write entries in Program Manager but skip add-in task Notes agent
If Lot_IsTheFeatureInstalled("OWAAGTNOTESADINWIN") = TRUE Then
GOTO SKIPCONFIG
End If
If Lot_IsTheFeatureInstalled("OWAAGTVIMNOTESWIN") <> FALSE Then
SELECT CASE Reg_GetProdSelectedInstallType(prodno%)
CASE gCOMPLETE$
CreateProgmanItem programgroup$, LdString( SID_ORG_ICON_CCMAIL ) ,_
Lot_WhereIsFeature(prodno%, "OWAAGTVIMNOTESWIN", "agentw.exe")+"agentw.exe",_
"", cmoOverwrite
CASE gLAPTOP$
CreateProgmanItem programgroup$, LdString( SID_ORG_ICON_NOTES ) ,_
Lot_WhereIsFeature(prodno%, "OWAAGTVIMNOTESWIN", "agentw.exe")+"agentw.exe",_
"", cmoOverwrite
END SELECT
End If
SKIPCONFIG:
END FUNCTION
'*************************************************************************
PUBLIC FUNCTION PostSuccessRegOWA (prodno%, network$, direction$) AS STRING
PostSuccessRegOWA = direction$
'' In the backwards case, keep backing up
If direction$ = gBACK Then
EXIT FUNCTION
End If
END FUNCTION
'********************************
'** Product Specific Functions **
'********************************
'*************************************************************************
FUNCTION GetOWAPathfromLotusIni() AS STRING
DIM DestDir$, lotusinipath$, defdir$, temp%, ProdDir$, fullpath$, rv%
DestDir$ = GetWindowsDir()
lotusinipath$ = DestDir$ +"lotus.ini"
if DoesFileExist(lotusinipath$,femExists) then
defdir$ = GetIniKeyString(lotusinipath$,"Lotus Applications", "owa")
if defdir$ <> "" then
temp% = INSTR(1,LCASE$(defdir$),"owa.exe")
if temp% <> 0 then
ProdDir$ = MID$(defdir$,1,(temp%-1))
if ProdDir$ <> "" then
fullpath$ = ProdDir$ + "owa.exe"
if DoesFileExist(fullpath$, femExists) then
rv% = Lot_CleanPath(fullpath$)
GetOWAPathfromLotusIni = fullpath$
EXIT FUNCTION
end if
end if
end if
end if
end if
GetOWAPathfromLotusIni = ""
END FUNCTION
'*************************************************************************
FUNCTION GetNotesDir() AS STRING
DIM DestDir$, lotusinipath$, defdir$, temp%, ProdDir$, fullpath$, rv%
DestDir$ = GetWindowsDir()
lotusinipath$ = DestDir$ +"lotus.ini"
fullpath$ = DestDir$+"notes.ini"
if DoesFileExist(fullpath$,femExists) then
GetNotesDir = fullpath$
EXIT FUNCTION
end if
if DoesFileExist(lotusinipath$,femExists) then
defdir$ = GetIniKeyString(lotusinipath$,"Lotus Applications", "Notes")
if defdir$ <> "" then
temp% = INSTR(1,LCASE$(defdir$),"notes.exe")
if temp% <> 0 then
ProdDir$ = MID$(defdir$,1,(temp%-1))
if ProdDir$ <> "" then
fullpath$ = ProdDir$ + "notes.ini"
if DoesFileExist(fullpath$, femExists) then
GetNotesDir = fullpath$
EXIT FUNCTION
end if
end if
end if
end if
end if
GetNotesDir = fullpath$
END FUNCTION
'*************************************************************************
FUNCTION UpdateOrganizerIniFiles (prodno%) AS INTEGER
DIM iniPath$, ini2Path$, Seperator$, StringBuf$, STRING_BUF_LEN%, notused%, BytesRead%, StringBuf2$, StringBuf3$
iniPath$ = GetWindowsDir() + LdString( SID_ORG_ININAME )
ini2Path$ = Lot_WhereIsFeature(prodno%, "OWAINI2", LdString( SID_ORG_INI2NAME ))+LdString( SID_ORG_INI2NAME )
SELECT CASE Reg_GetProdSelectedInstallType(prodno%)
CASE gCOMPLETE$
CreateIniKeyValue iniPath$, "Agent", "UserName", GetSymbolValue("AGENTNAME"), cmoOverwrite
CreateIniKeyValue iniPath$, "Agent", "ContainerPath", GetSymbolValue("CONTAINERPATH"), cmoOverwrite
CreateIniKeyValue ini2Path$, "Scheduling", "ExpectedVIM", "CCMAIL", cmoOverwrite
notused% = WritePrivateProfileString("Agent", "AgentName", 0, "org2.ini")
notused% = WritePrivateProfileString("Agent", "CanSaveDrafts", 0, "org2.ini")
notused% = WritePrivateProfileString("Agent", "GatewaySession", 0, "org2.ini")
notused% = WritePrivateProfileString("Agent", "MailServer", 0, "org2.ini")
notused% = WritePrivateProfileString("Agent", "Mailfile", 0, "org2.ini")
CASE gLAPTOP$
CreateIniKeyValue iniPath$, "Agent", "AgentName", GetSymbolValue("AGENTNAME"), cmoOverwrite
CreateIniKeyValue iniPath$, "Agent", "GatewaySession", GetSymbolValue("NOTESINSTALLTYPE"), cmoOverwrite
CreateIniKeyValue iniPath$, "Agent", "CanSaveDrafts", "0", cmoOverwrite
CreateIniKeyValue ini2Path$, "Scheduling", "ExpectedVIM", "NOTES", cmoOverwrite
notused% = WritePrivateProfileString("Agent", "UserName", 0, "org2.ini")
notused% = WritePrivateProfileString("Agent", "ContainerPath", 0, "org2.ini")
notused% = WritePrivateProfileString("Agent", "CCDownFrequency", 0, "org2.ini")
END SELECT
' CreateIniKeyValue iniPath$, "Agent", "Password", GetSymbolValue("AGENTPASSWORD"), cmoOverwrite
notused% = WritePrivateProfileString("Agent", "RetryFrequency", 0, "org2.ini")
CreateIniKeyValue iniPath$, "Agent", "PollFrequency", GetSymbolValue("POLLFREQUENCY"), cmoOverwrite
If GetSymbolValue("LOGFILEDIR") <> "" Then
CreateIniKeyValue iniPath$, "Agent", "LogFilesDir", GetSymbolValue("LOGFILEDIR"), cmoOverwrite
Else
CreateIniKeyValue iniPath$, "Agent", "LogFilesDir", Lot_WhereIsFeature(prodno%, "OWAINI2", LdString( SID_ORG_INI2NAME )), cmoOverwrite
End If
If Lot_IsTheFeatureInstalled("OWAAGTNOTESADINWIN") <> FALSE Then
STRING_BUF_LEN = 256
StringBuf$ = STRING$(STRING_BUF_LEN, 0)
BytesRead% = GetPrivateProfileString("intl", "sList", "", StringBuf$, STRING_BUF_LEN, "win.ini")
StringBuf$=MID$(StringBuf$, 1, LEN(StringBuf$)-(STRING_BUF_LEN-BytesRead%))
Seperator$ = StringBuf$
iniPath$ = GetNotesDir()
StringBuf$ = STRING$(STRING_BUF_LEN, 0)
BytesRead%=GetPrivateProfileString("notes", "ServerTasks", "", StringBuf$, STRING_BUF_LEN, iniPath$)
StringBuf$=MID$(StringBuf$, 1, LEN(StringBuf$)-(STRING_BUF_LEN-BytesRead%))
If BytesRead% = 0 Then
CreateIniKeyValue iniPath$, "Notes", "ServerTasks", Lot_WhereIsFeature(prodno%, "OWAAGTNOTESADINWIN", "_orgagnt.exe")+"_orgagnt.exe", cmoOverwrite
else
' StringBuf2$ = GetIniKeyString(iniPath$,"Notes", "ServerTasks")
' StringBuf3$ = Lot_WhereIsFeature(prodno%, "OWAAGTNOTESADINWIN", "_orgagnt.exe")+"_orgagnt.exe"
If INSTR (1, GetIniKeyString(iniPath$,"Notes", "ServerTasks"), Lot_WhereIsFeature(prodno%, "OWAAGTNOTESADINWIN", "_orgagnt.exe")+"_orgagnt.exe", 1) = 0 Then
' CreateIniKeyValue iniPath$, "Notes", "ServerTasks", StringBuf$+Seperator$+Lot_WhereIsFeature(prodno%, "OWAAGTNOTESADINWIN", "_orgagnt.exe")+"_orgagnt.exe", cmoOverwrite
CreateIniKeyValue iniPath$, "Notes", "ServerTasks", StringBuf$+","+Lot_WhereIsFeature(prodno%, "OWAAGTNOTESADINWIN", "_orgagnt.exe")+"_orgagnt.exe", cmoOverwrite
End If
End If
End If
END FUNCTION
'*************************************************************************
'** OWAOPT1CB
'** Purpose: This is dialog callback for organizer agent screen 1
'*************************************************************************
SUB OWACCMAILOPTCB (hDlg%, CtrlId%, Classes$, Inst%)
DIM count%, notused%, page1%, page2%
SELECT CASE Classes$
CASE "__DLGINIT"
FOR count% = 1 to SID_ORG_NUMNETWORKTYPES
SetListItem "IDC_COMBO1", count%, LdString( SID_ORG_NETWORK_TYPE0 + count% )
NEXT
AddListItem SYM_UPDATELIST$, "IDC_COMBO1"
SetSymbolValue "NETWORKTYPE", LdString( SID_ORG_NETWORK_FILE0 + 1 )
SetSymbolValue "NOTESSERVER", "OWAAGTVIMNOTESWIN"
SetListItem "IDC_EDIT", 2, "60"
SetListItem "IDC_EDIT", 4, Lot_TrimEndSlash(GetSymbolValue("OWADIR"))
AddListItem SYM_UPDATELIST$, "IDC_EDIT2"
AddListItem SYM_UPDATELIST$, "IDC_EDIT4"
CASE "IDC_COMBO1"
SetSymbolValue "NETWORKTYPE", LdString( SID_ORG_NETWORK_FILE0 + Inst% )
CASE "IDC_OK"
SetSymbolValue "AGENTNAME", GetListItem("IDC_EDIT", 1)
SetSymbolValue "AGENTPASSWORD", ""
SetSymbolValue "POLLFREQUENCY", STR$(VAL(GetListItem("IDC_EDIT", 2)))
If IsNumeric(GetListItem("IDC_EDIT", 2)) Then
If VAL(GetListItem("IDC_EDIT", 2)) > 30000 Then
ErrorMsgNoDlgExit 0, LdString( SID_ORG_BIGNUMBER )
End If
If VAL(GetListItem("IDC_EDIT", 2)) < 0 Then
ErrorMsgNoDlgExit 0, LdString( SID_ORG_SMALLNUMBER )
End If
Else
ErrorMsgNoDlgExit 0, LdString( SID_ORG_INVALIDNUMBER )
End If
SetSymbolValue "CONTAINERPATH", GetListItem("IDC_EDIT", 3)
SetSymbolValue "LOGFILEDIR", GetListItem("IDC_EDIT", 4)
CASE "IDC_BACK"
CASE "IDC_HELP"
CASE "IDC_EXIT"
END SELECT
END SUB
'*************************************************************************
'** OWAOPT1CB
'** Purpose: This is dialog callback for organizer agent screen 1
'*************************************************************************
SUB OWANOTESOPTCB (hDlg%, CtrlId%, Classes$, Inst%)
DIM count%, notused%, page1%, page2%
SELECT CASE Classes$
CASE "__DLGINIT"
FOR count% = 1 to SID_ORG_NUMNETWORKTYPES
SetListItem "IDC_COMBO1", count%, LdString( SID_ORG_NETWORK_TYPE0 + count% )
NEXT
AddListItem SYM_UPDATELIST$, "IDC_COMBO1"
SetSymbolValue "NETWORKTYPE", LdString( SID_ORG_NETWORK_FILE0 + 1 )
SetListItem "IDC_B", 1, "T"
SetListItem "IDC_B", 2, "F"
SetListItem "IDC_EDIT", 2, "60"
SetListItem "IDC_EDIT", 3, Lot_TrimEndSlash(GetSymbolValue("OWADIR"))
SetSymbolValue "NOTESSERVER", "OWAAGTVIMNOTESWIN"
AddListItem SYM_UPDATELIST$, "IDC_B1"
AddListItem SYM_UPDATELIST$, "IDC_B2"
AddListItem SYM_UPDATELIST$, "IDC_EDIT2"
AddListItem SYM_UPDATELIST$, "IDC_EDIT3"
CASE "IDC_COMBO1"
SetSymbolValue "NETWORKTYPE", LdString( SID_ORG_NETWORK_FILE0 + Inst% )
CASE "IDC_B"
IF inst% = 1 Then
SetListItem "IDC_B", 1, "T"
SetListItem "IDC_B", 2, "F"
else
SetListItem "IDC_B", 2, "T"
SetListItem "IDC_B", 1, "F"
End If
CASE "IDC_EDIT"
IF inst% = 2 Then
End If
CASE "IDC_OK"
SetSymbolValue "AGENTNAME", GetListItem("IDC_EDIT", 1)
SetSymbolValue "AGENTPASSWORD", ""
SetSymbolValue "POLLFREQUENCY", STR$(VAL(GetListItem("IDC_EDIT", 2)))
If IsNumeric(GetListItem("IDC_EDIT", 2)) Then
If VAL(GetListItem("IDC_EDIT", 2)) > 30000 Then
ErrorMsgNoDlgExit 0, LdString( SID_ORG_BIGNUMBER )
End If
If VAL(GetListItem("IDC_EDIT", 2)) < 0 Then
ErrorMsgNoDlgExit 0, LdString( SID_ORG_SMALLNUMBER )
End If
Else
ErrorMsgNoDlgExit 0, LdString( SID_ORG_INVALIDNUMBER )
End If
SetSymbolValue "LOGFILEDIR", GetListItem("IDC_EDIT", 3)
SetSymbolValue "CONTAINERPATH", ""
if GetListItem("IDC_B", 1) = "T" Then
SetSymbolValue "NOTESSERVER", "OWAAGTVIMNOTESWIN"
SetSymbolValue "NOTESINSTALLTYPE", "0"
Else
SetSymbolValue "NOTESSERVER", "OWAAGTNOTESADINWIN"
SetSymbolValue "NOTESINSTALLTYPE", "1"
End If
CASE "IDC_BACK"
CASE "IDC_HELP"
CASE "IDC_EXIT"
END SELECT
END SUB