OK - maybe I misunderstood your original question - the purpose of UFFI is to call functions in DLLs outside Pharo, so yes, if you would like to call that kind of function, you have to build a DLL. The usage of UFFI is well described in its booklet:��
https://books.pharo.org/booklet-uffi/.