The initialization procedure can be any exported function. The trick is that "other applications need to call it." To enforce it, you will need to check to see if it was called in almost any other exported function. If each exported function has some common prefix code, this would be a good place to check if the initialization function was called.
If, however, you need to check whether it was called at each entry point, it may be easier for DLL consumers if you actually call this function automatically if it was not called. This requires some extra work to make it thread safe. You will need a critical section (or mutex, semaphore, etc.) to ensure that it is called only once.
source share