MCPcopy Create free account
hub / github.com/acl-dev/acl / NewByway

Method NewByway

lib_fiber/cpp/src/detours/image.cpp:1399–1430  ·  view source on GitHub ↗

/////////////////////////////////////////////////////////////////////////

Source from the content-addressed store, hash-verified

1397//////////////////////////////////////////////////////////////////////////////
1398//
1399CImageImportFile * CImage::NewByway(_In_ LPCSTR pszName)
1400{
1401 CImageImportFile *pImportFile = new NOTHROW CImageImportFile;
1402 if (pImportFile == NULL) {
1403 SetLastError(ERROR_OUTOFMEMORY);
1404 goto fail;
1405 }
1406
1407 pImportFile->m_pNextFile = NULL;
1408 pImportFile->m_fByway = TRUE;
1409
1410 pImportFile->m_pszName = DuplicateString(pszName);
1411 if (pImportFile->m_pszName == NULL) {
1412 goto fail;
1413 }
1414
1415 pImportFile->m_rvaOriginalFirstThunk = 0;
1416 pImportFile->m_rvaFirstThunk = 0;
1417 pImportFile->m_nForwarderChain = (UINT)0;
1418 pImportFile->m_pImportNames = NULL;
1419 pImportFile->m_nImportNames = 0;
1420
1421 m_nImportFiles++;
1422 return pImportFile;
1423
1424fail:
1425 if (pImportFile) {
1426 delete pImportFile;
1427 pImportFile = NULL;
1428 }
1429 return NULL;
1430}
1431
1432BOOL CImage::EditImports(PVOID pContext,
1433 PF_DETOUR_BINARY_BYWAY_CALLBACK pfBywayCallback,

Callers

nothing calls this directly

Calls 1

DuplicateStringFunction · 0.85

Tested by

no test coverage detected