I am creating a logging .dll utility. Which shud support multithreading.
I am a bit confused about how shud I be handling multithreading using MUTEX.

From the application(using my dll) I can call initializelog() function which get's the necessary data from properties file etc, and logmin(),logmid() and logmax() functions which passes the messages to the dll to log. Now if I have many threads running in my application and each thread calls any of the above functions. It should pass the message and the thread ID to dll to log. I know the Mutex function which synhronises the threads. But am confused WERE and HOW to use this in my DLL to synchronise the threads one at a time.

Please help me out to solve this..
THANKS