Skip to content

std::vector scanning problem #13

@Scoserix

Description

@Scoserix

Hey, could it be that the structure of std::vector changed?

This function doesn't seem to work for me.
Am I doing something wrong? Maybe for this code to work I need to use some c++ version or sdk in particular?

TY

`void readVector(DWORD vectorAddress)
{
struct _vector
{
DWORD* begin;
DWORD* end;
DWORD* tail;
};

_vector* vec = (_vector*)vectorAddress;

DWORD count = ((DWORD)vec->end - (DWORD)vec->begin) / sizeof(DWORD);
DWORD capacity = ((DWORD)vec->tail - (DWORD)vec->begin) / sizeof(DWORD);

printf("Vector has %d items and %d capacity\n", count, capacity);

for (int i = 0; i < count; i++)
	printf("\tValue at %d is %d\n", i, vec->begin[i]);

}`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions