You can't be sure that your dll is loaded. You can call loadlibrary and it will always work. If it's already loaded nothing will happen, if not it will be. Can't be better
Edit: I noticed in your source you call loadlibrary and then call GetModuleHandle. That's unnessecary as if I remember correctly you can use the handle from loadlibrary for your call to getprocaddress.