Okay, here it goes:
1) Create a new empty project (with nothing in it)
2) In the solution explorer, right click on the solution(should be second from top) and click properties.
3) In the top of the properties window click configuration manager.
4) Set the active solution configuration to release and close the configuration manager.
5) In the properties window, click "Configuration Properties->General"
6) Set "Project defaults->Configuration Type" to dynamic link library.
7) Close the properties window.
8) Add a source file(.cpp) somewhere in the solution.
9) Add this code to it:
#define DLLEXPORT extern "C" __declspec(dllexport)
10) Create your dll functions. All functions accessible to dark basic must be marked with DLLEXPORT before the declaration.
11) To test your code, compile the solution and copy the output dll file to any darkbasic projects folder. You can use it with the call dll and load dll commands. When using the call dll command, the entry point name is the same as the name of the function in c++.