sdk-api-src/content/traceloggingprovider/nf-traceloggingprovider-traceloggingunregister.md:60:returning from `main`, `wmain`, or `WinMain`, in `DllMain(DLL_PROCESS_DETACH)`,
sdk-api-src/content/traceloggingprovider/index.md:43:- At component startup (e.g. in `main`, `wmain`, `DllMain`, or `DriverEntry`),
sdk-api-src/content/traceloggingprovider/nf-traceloggingprovider-tracelogging_define_provider.md:143:`DllMain(DLL_PROCESS_ATTACH)`, or `DriverEntry`. At component shutdown,
sdk-api-src/content/traceloggingprovider/nf-traceloggingprovider-traceloggingregister.md:78:e.g. in `main`, `wmain`, `WinMain`, `DllMain(DLL_PROCESS_ATTACH)`, or
sdk-api-src/content/shellapi/nf-shellapi-shellexecuteexw.md:88:When DLLs are loaded into your process, you acquire a lock known as a <a href="/windows/win32/win7appqual/preventing-hangs-in-windows-applications">loader lock</a>. The <a href="/windows/desktop/Dlls/dllmain">DllMain</a> function always executes under the loader lock. It is important that you do not call <b>ShellExecuteEx</b> while you hold a loader lock. Because <b>ShellExecuteEx</b> is extensible, you could load code that does not function properly in the presence of a loader lock, risking a deadlock and therefore an unresponsive thread.
sdk-api-src/content/shellapi/nf-shellapi-shellexecuteexa.md:88:When DLLs are loaded into your process, you acquire a lock known as a <a href="/windows/win32/win7appqual/preventing-hangs-in-windows-applications">loader lock</a>. The <a href="/windows/desktop/Dlls/dllmain">DllMain</a> function always executes under the loader lock. It is important that you do not call <b>ShellExecuteEx</b> while you hold a loader lock. Because <b>ShellExecuteEx</b> is extensible, you could load code that does not function properly in the presence of a loader lock, risking a deadlock and therefore an unresponsive thread.
sdk-api-src/content/gdiplusinit/nf-gdiplusinit-gdiplusstartup.md:87:Do not call <b>GdiplusStartup</b> or <a href="/windows/desktop/api/gdiplusinit/nf-gdiplusinit-gdiplusshutdown">GdiplusShutdown</a> in <a href="/windows/desktop/Dlls/dllmain">DllMain</a> or in any function that is called by DllMain. If you want to create a DLL that uses GDI+, you should use one of the following techniques to initialize GDI+:
sdk-api-src/content/evntrace/nf-evntrace-stoptracew.md:170:Do not call **StopTrace** from DllMain (may cause deadlock).
sdk-api-src/content/evntrace/nf-evntrace-flushtracew.md:161:Do not call **FlushTrace** from DllMain (may cause deadlock).
sdk-api-src/content/evntrace/nf-evntrace-controltracew.md:213:> It is not safe to flush buffers or stop a trace session from DllMain
sdk-api-src/content/evntrace/nf-evntrace-flushtracea.md:161:Do not call **FlushTrace** from DllMain (may cause deadlock).
sdk-api-src/content/evntrace/nf-evntrace-controltracea.md:213:> It is not safe to flush buffers or stop a trace session from DllMain
sdk-api-src/content/evntrace/nf-evntrace-stoptracea.md:170:Do not call **StopTrace** from DllMain (may cause deadlock).
sdk-api-src/content/wininet/nf-wininet-ftpremovedirectoryw.md:81:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/wininet/nf-wininet-internetgetconnectedstate.md:161:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/wininet/nf-wininet-internetinitializeautoproxydll.md:75:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/wininet/nf-wininet-findfirsturlcacheentryexa.md:205:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/wininet/nf-wininet-httpaddrequestheadersw.md:162:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/wininet/nf-wininet-gophergetlocatortypea.md:79:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/wininet/nf-wininet-internetconfirmzonecrossingw.md:123:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/wininet/nf-wininet-geturlcacheentryinfoexw.md:132:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/wininet/nf-wininet-internetconfirmzonecrossing.md:123:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/wininet/nf-wininet-httpendrequesta.md:93:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/wininet/nf-wininet-findfirsturlcachegroup.md:121:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/wininet/nf-wininet-createurlcacheentryw.md:108:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/wininet/nf-wininet-internetautodial.md:134:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/wininet/nf-wininet-interneterrordlg.md:409:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/wininet/nf-wininet-ftpdeletefilea.md:78:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/wininet/nf-wininet-ftpputfilew.md:215:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/wininet/nf-wininet-internetgetlastresponseinfow.md:92:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/wininet/nf-wininet-internetsetoptiona.md:93:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/wininet/nf-wininet-findfirsturlcacheentrya.md:94:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/wininet/nf-wininet-internetgetlastresponseinfoa.md:92:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/wininet/nf-wininet-internetdiala.md:191:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/wininet/nf-wininet-ftprenamefilew.md:82:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/wininet/nf-wininet-internetgetpersitecookiedecisiona.md:79:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/wininet/nf-wininet-geturlcacheentryinfoa.md:116:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/wininet/nf-wininet-ftpgetcurrentdirectorya.md:82:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/wininet/nf-wininet-internetgetpersitecookiedecisionw.md:79:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/wininet/nf-wininet-internetopenurla.md:339:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/wininet/nf-wininet-ftpputfilea.md:215:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/wininet/nf-wininet-internetcanonicalizeurla.md:223:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/wininet/nf-wininet-internetsetstatuscallback.md:87:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/wininet/nf-wininet-httpopenrequestw.md:348:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/wininet/nf-wininet-readurlcacheentrystream.md:91:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/wininet/nf-wininet-findnexturlcachegroup.md:80:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/wininet/nf-wininet-internetsetstatuscallbackw.md:78:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/wininet/nf-wininet-ftpcreatedirectoryw.md:82:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/wininet/nf-wininet-geturlcacheentryinfow.md:116:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/wininet/nf-wininet-internetdial.md:191:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/wininet/nf-wininet-ftpsetcurrentdirectoryw.md:81:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/wininet/nf-wininet-ftpopenfilew.md:217:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/wininet/nf-wininet-gopheropenfilea.md:164:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/wininet/nf-wininet-ftpcreatedirectorya.md:82:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/wininet/nf-wininet-findfirsturlcacheentryw.md:94:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/wininet/nf-wininet-internetenumpersitecookiedecisionw.md:83:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/wininet/nf-wininet-internetquerydataavailable.md:96:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/wininet/nf-wininet-privacysetzonepreferencew.md:147:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/wininet/nf-wininet-findnexturlcacheentrya.md:115:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/wininet/nf-wininet-httpsendrequesta.md:112:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/wininet/nf-wininet-gopherfindfirstfilea.md:177:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/wininet/nf-wininet-httpqueryinfoa.md:114:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/wininet/nf-wininet-internetopenw.md:211:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/wininet/nf-wininet-internetdialw.md:191:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/wininet/nf-wininet-findnexturlcacheentryw.md:115:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/wininet/nf-wininet-gophergetattributea.md:120:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/wininet/nf-wininet-ftpdeletefilew.md:78:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/wininet/nf-wininet-retrieveurlcacheentryfilea.md:121:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/wininet/nf-wininet-ftpfindfirstfilew.md:132:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/wininet/nf-wininet-createurlcacheentrya.md:108:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/wininet/nf-wininet-internetenumpersitecookiedecisiona.md:83:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/wininet/nf-wininet-httpendrequestw.md:93:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/wininet/nf-wininet-commiturlcacheentrya.md:244:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/wininet/nf-wininet-seturlcacheentrygroup.md:120:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/wininet/nf-wininet-internetreadfile.md:112:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/wininet/nf-wininet-internetsetcookiew.md:92:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/wininet/nf-wininet-internetgetcookiea.md:143:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/wininet/nf-wininet-unlockurlcacheentryfilea.md:78:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/wininet/nf-wininet-ftprenamefilea.md:82:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/wininet/nf-wininet-ftpfindfirstfilea.md:132:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/wininet/nf-wininet-resumesuspendeddownload.md:76:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/wininet/nf-wininet-ftpgetfilew.md:226:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/wininet/nc-wininet-internet_status_callback.md:435:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/wininet/nf-wininet-commiturlcacheentryw.md:245:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/wininet/nf-wininet-ftpcommanda.md:124:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/wininet/nf-wininet-findfirsturlcacheentryexw.md:205:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/wininet/nf-wininet-gophercreatelocatorw.md:112:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/wininet/nf-wininet-internetlockrequestfile.md:83:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/wininet/nf-wininet-ftpgetcurrentdirectoryw.md:82:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/wininet/nf-wininet-internetsetpersitecookiedecisionw.md:75:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/wininet/nf-wininet-httpopenrequesta.md:348:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/wininet/nf-wininet-internetclosehandle.md:82:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/wininet/nf-wininet-internetcrackurlw.md:130:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/wininet/nf-wininet-internetconfirmzonecrossinga.md:123:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/wininet/nf-wininet-ftpopenfilea.md:217:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/wininet/nf-wininet-gophercreatelocatora.md:112:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/wininet/nf-wininet-ftpsetcurrentdirectorya.md:81:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/wininet/nf-wininet-httpqueryinfow.md:114:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/wininet/nf-wininet-internetcrackurla.md:130:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/wininet/nf-wininet-internetattemptconnect.md:69:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/wininet/nf-wininet-retrieveurlcacheentrystreamw.md:130:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/wininet/nf-wininet-internetgetcookiew.md:143:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/wininet/nf-wininet-seturlcacheentrygroupa.md:120:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/wininet/nf-wininet-retrieveurlcacheentryfilew.md:121:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/wininet/nf-wininet-findnexturlcacheentryexw.md:95:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/wininet/nf-wininet-internetsetfilepointer.md:158:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/wininet/nf-wininet-createmd5ssohash.md:83:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/wininet/nf-wininet-internetsetpersitecookiedecisiona.md:75:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/wininet/nf-wininet-httpsendrequestw.md:112:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/wininet/nf-wininet-httpaddrequestheadersa.md:162:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/wininet/nf-wininet-findnexturlcacheentryexa.md:95:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/wininet/nf-wininet-internetwritefile.md:88:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/wininet/nf-wininet-internetcanonicalizeurlw.md:223:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/wininet/nf-wininet-internetsetoptionw.md:93:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/wininet/nf-wininet-gopherfindfirstfilew.md:177:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/wininet/nf-wininet-internetgetconnectedstateexw.md:166:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/wininet/nf-wininet-internetconnecta.md:295:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/wininet/nf-wininet-internetopenurlw.md:339:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/wininet/nf-wininet-ftpremovedirectorya.md:81:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/wininet/nf-wininet-internetconnectw.md:295:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/wininet/nf-wininet-ftpcommandw.md:124:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/wininet/nf-wininet-retrieveurlcacheentrystreama.md:130:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/wininet/nf-wininet-internetsetcookiea.md:92:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/wininet/nf-wininet-gopheropenfilew.md:164:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/wininet/nf-wininet-internetsetstatuscallbacka.md:78:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/wininet/nf-wininet-gophergetattributew.md:120:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/wininet/nf-wininet-internetgetconnectedstateexa.md:166:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/wininet/nf-wininet-unlockurlcacheentryfile.md:78:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/wininet/nf-wininet-ftpgetfilea.md:226:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/wininet/nf-wininet-seturlcacheentrygroupw.md:120:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/wininet/nf-wininet-gophergetlocatortypew.md:79:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/wininet/nf-wininet-unlockurlcacheentryfilew.md:78:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/wininet/nf-wininet-internetopena.md:211:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/wininet/nf-wininet-internetgetconnectedstateex.md:161:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/wininet/nf-wininet-internetqueryoptiona.md:95:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/wininet/nf-wininet-privacygetzonepreferencew.md:87:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/wininet/nf-wininet-internetautodialhangup.md:72:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/wininet/nf-wininet-geturlcacheentryinfoexa.md:132:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/wininet/nf-wininet-internetqueryoptionw.md:95:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/wbemglue/nf-wbemglue-cwbemproviderglue-frameworklogindll(lpcwstr).md:4:description: The FrameworkLoginDLL method is called when the DLL_PROCESS_ATTACH value is sent to DllMain to determine whether the provider server can be loaded. (overload 1/2)
sdk-api-src/content/wbemglue/nf-wbemglue-cwbemproviderglue-frameworklogindll(lpcwstr).md:62:The <b>FrameworkLoginDLL</b> method is called when the DLL_PROCESS_ATTACH value is sent to DllMain to determine whether the provider server can be loaded.
sdk-api-src/content/wbemglue/nf-wbemglue-cwbemproviderglue-frameworklogindll(lpcwstr).md:76:The <b>FrameworkLoginDLL</b> method should be called from DllMain when the <i>fdwReason</i> parameter has the value DLL_PROCESS_ATTACH. If <b>FrameworkLoginDLL</b> returns <b>FALSE</b>, the server should return <b>FALSE</b> from DllMain to fail the load.
sdk-api-src/content/wbemglue/nl-wbemglue-cwbemproviderglue.md:73:Called when the DLL_PROCESS_ATTACH value is sent to <a href="/windows/desktop/Dlls/dllmain">DllMain</a> to determine whether the provider server can be loaded.
sdk-api-src/content/wbemglue/nf-wbemglue-cwbemproviderglue-frameworklogindll(lpcwstr_plong).md:4:description: The FrameworkLoginDLL method is called when the DLL_PROCESS_ATTACH value is sent to DllMain to determine whether the provider server can be loaded. (overload 2/2)
sdk-api-src/content/wbemglue/nf-wbemglue-cwbemproviderglue-frameworklogindll(lpcwstr_plong).md:62:The <b>FrameworkLoginDLL</b> method is called when the DLL_PROCESS_ATTACH value is sent to DllMain to determine whether the provider server can be loaded.
sdk-api-src/content/wbemglue/nf-wbemglue-cwbemproviderglue-frameworklogindll(lpcwstr_plong).md:80:The <b>FrameworkLoginDLL</b> method should be called from DllMain when the <i>fdwReason</i> parameter has the value DLL_PROCESS_ATTACH. If <b>FrameworkLoginDLL</b> returns <b>FALSE</b>, the server should return <b>FALSE</b> from DllMain to fail the load.
sdk-api-src/content/mgmtapi/nf-mgmtapi-snmpmgrtraplisten.md:132:<a href="/windows/desktop/Dlls/dllmain">DllMain</a> entry-point function.
sdk-api-src/content/mgmtapi/nf-mgmtapi-snmpmgrclose.md:78:<a href="/windows/desktop/Dlls/dllmain">DllMain</a> entry-point function.<p class="note"><b>SnmpMgrClose</b> must not be called when the application DLL is in the process of unloading.
sdk-api-src/content/winsock2/nf-winsock2-wsastartup.md:297:<b>WSAStartup</b> function should not be called from the DllMain function in a application DLL. This can potentially cause deadlocks. For more information, please see the <a href="/windows/win32/dlls/dllmain">DLL Main Function</a>.
sdk-api-src/content/winsock2/nf-winsock2-wsacleanup.md:140:<b>WSACleanup</b> function should not be called from the DllMain function in a application DLL. This can potentially cause deadlocks. For more information, please see the <a href="/windows/win32/dlls/dllmain">DLL Main Function</a>.
sdk-api-src/content/combaseapi/nf-combaseapi-coinitializeex.md:138:Because there is no way to control the order in which in-process servers are loaded or unloaded, do not call <a href="/windows/desktop/api/objbase/nf-objbase-coinitialize">CoInitialize</a>, <b>CoInitializeEx</b>, or <a href="/windows/desktop/api/combaseapi/nf-combaseapi-couninitialize">CoUninitialize</a> from the <a href="/windows/desktop/Dlls/dllmain">DllMain</a> function.
sdk-api-src/content/combaseapi/nf-combaseapi-codecrementmtausage.md:74:Don't call <b>CoDecrementMTAUsage</b> during process shutdown or inside dllmain. You can call <b>CoDecrementMTAUsage</b> before the call to start the shutdown process.
sdk-api-src/content/combaseapi/nf-combaseapi-coincrementmtausage.md:76:Don't call <b>CoIncrementMTAUsage</b> during process shutdown or inside dllmain. You can call <b>CoIncrementMTAUsage</b> before the call to start the shutdown process. 
sdk-api-src/content/combaseapi/nf-combaseapi-couninitialize.md:76:Because there is no way to control the order in which in-process servers are loaded or unloaded, do not call <a href="/windows/desktop/api/objbase/nf-objbase-coinitialize">CoInitialize</a>, <a href="/windows/desktop/api/combaseapi/nf-combaseapi-coinitializeex">CoInitializeEx</a>, or <b>CoUninitialize</b> from the <a href="/windows/desktop/Dlls/dllmain">DllMain</a> function.
sdk-api-src/content/muiload/nf-muiload-loadmuilibrarya.md:164:<b>LoadMUILibrary</b> is built on the function <a href="/windows/desktop/api/libloaderapi/nf-libloaderapi-loadlibraryexa">LoadLibraryEx</a>, and similar considerations need to be applied to its usage. In particular, <a href="/windows/desktop/api/muiload/nf-muiload-freemuilibrary">FreeMUILibrary</a> should be called for any handle returned by <b>LoadMUILibrary</b>. Also, <b>LoadMUILibrary</b> should not be called from <a href="/windows/desktop/Dlls/dllmain">DllMain</a>. For more information see the Remarks sections of <a href="/windows/desktop/api/libloaderapi/nf-libloaderapi-loadlibraryexa">LoadLibraryEx</a> and <a href="/windows/desktop/api/libloaderapi/nf-libloaderapi-freelibrary">FreeLibrary</a>.
sdk-api-src/content/muiload/nf-muiload-loadmuilibraryw.md:164:<b>LoadMUILibrary</b> is built on the function <a href="/windows/desktop/api/libloaderapi/nf-libloaderapi-loadlibraryexa">LoadLibraryEx</a>, and similar considerations need to be applied to its usage. In particular, <a href="/windows/desktop/api/muiload/nf-muiload-freemuilibrary">FreeMUILibrary</a> should be called for any handle returned by <b>LoadMUILibrary</b>. Also, <b>LoadMUILibrary</b> should not be called from <a href="/windows/desktop/Dlls/dllmain">DllMain</a>. For more information see the Remarks sections of <a href="/windows/desktop/api/libloaderapi/nf-libloaderapi-loadlibraryexa">LoadLibraryEx</a> and <a href="/windows/desktop/api/libloaderapi/nf-libloaderapi-freelibrary">FreeLibrary</a>.
sdk-api-src/content/imagehlp/nf-imagehlp-rebaseimage.md:120:<a href="/windows/desktop/Dlls/dllmain">DllMain</a> function is called, if one is present.
sdk-api-src/content/imagehlp/nf-imagehlp-rebaseimage.md:130:<a href="/windows/desktop/Dlls/dllmain">DllMain</a>
sdk-api-src/content/imagehlp/nf-imagehlp-rebaseimage64.md:117:<a href="/windows/desktop/Dlls/dllmain">DllMain</a> function is called, if one is present.
sdk-api-src/content/imagehlp/nf-imagehlp-rebaseimage64.md:127:<a href="/windows/desktop/Dlls/dllmain">DllMain</a>
sdk-api-src/content/evntprov/nf-evntprov-eventregister.md:156:during application exit. A dynamic library (DLL) might register in `DllMain`
sdk-api-src/content/evntprov/nf-evntprov-eventregister.md:157:during process attach and might unregister in `DllMain` during process detach.
sdk-api-src/content/winsock/nf-winsock-wsacleanup.md:140:<b>WSACleanup</b> function should not be called from the DllMain function in a application DLL. This can potentially cause deadlocks. For more information, please see the <a href="/windows/win32/dlls/dllmain">DLL Main Function</a>.
sdk-api-src/content/winsock/nf-winsock-wsastartup.md:293:<b>WSAStartup</b> function should not be called from the DllMain function in a application DLL. This can potentially cause deadlocks. For more information, please see the <a href="/windows/win32/dlls/dllmain">DLL Main Function</a>.
sdk-api-src/content/winnt/nf-winnt-tpsetcallbackracewithdll.md:67:You should call this function if a callback might acquire the loader lock. This prevents a deadlock from occurring when one thread in DllMain is waiting for the callback to end, and another thread that is executing the callback attempts to acquire the loader lock.
sdk-api-src/content/winnt/nf-winnt-tpsetcallbackracewithdll.md:69:If the DLL containing the callback might be unloaded, the cleanup code in DllMain must cancel outstanding callbacks before releasing the object.
sdk-api-src/content/wincrypt/nf-wincrypt-cryptinstalloidfunctionaddress.md:59:This parameter is updated with the <i>hModule</i> parameter passed to <b>DllMain</b> to prevent the DLL that contains the function addresses from being unloaded by 
sdk-api-src/content/winbase/nf-winbase-loadpackagedlibrary.md:98:<a href="/windows/desktop/Dlls/dllmain">DllMain</a>. For more information, see the Remarks section in 
sdk-api-src/content/winbase/nf-winbase-loadpackagedlibrary.md:99:<b>DllMain</b>.
sdk-api-src/content/winbase/nf-winbase-setthreadpoolcallbacklibrary.md:67:You should call this function if a callback might acquire the loader lock. This prevents a deadlock from occurring when one thread in DllMain is waiting for the callback to end, and another thread that is executing the callback attempts to acquire the loader lock.
sdk-api-src/content/winbase/nf-winbase-setthreadpoolcallbacklibrary.md:69:If the DLL containing the callback might be unloaded, the cleanup code in DllMain must cancel outstanding callbacks before releasing the object.
sdk-api-src/content/libloaderapi/nf-libloaderapi-loadlibraryw.md:124:    DLL's <a href="/windows/desktop/Dlls/dllmain">DllMain</a> function with the
sdk-api-src/content/libloaderapi/nf-libloaderapi-loadlibraryw.md:126:    <b>DllMain</b> returns <b>TRUE</b>,
sdk-api-src/content/libloaderapi/nf-libloaderapi-loadlibraryw.md:128:    <b>DllMain</b> returns <b>FALSE</b>,
sdk-api-src/content/libloaderapi/nf-libloaderapi-loadlibraryw.md:132:    <b>DllMain</b>. For more information, see the Remarks section in
sdk-api-src/content/libloaderapi/nf-libloaderapi-loadlibraryw.md:133:    <b>DllMain</b>.
sdk-api-src/content/libloaderapi/nf-libloaderapi-loadlibraryw.md:232:<a href="/windows/desktop/Dlls/dllmain">DllMain</a>
sdk-api-src/content/libloaderapi/nf-libloaderapi-loadlibraryexa.md:122:         <a href="/windows/desktop/Dlls/dllmain">DllMain</a> for process and thread initialization and
sdk-api-src/content/libloaderapi/nf-libloaderapi-loadlibraryexa.md:393:      calling the <a href="/windows/desktop/Dlls/dllmain">DllMain</a> function of the DLL.</li>
sdk-api-src/content/libloaderapi/nf-libloaderapi-loadlibraryexa.md:416:    <a href="/windows/desktop/Dlls/dllmain">DllMain</a>. For more information, see the Remarks section in
sdk-api-src/content/libloaderapi/nf-libloaderapi-loadlibraryexa.md:417:    <b>DllMain</b>.
sdk-api-src/content/libloaderapi/nf-libloaderapi-loadlibraryexa.md:656:<a href="/windows/desktop/Dlls/dllmain">DllMain</a>
sdk-api-src/content/libloaderapi/nf-libloaderapi-freelibrary.md:85:<a href="/windows/desktop/Dlls/dllmain">DllMain</a> function, if it has one, with the DLL_PROCESS_DETACH value. Doing so gives the library module an opportunity to clean up resources allocated on behalf of the current process. After the entry-point function returns, the library module is removed from the address space of the current process.
sdk-api-src/content/libloaderapi/nf-libloaderapi-freelibrary.md:89:<a href="/windows/desktop/Dlls/dllmain">DllMain</a>. For more information, see the Remarks section in 
sdk-api-src/content/libloaderapi/nf-libloaderapi-freelibrary.md:90:<a href="/windows/desktop/Dlls/dllmain">DllMain</a>.
sdk-api-src/content/libloaderapi/nf-libloaderapi-freelibrary.md:109:<a href="/windows/desktop/Dlls/dllmain">DllMain</a>
sdk-api-src/content/libloaderapi/nf-libloaderapi-loadlibrarya.md:124:    DLL's <a href="/windows/desktop/Dlls/dllmain">DllMain</a> function with the
sdk-api-src/content/libloaderapi/nf-libloaderapi-loadlibrarya.md:126:    <b>DllMain</b> returns <b>TRUE</b>,
sdk-api-src/content/libloaderapi/nf-libloaderapi-loadlibrarya.md:128:    <b>DllMain</b> returns <b>FALSE</b>,
sdk-api-src/content/libloaderapi/nf-libloaderapi-loadlibrarya.md:132:    <b>DllMain</b>. For more information, see the Remarks section in
sdk-api-src/content/libloaderapi/nf-libloaderapi-loadlibrarya.md:133:    <b>DllMain</b>.
sdk-api-src/content/libloaderapi/nf-libloaderapi-loadlibrarya.md:232:<a href="/windows/desktop/Dlls/dllmain">DllMain</a>
sdk-api-src/content/libloaderapi/nf-libloaderapi-loadlibraryexw.md:123:         <a href="/windows/desktop/Dlls/dllmain">DllMain</a> for process and thread initialization and
sdk-api-src/content/libloaderapi/nf-libloaderapi-loadlibraryexw.md:391:      calling the <a href="/windows/desktop/Dlls/dllmain">DllMain</a> function of the DLL.</li>
sdk-api-src/content/libloaderapi/nf-libloaderapi-loadlibraryexw.md:414:    <a href="/windows/desktop/Dlls/dllmain">DllMain</a>. For more information, see the Remarks section in
sdk-api-src/content/libloaderapi/nf-libloaderapi-loadlibraryexw.md:415:    <b>DllMain</b>.
sdk-api-src/content/libloaderapi/nf-libloaderapi-loadlibraryexw.md:642:<a href="/windows/desktop/Dlls/dllmain">DllMain</a>
sdk-api-src/content/faxroute/nf-faxroute-faxrouteinitialize.md:83:The fax routing extension DLL should not perform provider-specific initialization when the fax service calls the <a href="/windows/desktop/Dlls/dllmain">DllMain</a> function, described in MSDN. Instead, the extension should do this when the fax service calls the <b>FaxRouteInitialize</b> function.
sdk-api-src/content/werapi/nf-werapi-werregisterruntimeexceptionmodule.md:83:(The DLL must also include the [DllMain](/windows/desktop/Dlls/dllmain) entry point.)
sdk-api-src/content/psapi/ns-psapi-moduleinfo.md:76:<a href="/windows/desktop/Dlls/dllmain">DllMain</a> function, it should be close enough for most purposes.
sdk-api-src/content/winineti/nf-winineti-internetautodialhangup.md:72:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/winineti/nf-winineti-internetgetconnectedstateex.md:161:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/winineti/nf-winineti-internetgetconnectedstate.md:161:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/winineti/nf-winineti-privacygetzonepreferencew.md:87:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/winineti/nf-winineti-internetenumpersitecookiedecisionw.md:83:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/winineti/nf-winineti-internetdiala.md:191:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/winineti/nf-winineti-internetdial.md:191:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/winineti/nf-winineti-internetgetconnectedstateexw.md:166:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/winineti/nf-winineti-createmd5ssohash.md:83:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/winineti/nf-winineti-internetenumpersitecookiedecisiona.md:83:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/winineti/nf-winineti-internetinitializeautoproxydll.md:72:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/winineti/nf-winineti-internetautodial.md:134:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/winineti/nf-winineti-privacysetzonepreferencew.md:147:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/winineti/nf-winineti-internetdialw.md:191:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/winineti/nf-winineti-internetgetconnectedstateexa.md:166:Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
sdk-api-src/content/uxtheme/nf-uxtheme-isappthemed.md:102:Do not call this function during <a href="/windows/desktop/Dlls/dllmain">DllMain</a> or global objects constructors. This may cause invalid return values.
sdk-api-src/content/uxtheme/nf-uxtheme-isthemeactive.md:97:Do not call this function during <a href="/windows/desktop/Dlls/dllmain">DllMain</a> or global objects constructors. This may cause invalid return values.
sdk-api-src/content/uxtheme/nf-uxtheme-getthemeappproperties.md:109:Do not call this function during <a href="/windows/desktop/Dlls/dllmain">DllMain</a> or global objects constructors. This may cause invalid return values.
sdk-api-src/content/dxgi/nf-dxgi-createdxgifactory.md:83:<div class="alert"><b>Note</b>  <b>CreateDXGIFactory</b> fails if your app's <a href="/windows/desktop/Dlls/dllmain">DllMain</a> function calls it. For more info about how DXGI responds from <b>DllMain</b>, see <a href="/windows/desktop/direct3ddxgi/d3d10-graphics-programming-guide-dxgi">DXGI Responses from DLLMain</a>.</div>
sdk-api-src/content/dxgi/nf-dxgi-createdxgifactory1.md:89:<div class="alert"><b>Note</b>  <b>CreateDXGIFactory1</b> fails if your app's <a href="/windows/desktop/Dlls/dllmain">DllMain</a> function calls it. For more info about how DXGI responds from <b>DllMain</b>, see <a href="/windows/desktop/direct3ddxgi/d3d10-graphics-programming-guide-dxgi">DXGI Responses from DLLMain</a>.</div>
sdk-api-src/content/objbase/nf-objbase-coinitialize.md:133:Because there is no way to control the order in which in-process servers are loaded or unloaded, do not call <b>CoInitialize</b>, <a href="/windows/desktop/api/combaseapi/nf-combaseapi-coinitializeex">CoInitializeEx</a>, or <a href="/windows/desktop/api/combaseapi/nf-combaseapi-couninitialize">CoUninitialize</a> from the <a href="/windows/desktop/Dlls/dllmain">DllMain</a> function.
sdk-api-src/content/wlanapi/nf-wlanapi-wlanregisternotification.md:285:Don't call <b>WlanRegisterNotification</b> from a callback function. If the client is in the middle of a notification callback when <b>WlanRegisterNotification</b> is called with <i>dwNotifSource</i> set to  <b>WLAN_NOTIFICATION_SOURCE_NONE</b> (that is, when the client is unregistering from notifications), then <b>WlanRegisterNotification</b> will wait for the callback to finish before returning a value. Calling this function inside a callback function will result in the call never completing. If both the callback function and the thread that unregisters from notifications try to acquire the same lock, a deadlock may occur. In addition, don't call <b>WlanRegisterNotification</b> from the <b>DllMain</b> function in an application DLL. This could also cause a deadlock.
sdk-api-src/content/wlanapi/nf-wlanapi-wlanclosehandle.md:116:  Do not call <b>WlanCloseHandle</b> from a callback function. If the client is in the middle of a notification callback when <b>WlanCloseHandle</b> is called, the function waits for the callback to finish before returning a value.  Calling this function inside a callback function will result in the call never completing. If both the callback function and the thread that closes the handle try to acquire the same lock, a deadlock may occur. In addition, do not call <b>WlanCloseHandle</b> from the <b>DllMain</b> function in an application DLL. This could also cause a deadlock.
sdk-api-src/content/ole2/nf-ole2-oleinitialize.md:131:Because there is no way to control the order in which in-process servers are loaded or unloaded, do not call <b>OleInitialize</b> or <a href="/windows/desktop/api/ole2/nf-ole2-oleuninitialize">OleUninitialize</a> from the <a href="/windows/desktop/Dlls/dllmain">DllMain</a> function.
sdk-api-src/content/ole2/nf-ole2-oleuninitialize.md:71:Because there is no way to control the order in which in-process servers are loaded or unloaded, do not call <a href="/windows/desktop/api/ole2/nf-ole2-oleinitialize">OleInitialize</a> or <b>OleUninitialize</b> from the <a href="/windows/desktop/Dlls/dllmain">DllMain</a> function.
sdk-api-src/content/oleauto/nf-oleauto-oaenableperusertlibregistration.md:79:Set the OAPERUSERTLIBREG environment variable. <a href="/previous-versions/windows/desktop/api/oleauto/nf-oleauto-registertypelib">RegisterTypeLib</a> will check the value of this variable. If the value of OAPERUSERTLIBREG is 1, <b>RegisterTypeLib</b> will use the appropriate override mapping. Because this environment variable is read during the initialization of the <b>DLLMain</b> function, you must set the variable before you run your application. To do this, run one of the following commands at a command prompt:
