-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathUnreferenced.cpp
More file actions
76 lines (73 loc) · 1.84 KB
/
Unreferenced.cpp
File metadata and controls
76 lines (73 loc) · 1.84 KB
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#include "common.h"
// ============================================================================
//
// UNREFENCED FUNCTIONS
//
// ============================================================================
// Report - For non-errors
void Extension::Unreferenced_Report(tchar * report = _T("Unknown report..."), int ThreadID = -1)
{
// Not from a thread
if (ThreadID == -1)
{
ThreadSafe_Start();
CompleteStatus += report;
CompleteStatus += _T("\r\n");
ThreadSafe_End();
if (UsePopups)
MessageBox(NULL, report, _T("DarkSocket - Latest Report:"), MB_OK);
}
else
// From a thread
{
tchar text [255];
_stprintf_s(text, 255, _T("Socket ID = %i >> %s."), ThreadID, report);
ThreadSafe_Start();
CompleteStatus += text;
CompleteStatus += _T("\r\n");
ThreadSafe_End();
if (UsePopups)
{
tchar title [255];
_stprintf_s(title, 255, _T("DarkSocket - Latest Report from %i:"), ThreadID);
MessageBox(NULL, report, title, MB_OK);
}
}
Runtime.PushEvent(1);
}
// Explode - For errors
void Extension::Unreferenced_Error(tchar * error = _T("Unknown error..."), int ThreadID = -1)
{
// Not from a thread
if (ThreadID == -1)
{
ThreadSafe_Start();
LastError += error;
LastError += _T("\r\n");
CompleteStatus += error;
CompleteStatus += _T("\r\n");
ThreadSafe_End();
if (UsePopups)
MessageBox(NULL, error, _T("DarkSocket - Latest Error:"), MB_OK);
}
else
// From a thread
{
tchar text [255];
_stprintf_s(text, 255, _T("Socket ID = %i >> %s."), ThreadID, error);
ThreadSafe_Start();
LastError += text;
LastError += _T("\r\n");
CompleteStatus += text;
CompleteStatus += _T("\r\n");
ThreadSafe_End();
if (UsePopups)
{
tchar title [255];
_stprintf_s(title, 255, _T("DarkSocket - Latest Error from %i:"), ThreadID);
MessageBox(NULL, error, title, MB_OK);
}
}
Runtime.PushEvent(0);
Runtime.PushEvent(1);
}