Login | ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/filter_foundry/trunk/telegraphics_common/tt/compat_win.c
(Generate patch)

Comparing trunk/telegraphics_common/tt/compat_win.c (file contents):
Revision 356 by daniel-marschall, Sun Aug 29 16:00:41 2021 UTC vs.
Revision 357 by daniel-marschall, Sat Oct 16 18:45:48 2021 UTC

# Line 147 | Line 147 | void _GetNativeSystemInfo(LPSYSTEM_INFO
147                  GetSystemInfo(lpSystemInfo);
148          }
149   }
150 +
151 + typedef BOOL(__stdcall* f_ImageRemoveCertificate)(HANDLE FileHandle, DWORD Index);
152 + BOOL _ImageRemoveCertificate(HANDLE FileHandle, DWORD Index) {
153 +        HMODULE hLib;
154 +        f_ImageRemoveCertificate fImageRemoveCertificate;
155 +        BOOL res = FALSE;
156 +
157 +        hLib = LoadLibraryA("IMAGEHLP.DLL");
158 +        if (!hLib) return FALSE;
159 +        fImageRemoveCertificate = (f_ImageRemoveCertificate)(void*)GetProcAddress(hLib, "ImageRemoveCertificate");
160 +        if (fImageRemoveCertificate != 0) {
161 +                res = fImageRemoveCertificate(FileHandle, Index);
162 +                FreeLibrary(hLib);
163 +        }
164 +
165 +        return res;
166 + }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines