//
//	Configures all options relating to this adapter.
//
//		$0 = Source directory
//		$1 = Option
//		$2 = Parameters Key - not used
//		$3 = AdapterServiceName - not used
//
//		$R0 = Status 
//
[ConfigureAdapter-PAMA]

	set SrcDir = $($0)
	set Option = $($1)
	set KeyParameters = $($2)
	set AdapterServiceName = $($3)
	_Enter("ConfigureAdapter-PAMA", _Show(SrcDir)_Show(Option)_Show(KeyParameters)_Show(AdapterServiceName))

   #if defined(SUPPORT_HOUSTON) || defined(SUPPORT_LONDON)
   set CfgDllPath = $(!STF_CWDDIR)"DigiInf.dll"
   #endif
   #if defined(SUPPORT_CHASKA)
   set CfgDllPath = $(!STF_CWDDIR)"dgarinf.dll"
   #endif
   #if defined(SUPPORT_CLYDESDALE) || defined(SUPPORT_SYNC570)
   set CfgDllPath = $(!STF_CWDDIR)"dgdsinf.dll"
   #endif
   #if defined(SUPPORT_ACCELEPORT_2000)
   set CfgDllPath = $(!STF_CWDDIR)"dgaxinf.dll"
   #endif
   set CfgDllEntry = "Configure"

	set Status = "STATUS_USERCANCEL"

	_SubroutineShell PopBillboard
	LoadLibrary "x" $(CfgDllPath) DIGIHANDLE
	_Call("LibraryProcedure "$(CfgDllEntry), _Show(!STF_HWND)_Show(Option)_Show(AdapterServiceName))
   LibraryProcedure Result $(DIGIHANDLE) $(CfgDllEntry) $(!STF_HWND) $(Option) $(AdapterServiceName)
	_Return("LibraryProcedure "$(CfgDllEntry), _Show(Result))
	FreeLibrary $(DIGIHANDLE)

	ifstr(i) $(Result) != "OK"
		read-syms InstallMessages-$(!STF_LANGUAGE)
      _LocalShell SetupMessage "FATAL" $(CfgDllFailed)
	endif

Exit = +

	_Exit("ConfigureAdapter-PAMA", _Show(Status))
	Return $(Status)
