Add a simple script to kill and restart explorer and task manager
[git-cheetah/kirill.git] / ext.h
blob4cf35494a8d0ab3d4aea4655ebc7075692a1516b
1 #ifndef EXT_H
2 #define EXT_H
4 /*
5 * Some class IDs. Let's hope they are unique enough.
6 */
8 static const IID LIBID = {
9 0xca586c7f, 0x7c84, 0x4b88,
10 {0x85, 0x37, 0x72, 0x67, 0x24, 0xdf, 0x69, 0x29}
13 static const CLSID CLSID_git_shell_ext = {
14 0xca586c80, 0x7c84, 0x4b88,
15 {0x85, 0x37, 0x72, 0x67, 0x24, 0xdf, 0x69, 0x29}
18 static const IID IID_git_shell_ext = {
19 0xca586c81, 0x7c84, 0x4b88,
20 {0x85, 0x37, 0x72, 0x67, 0x24, 0xdf, 0x69, 0x29}
23 static const CLSID CLSID_git_menu = {
24 0xca586c82, 0x7c84, 0x4b88,
25 {0x85, 0x37, 0x72, 0x67, 0x24, 0xdf, 0x69, 0x29}
28 static const IID IID_git_menu = {
29 0xca586c83, 0x7c84, 0x4b88,
30 {0x85, 0x37, 0x72, 0x67, 0x24, 0xdf, 0x69, 0x29}
33 struct git_data {
34 struct git_shell_ext {
35 struct git_shell_ext_virtual_table *virtual_table;
36 struct git_data *git_data;
37 } shell_ext;
38 struct git_menu {
39 struct git_menu_virtual_table *virtual_table;
40 struct git_data *git_data;
41 } menu;
42 unsigned int count;
43 char name[MAX_PATH];
46 struct git_shell_ext_virtual_table
48 STDMETHOD(query_interface)(void *, REFIID, PVOID*);
49 STDMETHOD_(ULONG, add_ref)(void *);
50 STDMETHOD_(ULONG, release)(void *);
51 STDMETHOD(initialize)(void *,
52 LPCITEMIDLIST, LPDATAOBJECT, HKEY);
53 } git_shell_ext_virtual_table;
55 #define DEFINE_STANDARD_METHODS(name) \
56 static ULONG STDMETHODCALLTYPE add_ref_##name(void *p) { \
57 struct name *this_ = p; \
58 return add_ref_git_data(this_->git_data); \
59 } \
61 static ULONG STDMETHODCALLTYPE \
62 release_##name(void *p) { \
63 struct name *this_ = p; \
64 return release_git_data(this_->git_data); \
65 } \
67 static STDMETHODIMP query_interface_##name(void *p, \
68 REFIID iid, LPVOID FAR *pointer) { \
69 struct name *this_ = p; \
70 return query_interface_git_data(this_->git_data, \
71 iid, pointer); \
72 } \
74 static STDMETHODIMP initialize_##name(void *p, \
75 LPCITEMIDLIST folder, LPDATAOBJECT data, HKEY id) { \
76 struct name *this_ = p; \
77 return initialize_git_data(this_->git_data, folder, data, id); \
80 DWORD object_count;
81 DWORD lock_count;
83 inline STDMETHODIMP query_interface_git_data(struct git_data *this_,
84 REFIID iid, LPVOID FAR *pointer);
85 inline ULONG STDMETHODCALLTYPE add_ref_git_data(struct git_data *this_);
86 inline ULONG STDMETHODCALLTYPE release_git_data(struct git_data *this_);
87 inline STDMETHODIMP query_interface_git_data(struct git_data *this_,
88 REFIID iid, LPVOID FAR *pointer);
89 inline STDMETHODIMP initialize_git_data(struct git_data *this_,
90 LPCITEMIDLIST folder,
91 LPDATAOBJECT data, HKEY id);
93 #endif /* EXT_H */