mirror of
https://github.com/electron/node-gyp.git
synced 2025-08-15 12:58:19 +02:00
src,win: improve unmanaged handling
Used scoped disabling of managed code handling to ensure no other files get affected. PR-URL: https://github.com/nodejs/node-gyp/pull/1852 Reviewed-By: João Reis <reis@janeasystems.com>
This commit is contained in:
parent
c7f1bcaff5
commit
af876e10f0
1 changed files with 4 additions and 2 deletions
|
@ -7,10 +7,10 @@
|
|||
* This allows compiled addons to work when the host executable is renamed.
|
||||
*/
|
||||
|
||||
#pragma unmanaged
|
||||
|
||||
#ifdef _MSC_VER
|
||||
|
||||
#pragma managed(push, off)
|
||||
|
||||
#ifndef WIN32_LEAN_AND_MEAN
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#endif
|
||||
|
@ -34,4 +34,6 @@ static FARPROC WINAPI load_exe_hook(unsigned int event, DelayLoadInfo* info) {
|
|||
|
||||
decltype(__pfnDliNotifyHook2) __pfnDliNotifyHook2 = load_exe_hook;
|
||||
|
||||
#pragma managed(pop)
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue