Run Mafia II and verify that your custom DLL is loaded. You can do this by checking the game's console output or using in-game tools.
Find the directory where Mafia II is installed (e.g., C:\Program Files\Mafia II ).
Now, write your custom DLL code (C++). You can use the Apex SDK documentation and Mafia II's game code as references.