7358941f03d8c6c6ec146cfb40967f23b8205e43
5 static INT openCount
= 0;
10 static CHAR strTemp
[10][256];
16 log
= fopen("G:\\RShellWrap.log", "w");
33 void __cdecl
WrapLogMsg(_Printf_format_string_
const char* msg
, ...)
36 for (int i
= 0; i
< callLevel
; i
++)
40 vfprintf(log
, msg
, args
);
46 void __cdecl
WrapLogEnter(_Printf_format_string_
const char* msg
, ...)
49 for (int i
= 0; i
< callLevel
; i
++)
51 fputs("ENTER >> ", log
);
53 vfprintf(log
, msg
, args
);
60 void __cdecl
WrapLogExit(_Printf_format_string_
const char* msg
, ...)
64 for (int i
= 0; i
< callLevel
; i
++)
66 fputs("EXIT <<< ", log
);
68 vfprintf(log
, msg
, args
);
75 LPSTR
Wrap(const T
& value
);
78 LPSTR Wrap
<GUID
>(REFGUID guid
)
80 LPSTR cStr
= strTemp
[nTemps
++];
81 StringCchPrintfA(cStr
, _countof(strTemp
[0]),
82 "{%08lX-%04hX-%04hX-%02hhX%02hhX-%02hhX%02hhX%02hhX%02hhX%02hhX%02hhX}",
83 guid
.Data1
, guid
.Data2
, guid
.Data3
,
84 guid
.Data4
[0], guid
.Data4
[1], guid
.Data4
[2], guid
.Data4
[3],
85 guid
.Data4
[4], guid
.Data4
[5], guid
.Data4
[6], guid
.Data4
[7]);
90 LPSTR Wrap
<RECT
>(const RECT
& rect
)
92 LPSTR cStr
= strTemp
[nTemps
++];
93 StringCchPrintfA(cStr
, _countof(strTemp
[0]),
94 "{L: %d, T: %d, R: %d, B: %d}",
95 rect
.left
, rect
.top
, rect
.right
, rect
.bottom
);
100 LPSTR Wrap
<OLECMD
>(const OLECMD
& cmd
)
102 LPSTR cStr
= strTemp
[nTemps
++];
103 StringCchPrintfA(cStr
, _countof(strTemp
[0]),
105 cmd
.cmdID
, cmd
.cmdf
);
110 LPSTR Wrap
<MSG
>(const MSG
& msg
)
112 LPSTR cStr
= strTemp
[nTemps
++];
113 StringCchPrintfA(cStr
, _countof(strTemp
[0]),
114 "{HWND: %d, Code: %d, W: %p, L: %p, T: %d, P.X: %d, P.Y: %d}",
115 msg
.hwnd
, msg
.message
, msg
.wParam
, msg
.lParam
, msg
.time
, msg
.pt
.x
, msg
.pt
.y
);
120 LPSTR Wrap
<BANDSITEINFO
>(const BANDSITEINFO
& bsi
)
122 LPSTR cStr
= strTemp
[nTemps
++];
123 StringCchPrintfA(cStr
, _countof(strTemp
[0]),
124 "{dwMask: %08x, dwState: %08x, dwStyle: %08x}",
125 bsi
.dwMask
, bsi
.dwState
, bsi
.dwStyle
);