'編譯為conversion.sll檔案
#COMPILE SLL "conversion.sll"
#DIM ALL
'由毫米換算成吋的函數
FUNCTION MillimetersToInches (BYVAL mm AS DOUBLE) COMMON AS DOUBLE
FUNCTION = mm * 0.03937#
END FUNCTION
#COMPILE DLL "conversion.dll"
#DIM ALL
FUNCTION LIBMAIN (BYVAL hInstance AS LONG, _
BYVAL fwdReason AS LONG, _
BYVAL lpvReserved AS LONG) AS LONG
SELECT CASE fwdReason
CASE %DLL_PROCESS_ATTACH
FUNCTION = 1
CASE %DLL_PROCESS_DETACH
FUNCTION = 1
CASE %DLL_THREAD_ATTACH
FUNCTION = 1
CASE %DLL_THREAD_DETACH
FUNCTION = 1
END SELECT
END FUNCTION
'由毫米換算成吋的函數
FUNCTION MillimetersToInches ALIAS "MillimetersToInches" (BYVAL mm AS DOUBLE) EXPORT AS DOUBLE
FUNCTION = mm * 0.03937#
END FUNCTION