-
Notifications
You must be signed in to change notification settings - Fork 72
/
Persist.ahk
49 lines (42 loc) · 1.28 KB
/
Persist.ahk
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
/*
class: Persist
wraps the *IPersist* interface and provides the CLSID of an object that can be stored persistently in the system.
Authors:
- maul.esel (https://github.com/maul-esel)
License:
- *LGPL* (http://www.gnu.org/licenses/lgpl-2.1.txt)
Documentation:
- *class documentation* (http://maul-esel.github.com/COM-Classes/master/Persist)
- *msdn* (http://msdn.microsoft.com/en-us/library/windows/desktop/ms688695)
Requirements:
AutoHotkey - AHK v2 alpha
OS - Windows 2000 Professional / Windows XP / Windows Server 2003 or higher
Base classes - _CCF_Error_Handler_, Unknown
Other classes - CCFramework
*/
class Persist extends Unknown
{
/*
Field: IID
This is IID_IPersist. It is required to create an instance.
*/
static IID := "{0000010c-0000-0000-C000-000000000046}"
/*
Field: ThrowOnCreation
indicates that attempting to create an instance of this class without supplying a valid pointer should throw an exception.
*/
static ThrowOnCreation := true
/*
Method: GetClassID
Retrieves the class identifier (CLSID) of the object.
Returns:
STR clsid - the CLSID of the object (as string)
*/
GetClassID()
{
local guid
VarSetCapacity(guid, 16, 0)
this._Error(DllCall(NumGet(this.vt+3*A_PtrSize), "ptr", this.ptr, "ptr", &guid))
return CCFramework.GUID2String(&guid)
}
}