First you have get the ID of the Process you are looking for. Use the EnumProcesses function described here to find your desired process. There is a nice example provided to list all processes and their names, that you can use as a starting point.
As the second step you can list all of the modules, that is the DLLs loaded by each process.
Use the EnumProcessModules function.
This example does mostly what you want, you only need to add some more check code to filter for your process and your module.