@@ -43,7 +43,7 @@ struct CorAsmDiff;
43
43
44
44
// The custom print functionality to be provide by the
45
45
// users of this Library
46
- typedef void (* Printer )(const char * msg , ...);
46
+ typedef void (__cdecl * Printer )(const char * msg , ...);
47
47
struct PrintControl {
48
48
const Printer Error ;
49
49
const Printer Warning ;
@@ -58,7 +58,7 @@ struct PrintControl {
58
58
// and Offset2) from the beginning of their respective code blocks.
59
59
// InstructionLength is the length of the current instruction being
60
60
// compared for equivalency.
61
- typedef bool (* OffsetComparator )(const void * UserData , size_t BlockOffset ,
61
+ typedef bool (__cdecl * OffsetComparator )(const void * UserData , size_t BlockOffset ,
62
62
size_t InstructionLength , uint64_t Offset1 ,
63
63
uint64_t Offset2 );
64
64
@@ -67,16 +67,16 @@ typedef bool(*OffsetComparator)(const void *UserData, size_t BlockOffset,
67
67
// the importer.
68
68
69
69
// Initialize the disassembler, using default print controls
70
- typedef CorDisasm * InitDisasm_t (enum TargetArch Target );
70
+ typedef CorDisasm * __cdecl InitDisasm_t (enum TargetArch Target );
71
71
DllIface InitDisasm_t InitDisasm ;
72
72
73
73
// Initialize the disassembler using custom print controls
74
- typedef CorDisasm * NewDisasm_t (enum TargetArch Target ,
74
+ typedef CorDisasm * __cdecl NewDisasm_t (enum TargetArch Target ,
75
75
const PrintControl * PControl );
76
76
DllIface NewDisasm_t NewDisasm ;
77
77
78
78
// Delete the disassembler
79
- typedef void FinishDisasm_t (const CorDisasm * Disasm );
79
+ typedef void __cdecl FinishDisasm_t (const CorDisasm * Disasm );
80
80
DllIface FinishDisasm_t FinishDisasm ;
81
81
82
82
// DisasmInstruction -- Disassemble one instruction
@@ -89,19 +89,19 @@ DllIface FinishDisasm_t FinishDisasm;
89
89
// Returns:
90
90
// -- The Size of the disassembled instruction
91
91
// -- Zero on failure
92
- typedef size_t DisasmInstruction_t (const CorDisasm * Disasm ,
92
+ typedef size_t __cdecl DisasmInstruction_t (const CorDisasm * Disasm ,
93
93
const uint8_t * Address ,
94
94
const uint8_t * Bytes , size_t Maxlength );
95
95
DllIface DisasmInstruction_t DisasmInstruction ;
96
96
97
97
// Initialize the Code Differ
98
- typedef CorAsmDiff * NewDiffer_t (enum TargetArch Target ,
98
+ typedef CorAsmDiff * __cdecl NewDiffer_t (enum TargetArch Target ,
99
99
const PrintControl * PControl ,
100
100
const OffsetComparator Comparator );
101
101
DllIface NewDiffer_t NewDiffer ;
102
102
103
103
// Delete the Code Differ
104
- typedef void FinishDiff_t (const CorAsmDiff * AsmDiff );
104
+ typedef void __cdecl FinishDiff_t (const CorAsmDiff * AsmDiff );
105
105
DllIface FinishDiff_t FinishDiff ;
106
106
107
107
// NearDiffCodeBlocks -- Compare two code blocks for semantic
@@ -118,7 +118,7 @@ DllIface FinishDiff_t FinishDiff;
118
118
// Size2 -- The size of the second block
119
119
// Returns:
120
120
// -- true if the two blocks are equivalent, false if not.
121
- typedef bool NearDiffCodeBlocks_t (const CorAsmDiff * AsmDiff ,
121
+ typedef bool __cdecl NearDiffCodeBlocks_t (const CorAsmDiff * AsmDiff ,
122
122
const void * UserData ,
123
123
const uint8_t * Address1 ,
124
124
const uint8_t * Bytes1 , size_t Size1 ,
@@ -127,13 +127,13 @@ typedef bool NearDiffCodeBlocks_t(const CorAsmDiff *AsmDiff,
127
127
DllIface NearDiffCodeBlocks_t NearDiffCodeBlocks ;
128
128
129
129
// Print a code block according to the Disassembler's Print Controls
130
- typedef void DumpCodeBlock_t (const CorDisasm * Disasm , const uint8_t * Address ,
130
+ typedef void __cdecl DumpCodeBlock_t (const CorDisasm * Disasm , const uint8_t * Address ,
131
131
const uint8_t * Bytes , size_t Size );
132
132
DllIface DumpCodeBlock_t DumpCodeBlock ;
133
133
134
134
// Print the two code blocks being diffed, according to
135
135
// AsmDiff's PrintControls.
136
- typedef void DumpDiffBlocks_t (const CorAsmDiff * AsmDiff ,
136
+ typedef void __cdecl DumpDiffBlocks_t (const CorAsmDiff * AsmDiff ,
137
137
const uint8_t * Address1 , const uint8_t * Bytes1 ,
138
138
size_t Size1 , const uint8_t * Address2 ,
139
139
const uint8_t * Bytes2 , size_t Size2 );
0 commit comments