-
Notifications
You must be signed in to change notification settings - Fork 282
Expand file tree
/
Copy pathStringOffsetAddress.h
More file actions
41 lines (26 loc) · 689 Bytes
/
StringOffsetAddress.h
File metadata and controls
41 lines (26 loc) · 689 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#ifndef STRINGOFFSETADDRESS_H
#define STRINGOFFSETADDRESS_H
#include <vector>
#include <string>
#include <iostream>
using namespace std;
// Class to work with strings offsets on the stack
class StringOffsetAddress
{
public:
// Struct to save strings (for function calls) on the stack
struct StringOffset
{
string Name;
size_t Offset;
};
static vector<StringOffset> StringOffsets;
static size_t CurrentStringOffset;
// Check if a string offset already exists
static bool StringOffsetExists(string p_sString);
// Add a string offset
static void AddStringOffset(string p_sString);
// Get string offset
static size_t GetStringOffset(string p_sString);
};
#endif