First, you need to compile and link a C or COBOL function into a Dynamic Link Library (DLL). Building a Dynamic Link Library explains how to build a DLL and provides sample code.