File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change 19
19
20
20
#include " analytics/src/analytics_common.h"
21
21
#include " analytics/src/analytics_desktop_dynamic.h"
22
- #include " analytics/src/analytics_windows.h" // Added for VerifyAndLoadAnalyticsLibrary
23
22
#include " analytics/src/include/firebase/analytics.h"
24
23
#include " app/src/future_manager.h" // For FutureData
25
24
#include " app/src/include/firebase/app.h"
29
28
30
29
#if defined(_WIN32)
31
30
#include < windows.h>
31
+
32
+ #include " analytics/src/analytics_windows.h"
32
33
#endif // defined(_WIN32)
33
34
34
35
namespace firebase {
Original file line number Diff line number Diff line change @@ -105,11 +105,15 @@ HMODULE VerifyAndLoadAnalyticsLibrary(
105
105
const wchar_t * library_filename, // This is expected to be just the DLL
106
106
// filename e.g. "analytics_win.dll"
107
107
const unsigned char * expected_hash, size_t expected_hash_size) {
108
- if (library_filename == nullptr || library_filename[0 ] == L' \0 ' ||
109
- expected_hash == nullptr || expected_hash_size == 0 ) {
108
+ if (library_filename == nullptr || library_filename[0 ] == L' \0 ' ) {
110
109
LogError (" VerifyAndLoadAnalyticsLibrary: Invalid arguments." );
111
110
return nullptr ;
112
111
}
112
+ if (expected_hash == nullptr || expected_hash_size == 0 ) {
113
+ // Don't check the hash, just load the library.
114
+ return LoadLibraryExW (library_filename, NULL ,
115
+ LOAD_LIBRARY_SEARCH_APPLICATION_DIR);
116
+ }
113
117
114
118
// Get full path to the executable using _wpgmptr.
115
119
// This global variable is provided by the CRT and is expected to be available
You can’t perform that action at this time.
0 commit comments