terraria-cpp2il-methodrecon
v1.4.4.9
Terraria mobile dump, with reconstructed method body. Dump with CallAnalysis: https://infinitynichto.github.io/terraria-cpp2il
Loading...
Searching...
No Matches
SafePasswordHandle.cs
Go to the documentation of this file.
1
using
System
;
2
using
System.Runtime.InteropServices
;
3
4
namespace
Microsoft.Win32.SafeHandles
5
{
6
// Token: 0x0200005A RID: 90
7
internal
sealed
class
SafePasswordHandle
:
SafeHandle
8
{
9
// Token: 0x06000214 RID: 532 RVA: 0x000080B0 File Offset: 0x000062B0
10
private
IntPtr
CreateHandle
(
string
password)
11
{
12
if
(!
true
)
13
{
14
}
15
return
Marshal
.
StringToHGlobalAnsi
(password);
16
}
17
18
// Token: 0x06000215 RID: 533 RVA: 0x000080C8 File Offset: 0x000062C8
19
private
void
FreeHandle
()
20
{
21
IntPtr
handle
= this.
handle
;
22
if
(!
true
)
23
{
24
}
25
Marshal
.
ZeroFreeGlobalAllocAnsi
(
handle
);
26
}
27
28
// Token: 0x06000216 RID: 534 RVA: 0x000080E8 File Offset: 0x000062E8
29
public
SafePasswordHandle
(
string
password)
30
{
31
if
(password !=
null
)
32
{
33
IntPtr
intPtr
= this.
CreateHandle
(password);
34
this.handle
=
intPtr
;
35
}
36
}
37
38
// Token: 0x06000217 RID: 535 RVA: 0x00008108 File Offset: 0x00006308
39
protected
override
bool
ReleaseHandle
()
40
{
41
IntPtr
handle
= this.
handle
;
42
this.
FreeHandle
();
43
IntPtr
intPtr
;
44
this.handle
=
intPtr
;
45
return
true
;
46
}
47
48
// Token: 0x06000218 RID: 536 RVA: 0x0000812C File Offset: 0x0000632C
49
protected
override
void
Dispose
(
bool
disposing
)
50
{
51
bool
flag =
SafeHandleCache
.
IsCachedInvalidHandle
(
this
);
52
}
53
54
// Token: 0x17000036 RID: 54
55
// (get) Token: 0x06000219 RID: 537 RVA: 0x00008148 File Offset: 0x00006348
56
public
override
bool
IsInvalid
57
{
58
get
59
{
60
IntPtr
intPtr
;
61
return
this.handle
==
intPtr
;
62
}
63
}
64
65
// Token: 0x0600021A RID: 538 RVA: 0x00008164 File Offset: 0x00006364
66
internal
string
Mono_DangerousGetString
()
67
{
68
IntPtr
handle
= this.
handle
;
69
if
(!
true
)
70
{
71
}
72
return
Marshal
.
PtrToStringAnsi
(
handle
);
73
}
74
}
75
}
j__TPar
class f__AnonymousType0<< Count > j__TPar
Definition
--f__AnonymousType0.cs:8
Microsoft.Win32.SafeHandles.SafeHandleCache.IsCachedInvalidHandle
static bool IsCachedInvalidHandle(SafeHandle handle)
Definition
SafeHandleCache.cs:11
Microsoft.Win32.SafeHandles.SafeHandleCache
Definition
SafeHandleCache.cs:9
Microsoft.Win32.SafeHandles.SafePasswordHandle.SafePasswordHandle
SafePasswordHandle(string password)
Definition
SafePasswordHandle.cs:29
Microsoft.Win32.SafeHandles.SafePasswordHandle.Mono_DangerousGetString
string Mono_DangerousGetString()
Definition
SafePasswordHandle.cs:66
Microsoft.Win32.SafeHandles.SafePasswordHandle.FreeHandle
void FreeHandle()
Definition
SafePasswordHandle.cs:19
Microsoft.Win32.SafeHandles.SafePasswordHandle.CreateHandle
IntPtr CreateHandle(string password)
Definition
SafePasswordHandle.cs:10
Microsoft.Win32.SafeHandles.SafePasswordHandle.IsInvalid
override bool IsInvalid
Definition
SafePasswordHandle.cs:57
Microsoft.Win32.SafeHandles.SafePasswordHandle.ReleaseHandle
override bool ReleaseHandle()
Definition
SafePasswordHandle.cs:39
Microsoft.Win32.SafeHandles.SafePasswordHandle.Dispose
override void Dispose(bool disposing)
Definition
SafePasswordHandle.cs:49
Microsoft.Win32.SafeHandles.SafePasswordHandle
Definition
SafePasswordHandle.cs:8
System.Runtime.InteropServices.Marshal.PtrToStringAnsi
static string PtrToStringAnsi(IntPtr ptr)
Definition
Marshal.cs:238
System.Runtime.InteropServices.Marshal.StringToHGlobalAnsi
static unsafe IntPtr StringToHGlobalAnsi(char *s, int length)
Definition
Marshal.cs:289
System.Runtime.InteropServices.Marshal.ZeroFreeGlobalAllocAnsi
static void ZeroFreeGlobalAllocAnsi(IntPtr s)
Definition
Marshal.cs:202
System.Runtime.InteropServices.Marshal
Definition
Marshal.cs:14
System.Runtime.InteropServices.SafeHandle.handle
IntPtr handle
Definition
SafeHandle.cs:166
System.Runtime.InteropServices.SafeHandle
Definition
SafeHandle.cs:9
Microsoft.Win32.SafeHandles
Definition
CriticalHandleMinusOneIsInvalid.cs:6
System.Runtime.InteropServices
Definition
_Activator.cs:4
System
Definition
__ComObject.cs:4
System.IntPtr
Definition
IntPtr.cs:13
source
mscorlib
Microsoft
Win32
SafeHandles
SafePasswordHandle.cs
Generated by
1.10.0