DelayLoadLibrary.cpp 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534
  1. //-------------------------------------------------------------------------------------------------------
  2. // Copyright (C) Microsoft. All rights reserved.
  3. // Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
  4. //-------------------------------------------------------------------------------------------------------
  5. #include "RuntimeBasePch.h"
  6. #ifdef _CONTROL_FLOW_GUARD
  7. #if !defined(DELAYLOAD_SET_CFG_TARGET)
  8. extern "C"
  9. WINBASEAPI
  10. BOOL
  11. WINAPI
  12. SetProcessValidCallTargets(
  13. _In_ HANDLE hProcess,
  14. _In_ PVOID VirtualAddress,
  15. _In_ SIZE_T RegionSize,
  16. _In_ ULONG NumberOfOffsets,
  17. _In_reads_(NumberOfOffsets) PCFG_CALL_TARGET_INFO OffsetInformation
  18. );
  19. #endif
  20. #endif
  21. namespace Js
  22. {
  23. HRESULT DelayLoadWinRtString::WindowsCreateString(_In_reads_opt_(length) const WCHAR * sourceString, UINT32 length, _Outptr_result_maybenull_ _Result_nullonfailure_ HSTRING * string)
  24. {
  25. if (m_hModule)
  26. {
  27. if (m_pfnWindowsCreateString == nullptr)
  28. {
  29. m_pfnWindowsCreateString = (PFNCWindowsCreateString)GetFunction("WindowsCreateString");
  30. if (m_pfnWindowsCreateString == nullptr)
  31. {
  32. *string = nullptr;
  33. return E_UNEXPECTED;
  34. }
  35. }
  36. Assert(m_pfnWindowsCreateString != nullptr);
  37. return m_pfnWindowsCreateString(sourceString, length, string);
  38. }
  39. *string = nullptr;
  40. return E_NOTIMPL;
  41. }
  42. HRESULT DelayLoadWinRtString::WindowsCreateStringReference(_In_reads_opt_(length + 1) const WCHAR *sourceString, UINT32 length, _Out_ HSTRING_HEADER *hstringHeader, _Outptr_result_maybenull_ _Result_nullonfailure_ HSTRING * string)
  43. {
  44. if (m_hModule)
  45. {
  46. if (m_pfnWindowsCreateStringReference == nullptr)
  47. {
  48. m_pfnWindowsCreateStringReference = (PFNCWindowsCreateStringReference)GetFunction("WindowsCreateStringReference");
  49. if (m_pfnWindowsCreateStringReference == nullptr)
  50. {
  51. *string = nullptr;
  52. return E_UNEXPECTED;
  53. }
  54. }
  55. Assert(m_pfnWindowsCreateStringReference != nullptr);
  56. return m_pfnWindowsCreateStringReference(sourceString, length, hstringHeader, string);
  57. }
  58. *string = nullptr;
  59. return E_NOTIMPL;
  60. }
  61. HRESULT DelayLoadWinRtString::WindowsDeleteString(_In_opt_ HSTRING string)
  62. {
  63. if (m_hModule)
  64. {
  65. if (m_pfnWindowsDeleteString == nullptr)
  66. {
  67. m_pfnWindowsDeleteString = (PFNCWindowsDeleteString)GetFunction("WindowsDeleteString");
  68. if (m_pfnWindowsDeleteString == nullptr)
  69. {
  70. return E_UNEXPECTED;
  71. }
  72. }
  73. Assert(m_pfnWindowsDeleteString != nullptr);
  74. HRESULT hr = m_pfnWindowsDeleteString(string);
  75. Assert(SUCCEEDED(hr));
  76. return hr;
  77. }
  78. return E_NOTIMPL;
  79. }
  80. PCWSTR DelayLoadWinRtString::WindowsGetStringRawBuffer(_In_opt_ HSTRING string, _Out_opt_ UINT32 * length)
  81. {
  82. if (m_hModule)
  83. {
  84. if (m_pfWindowsGetStringRawBuffer == nullptr)
  85. {
  86. m_pfWindowsGetStringRawBuffer = (PFNCWindowsGetStringRawBuffer)GetFunction("WindowsGetStringRawBuffer");
  87. if (m_pfWindowsGetStringRawBuffer == nullptr)
  88. {
  89. if (length)
  90. {
  91. *length = 0;
  92. }
  93. return _u("\0");
  94. }
  95. }
  96. Assert(m_pfWindowsGetStringRawBuffer != nullptr);
  97. return m_pfWindowsGetStringRawBuffer(string, length);
  98. }
  99. if (length)
  100. {
  101. *length = 0;
  102. }
  103. return _u("\0");
  104. }
  105. HRESULT DelayLoadWinRtString::WindowsCompareStringOrdinal(_In_opt_ HSTRING string1, _In_opt_ HSTRING string2, _Out_ INT32 * result)
  106. {
  107. if (m_hModule)
  108. {
  109. if (m_pfnWindowsCompareStringOrdinal == nullptr)
  110. {
  111. m_pfnWindowsCompareStringOrdinal = (PFNCWindowsCompareStringOrdinal)GetFunction("WindowsCompareStringOrdinal");
  112. if (m_pfnWindowsCompareStringOrdinal == nullptr)
  113. {
  114. return E_UNEXPECTED;
  115. }
  116. }
  117. Assert(m_pfnWindowsCompareStringOrdinal != nullptr);
  118. return m_pfnWindowsCompareStringOrdinal(string1,string2,result);
  119. }
  120. return E_NOTIMPL;
  121. }
  122. HRESULT DelayLoadWinRtString::WindowsDuplicateString(_In_opt_ HSTRING original, _Outptr_result_maybenull_ _Result_nullonfailure_ HSTRING *newString)
  123. {
  124. if(m_hModule)
  125. {
  126. if(m_pfnWindowsDuplicateString == nullptr)
  127. {
  128. m_pfnWindowsDuplicateString = (PFNCWindowsDuplicateString)GetFunction("WindowsDuplicateString");
  129. if(m_pfnWindowsDuplicateString == nullptr)
  130. {
  131. *newString = nullptr;
  132. return E_UNEXPECTED;
  133. }
  134. }
  135. Assert(m_pfnWindowsDuplicateString != nullptr);
  136. return m_pfnWindowsDuplicateString(original, newString);
  137. }
  138. *newString = nullptr;
  139. return E_NOTIMPL;
  140. }
  141. HRESULT DelayLoadWinRtTypeResolution::RoParseTypeName(__in HSTRING typeName, __out DWORD *partsCount, __RPC__deref_out_ecount_full_opt(*partsCount) HSTRING **typeNameParts)
  142. {
  143. if (m_hModule)
  144. {
  145. if (m_pfnRoParseTypeName == nullptr)
  146. {
  147. m_pfnRoParseTypeName = (PFNCWRoParseTypeName)GetFunction("RoParseTypeName");
  148. if (m_pfnRoParseTypeName == nullptr)
  149. {
  150. return E_UNEXPECTED;
  151. }
  152. }
  153. Assert(m_pfnRoParseTypeName != nullptr);
  154. return m_pfnRoParseTypeName(typeName, partsCount, typeNameParts);
  155. }
  156. return E_NOTIMPL;
  157. }
  158. #ifdef INTL_WINGLOB
  159. bool DelayLoadWindowsGlobalization::HasGlobalizationDllLoaded()
  160. {
  161. return this->hasGlobalizationDllLoaded;
  162. }
  163. HRESULT DelayLoadWindowsGlobalization::DllGetActivationFactory(
  164. __in HSTRING activatableClassId,
  165. __out IActivationFactory** factory)
  166. {
  167. if (m_hModule)
  168. {
  169. if (m_pfnFNCWDllGetActivationFactory == nullptr)
  170. {
  171. m_pfnFNCWDllGetActivationFactory = (PFNCWDllGetActivationFactory)GetFunction("DllGetActivationFactory");
  172. if (m_pfnFNCWDllGetActivationFactory == nullptr)
  173. {
  174. return E_UNEXPECTED;
  175. }
  176. }
  177. Assert(m_pfnFNCWDllGetActivationFactory != nullptr);
  178. return m_pfnFNCWDllGetActivationFactory(activatableClassId, factory);
  179. }
  180. return E_NOTIMPL;
  181. }
  182. #endif
  183. HRESULT DelayLoadWinRtFoundation::RoGetActivationFactory(
  184. __in HSTRING activatableClassId,
  185. __in REFIID iid,
  186. __out IActivationFactory** factory)
  187. {
  188. if (m_hModule)
  189. {
  190. if (m_pfnFNCWRoGetActivationFactory == nullptr)
  191. {
  192. m_pfnFNCWRoGetActivationFactory = (PFNCWRoGetActivationFactory)GetFunction("RoGetActivationFactory");
  193. if (m_pfnFNCWRoGetActivationFactory == nullptr)
  194. {
  195. return E_UNEXPECTED;
  196. }
  197. }
  198. Assert(m_pfnFNCWRoGetActivationFactory != nullptr);
  199. return m_pfnFNCWRoGetActivationFactory(activatableClassId, iid, factory);
  200. }
  201. return E_NOTIMPL;
  202. }
  203. HRESULT DelayLoadWinRtTypeResolution::RoResolveNamespace(
  204. __in_opt const HSTRING namespaceName,
  205. __in_opt const HSTRING windowsMetaDataPath,
  206. __in const DWORD packageGraphPathsCount,
  207. __in_opt const HSTRING *packageGraphPaths,
  208. __out DWORD *metaDataFilePathsCount,
  209. HSTRING **metaDataFilePaths,
  210. __out DWORD *subNamespacesCount,
  211. HSTRING **subNamespaces)
  212. {
  213. if (m_hModule)
  214. {
  215. if (m_pfnRoResolveNamespace == nullptr)
  216. {
  217. m_pfnRoResolveNamespace = (PFNCRoResolveNamespace)GetFunction("RoResolveNamespace");
  218. if (m_pfnRoResolveNamespace == nullptr)
  219. {
  220. return E_UNEXPECTED;
  221. }
  222. }
  223. Assert(m_pfnRoResolveNamespace != nullptr);
  224. return m_pfnRoResolveNamespace(namespaceName, windowsMetaDataPath, packageGraphPathsCount, packageGraphPaths,
  225. metaDataFilePathsCount, metaDataFilePaths, subNamespacesCount, subNamespaces);
  226. }
  227. return E_NOTIMPL;
  228. }
  229. #ifdef INTL_WINGLOB
  230. void DelayLoadWindowsGlobalization::Ensure(Js::DelayLoadWinRtString *winRTStringLibrary)
  231. {
  232. if (!this->m_isInit)
  233. {
  234. DelayLoadLibrary::EnsureFromSystemDirOnly();
  235. #if DBG
  236. // This unused variable is to allow one to see the value of lastError in case both LoadLibrary (DelayLoadLibrary::Ensure has one) fail.
  237. // As the issue might be with the first one, as opposed to the second
  238. DWORD errorWhenLoadingBluePlus = GetLastError();
  239. Unused(errorWhenLoadingBluePlus);
  240. #endif
  241. //Perform a check to see if Windows.Globalization.dll was loaded; if not try loading jsIntl.dll as we are on Win7.
  242. if (m_hModule == nullptr)
  243. {
  244. m_hModule = LoadLibraryEx(GetWin7LibraryName(), nullptr, LOAD_LIBRARY_SEARCH_SYSTEM32);
  245. }
  246. // Set the flag depending on Windows.globalization.dll or jsintl.dll was loaded successfully or not
  247. if (m_hModule != nullptr)
  248. {
  249. hasGlobalizationDllLoaded = true;
  250. }
  251. this->winRTStringLibrary = winRTStringLibrary;
  252. this->winRTStringsPresent = GetFunction("WindowsDuplicateString") != nullptr;
  253. }
  254. }
  255. HRESULT DelayLoadWindowsGlobalization::WindowsCreateString(_In_reads_opt_(length) const WCHAR * sourceString, UINT32 length, _Outptr_result_maybenull_ _Result_nullonfailure_ HSTRING * string)
  256. {
  257. //If winRtStringLibrary isn't nullptr, that means it is available and we are on Win8+
  258. if(!winRTStringsPresent && winRTStringLibrary->IsAvailable())
  259. {
  260. return winRTStringLibrary->WindowsCreateString(sourceString, length, string);
  261. }
  262. return DelayLoadWinRtString::WindowsCreateString(sourceString, length, string);
  263. }
  264. HRESULT DelayLoadWindowsGlobalization::WindowsCreateStringReference(_In_reads_opt_(length + 1) const WCHAR * sourceString, UINT32 length, _Out_ HSTRING_HEADER * header, _Outptr_result_maybenull_ _Result_nullonfailure_ HSTRING * string)
  265. {
  266. //First, we attempt to use the WinStringRT api encapsulated in the globalization dll; if it is available then it is a downlevel dll.
  267. //Otherwise; we might run into an error where we are using the Win8 (because testing is being done for instance) with the downlevel dll, and that would cause errors.
  268. if(!winRTStringsPresent && winRTStringLibrary->IsAvailable())
  269. {
  270. return winRTStringLibrary->WindowsCreateStringReference(sourceString, length, header, string);
  271. }
  272. return DelayLoadWinRtString::WindowsCreateStringReference(sourceString, length, header, string);
  273. }
  274. HRESULT DelayLoadWindowsGlobalization::WindowsDeleteString(_In_opt_ HSTRING string)
  275. {
  276. //First, we attempt to use the WinStringRT api encapsulated in the globalization dll; if it is available then it is a downlevel dll.
  277. //Otherwise; we might run into an error where we are using the Win8 (because testing is being done for instance) with the downlevel dll, and that would cause errors.
  278. if(!winRTStringsPresent && winRTStringLibrary->IsAvailable())
  279. {
  280. return winRTStringLibrary->WindowsDeleteString(string);
  281. }
  282. return DelayLoadWinRtString::WindowsDeleteString(string);
  283. }
  284. PCWSTR DelayLoadWindowsGlobalization::WindowsGetStringRawBuffer(_In_opt_ HSTRING string, _Out_opt_ UINT32 * length)
  285. {
  286. //First, we attempt to use the WinStringRT api encapsulated in the globalization dll; if it is available then it is a downlevel dll.
  287. //Otherwise; we might run into an error where we are using the Win8 (because testing is being done for instance) with the downlevel dll, and that would cause errors.
  288. if(!winRTStringsPresent && winRTStringLibrary->IsAvailable())
  289. {
  290. return winRTStringLibrary->WindowsGetStringRawBuffer(string, length);
  291. }
  292. return DelayLoadWinRtString::WindowsGetStringRawBuffer(string, length);
  293. }
  294. HRESULT DelayLoadWindowsGlobalization::WindowsCompareStringOrdinal(_In_opt_ HSTRING string1, _In_opt_ HSTRING string2, _Out_ INT32 * result)
  295. {
  296. //First, we attempt to use the WinStringRT api encapsulated in the globalization dll; if it is available then it is a downlevel dll.
  297. //Otherwise; we might run into an error where we are using the Win8 (because testing is being done for instance) with the downlevel dll, and that would cause errors.
  298. if(!winRTStringsPresent && winRTStringLibrary->IsAvailable())
  299. {
  300. return winRTStringLibrary->WindowsCompareStringOrdinal(string1, string2, result);
  301. }
  302. return DelayLoadWinRtString::WindowsCompareStringOrdinal(string1, string2, result);
  303. }
  304. HRESULT DelayLoadWindowsGlobalization::WindowsDuplicateString(_In_opt_ HSTRING original, _Outptr_result_maybenull_ _Result_nullonfailure_ HSTRING *newString)
  305. {
  306. //First, we attempt to use the WinStringRT api encapsulated in the globalization dll; if it is available then it is a downlevel dll.
  307. //Otherwise; we might run into an error where we are using the Win8 (because testing is being done for instance) with the downlevel dll, and that would cause errors.
  308. if(!winRTStringsPresent && winRTStringLibrary->IsAvailable())
  309. {
  310. return winRTStringLibrary->WindowsDuplicateString(original, newString);
  311. }
  312. return DelayLoadWinRtString::WindowsDuplicateString(original, newString);
  313. }
  314. #endif
  315. #ifdef ENABLE_PROJECTION
  316. HRESULT DelayLoadWinRtError::RoClearError()
  317. {
  318. if (m_hModule)
  319. {
  320. if (m_pfnRoClearError == nullptr)
  321. {
  322. m_pfnRoClearError = (PFNCRoClearError)GetFunction("RoClearError");
  323. if (m_pfnRoClearError == nullptr)
  324. {
  325. return E_UNEXPECTED;
  326. }
  327. }
  328. Assert(m_pfnRoClearError != nullptr);
  329. m_pfnRoClearError();
  330. return S_OK;
  331. }
  332. return E_NOTIMPL;
  333. }
  334. BOOL DelayLoadWinRtError::RoOriginateLanguageException(__in HRESULT error, __in_opt HSTRING message, __in IUnknown * languageException)
  335. {
  336. if (m_hModule)
  337. {
  338. if (m_pfnRoOriginateLanguageException == nullptr)
  339. {
  340. m_pfnRoOriginateLanguageException = (PFNCRoOriginateLanguageException)GetFunction("RoOriginateLanguageException");
  341. if (m_pfnRoOriginateLanguageException == nullptr)
  342. {
  343. return FALSE;
  344. }
  345. }
  346. Assert(m_pfnRoOriginateLanguageException != nullptr);
  347. return m_pfnRoOriginateLanguageException(error, message, languageException);
  348. }
  349. return FALSE;
  350. }
  351. #endif
  352. #ifdef _CONTROL_FLOW_GUARD
  353. // Note. __declspec(guard(nocf)) causes the CFG check to be removed
  354. // inside this function, and is needed only for test binaries (chk and FRETEST)
  355. #if defined(DELAYLOAD_SET_CFG_TARGET)
  356. DECLSPEC_GUARDNOCF
  357. #endif
  358. BOOL DelayLoadWinCoreMemory::SetProcessCallTargets(_In_ HANDLE hProcess,
  359. _In_ PVOID VirtualAddress,
  360. _In_ SIZE_T RegionSize,
  361. _In_ ULONG NumberOfOffsets,
  362. _In_reads_(NumberOfOffsets) PCFG_CALL_TARGET_INFO OffsetInformation)
  363. {
  364. #if defined(ENABLE_JIT_CLAMP)
  365. // Ensure that dynamic code generation is allowed for this thread as
  366. // this is required for the call to SetProcessValidCallTargets to
  367. // succeed.
  368. AutoEnableDynamicCodeGen enableCodeGen;
  369. #endif
  370. #if defined(DELAYLOAD_SET_CFG_TARGET)
  371. if (m_hModule)
  372. {
  373. if (m_pfnSetProcessValidCallTargets == nullptr)
  374. {
  375. m_pfnSetProcessValidCallTargets = (PFNCSetProcessValidCallTargets) GetFunction("SetProcessValidCallTargets");
  376. if (m_pfnSetProcessValidCallTargets == nullptr)
  377. {
  378. return FALSE;
  379. }
  380. }
  381. Assert(m_pfnSetProcessValidCallTargets != nullptr);
  382. return m_pfnSetProcessValidCallTargets(hProcess, VirtualAddress, RegionSize, NumberOfOffsets, OffsetInformation);
  383. }
  384. return FALSE;
  385. #else
  386. return SetProcessValidCallTargets(hProcess, VirtualAddress, RegionSize, NumberOfOffsets, OffsetInformation);
  387. #endif
  388. }
  389. // Note. __declspec(guard(nocf)) causes the CFG check to be removed
  390. // inside this function, and is needed only for test binaries (chk and FRETEST)
  391. #if defined(DELAYLOAD_SET_CFG_TARGET)
  392. DECLSPEC_GUARDNOCF
  393. #endif
  394. BOOL DelayLoadWinCoreMemory::SetProcessCallTargetsForMappedView(
  395. _In_ HANDLE Process,
  396. _In_ PVOID ViewBase,
  397. _In_ SIZE_T ViewSize,
  398. _In_ ULONG NumberOfOffsets,
  399. _Inout_updates_(NumberOfOffsets) PCFG_CALL_TARGET_INFO OffsetInformation,
  400. _In_ HANDLE Section,
  401. _In_ ULONG64 FileOffset)
  402. {
  403. #if defined(ENABLE_JIT_CLAMP)
  404. // Ensure that dynamic code generation is allowed for this thread as
  405. // this is required for the call to SetProcessValidCallTargets to
  406. // succeed.
  407. AutoEnableDynamicCodeGen enableCodeGen;
  408. #endif
  409. #if defined(DELAYLOAD_SET_CFG_TARGET)
  410. if (m_hModule)
  411. {
  412. if (m_pfnSetProcessValidCallTargetsForMappedView == nullptr)
  413. {
  414. m_pfnSetProcessValidCallTargetsForMappedView = (PFNCSetProcessValidCallTargetsForMappedView)GetFunction("SetProcessValidCallTargetsForMappedView");
  415. if (m_pfnSetProcessValidCallTargetsForMappedView == nullptr)
  416. {
  417. return FALSE;
  418. }
  419. }
  420. Assert(m_pfnSetProcessValidCallTargetsForMappedView != nullptr);
  421. return m_pfnSetProcessValidCallTargetsForMappedView(Process, ViewBase, ViewSize, NumberOfOffsets, OffsetInformation, Section, FileOffset);
  422. }
  423. return FALSE;
  424. #else
  425. return SetProcessValidCallTargetsForMappedView(Process, ViewBase, ViewSize, NumberOfOffsets, OffsetInformation, Section, FileOffset);
  426. #endif
  427. }
  428. #endif
  429. BOOL DelayLoadWinCoreProcessThreads::GetMitigationPolicyForProcess(
  430. __in HANDLE hProcess,
  431. __in PROCESS_MITIGATION_POLICY MitigationPolicy,
  432. __out_bcount(nLength) PVOID lpBuffer,
  433. __in SIZE_T nLength
  434. )
  435. {
  436. #if defined(DELAYLOAD_SET_CFG_TARGET)
  437. if (m_hModule)
  438. {
  439. if (m_pfnGetProcessMitigationPolicy == nullptr)
  440. {
  441. m_pfnGetProcessMitigationPolicy = (PFNCGetMitigationPolicyForProcess) GetFunction("GetProcessMitigationPolicy");
  442. if (m_pfnGetProcessMitigationPolicy == nullptr)
  443. {
  444. return FALSE;
  445. }
  446. }
  447. Assert(m_pfnGetProcessMitigationPolicy != nullptr);
  448. return m_pfnGetProcessMitigationPolicy(hProcess, MitigationPolicy, lpBuffer, nLength);
  449. }
  450. return FALSE;
  451. #else
  452. return BinaryFeatureControl::GetMitigationPolicyForProcess(hProcess, MitigationPolicy, lpBuffer, nLength);
  453. #endif // ENABLE_DEBUG_CONFIG_OPTIONS
  454. }
  455. BOOL DelayLoadWinCoreProcessThreads::GetProcessInformation(
  456. __in HANDLE hProcess,
  457. __in PROCESS_INFORMATION_CLASS ProcessInformationClass,
  458. __out_bcount(nLength) PVOID lpBuffer,
  459. __in SIZE_T nLength
  460. )
  461. {
  462. #if defined(DELAYLOAD_SET_CFG_TARGET) || defined(_M_ARM)
  463. if (m_hModule)
  464. {
  465. if (m_pfnGetProcessInformation == nullptr)
  466. {
  467. m_pfnGetProcessInformation = (PFNCGetProcessInformation) GetFunction("GetProcessInformation");
  468. if (m_pfnGetProcessInformation == nullptr)
  469. {
  470. return FALSE;
  471. }
  472. }
  473. Assert(m_pfnGetProcessInformation != nullptr);
  474. return m_pfnGetProcessInformation(hProcess, ProcessInformationClass, lpBuffer, nLength);
  475. }
  476. #endif
  477. return FALSE;
  478. }
  479. }