| 1311 | } |
| 1312 | |
| 1313 | void CClassView::AddBytes( CNodeClass* pClass, DWORD Length ) |
| 1314 | { |
| 1315 | if (!pClass) |
| 1316 | return; |
| 1317 | |
| 1318 | // Ghetto fix for adding 4 bytes in 64 bit |
| 1319 | if (Length == 4) |
| 1320 | { |
| 1321 | CNodeBase* pNode = 0; |
| 1322 | if (pClass->GetType( ) == nt_vtable) |
| 1323 | { |
| 1324 | CNodeVTable* pVTable = (CNodeVTable*)pClass; // force this cast |
| 1325 | if (!pVTable->IsInitialized( )) |
| 1326 | pVTable->Initialize( static_cast<CWnd*>(this) ); |
| 1327 | pNode = new CNodeFunctionPtr( static_cast<CWnd*>(this), pClass->GetOffset( ) + (pClass->NodeCount( ) * sizeof( size_t )) ); |
| 1328 | } |
| 1329 | else |
| 1330 | { |
| 1331 | pNode = new CNodeHex32; |
| 1332 | } |
| 1333 | pNode->SetParent( pClass ); |
| 1334 | pClass->AddNode( pNode ); |
| 1335 | g_ReClassApp.CalcAllOffsets( ); |
| 1336 | return; |
| 1337 | } |
| 1338 | |
| 1339 | for (UINT i = 0; i < Length / sizeof( ULONG_PTR ); i++) |
| 1340 | { |
| 1341 | CNodeBase* pNode; |
| 1342 | if (pClass->GetType( ) == nt_vtable) |
| 1343 | { |
| 1344 | CNodeVTable* pVTable = (CNodeVTable*)pClass; |
| 1345 | if (!pVTable->IsInitialized( )) |
| 1346 | pVTable->Initialize( static_cast<CWnd*>(this) ); |
| 1347 | pNode = new CNodeFunctionPtr( static_cast<CWnd*>(this), pClass->GetOffset( ) + ((pClass->NodeCount( ) + i) * sizeof( size_t )) ); |
| 1348 | } |
| 1349 | else |
| 1350 | { |
| 1351 | pNode = new CNodeHex; |
| 1352 | } |
| 1353 | |
| 1354 | pNode->SetParent( pClass ); |
| 1355 | pClass->AddNode( pNode ); |
| 1356 | } |
| 1357 | |
| 1358 | g_ReClassApp.CalcAllOffsets( ); |
| 1359 | } |
| 1360 | |
| 1361 | void CClassView::InsertBytes( CNodeClass* pClass, UINT Index, DWORD Length ) |
| 1362 | { |
nothing calls this directly
no test coverage detected