//
//	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))

   set CfgDllPath = $(!STF_CWDDIR)"DigiInf.Dll"
   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)
