You do not need to change the extension of the
.c
files in order to make a DLL. Take a look at
this article[
^] which explains how to create a simple DLL, and also the link that
macika123[
^] provided on how to use P/Invoke. Assuming that you have some version of Visual Studio or Visual C++ Express then you will find a template project for DLLs which you can use, just add your code into the relevant places.