-
Notifications
You must be signed in to change notification settings - Fork 1
/
injections.txt
106 lines (93 loc) · 2.65 KB
/
injections.txt
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
#
# This file can be used to place plain text in an output file
# It's not used for anything right now, but you can still make use of it
# The format is very imilar to the fixes file
#
# Namespaces are specified with one dash
#
#- windows.win32.foundation
#
# Then the section of the file is specified by two dashes
# This can be
# functions
# functionptrs
# interfaces
# Enums
# constants
# structs
#
# An example is this
#- windows.win32.foundation
# -- structs
# Type GUID
# a as ULong
# b as UShort
# c as UShort
# d(0 to 7) as UByte
# End Type
#
# Type IID as GUID
# Type CLSID as GUID
#
# The 'section' is a remnant of when the file output was done each type of thing at a time (and failed)
# right now with the freebasic output they're just all output at the bottom of the file after all the stuff in the namespace
- windows.win32.system.com
-- functions
Type ComInit
As ULong dummy
Declare Constructor(ByVal initType As COINIT = COINIT_APARTMENTTHREADED Or COINIT_DISABLE_OLE1DDE)
Declare Destructor()
End Type
Private Constructor ComInit(ByVal initType As COINIT)
CoInitializeEx(NULL, initType)
End Constructor
Private Destructor ComInit()
CoUninitialize()
End Destructor
#define IFaceWrapName(ifaceType) InterfaceWrap##iFaceType
#macro IFaceWrapDef(iFaceType)
Type IFaceWrapName(iFaceType)
As iFaceType Ptr pIFace
Declare Constructor()
Declare Constructor(ByVal pInt As iFaceType Ptr)
Declare Operator@() As iFaceType Ptr Ptr
Declare Destructor()
End Type
Private Constructor IFaceWrapName(iFaceType) ()
pIFace = 0
End Constructor
Private Constructor IFaceWrapName(iFaceType) (ByVal pInt As iFaceType Ptr)
pIFace = pInt
End Constructor
Private Operator IFaceWrapName(iFaceType).@() As iFaceType Ptr Ptr
#if __FBWINHEADERGEN_DEBUG
Assert(pIface = 0)
#Endif
Return @pIFace
End Operator
Private Operator *(ByRef wrap as IFaceWrapName(iFaceType)) As iFaceType Ptr
Return wrap.pIFace
End Operator
Private Destructor IFaceWrapName(iFaceType)()
If pIFace Then pIFace->Release()
End Destructor
'' This creates a CoCreateLocal<interfaceName> define
'' So CoCreateLocalIVirtualDesktopManager for example which you can then use
'' instead of CoCreateInstance
__FB_UNQUOTE__( _
__FB_EVAL__( _
"#define " + _
__FB_QUOTE__( _
CoCreateLocal##iFaceType _
) +_
"(clsid, interfacePtr) CoCreateInstance(@clsid, CLSCTX_INPROC_SERVER, @" + _
__FB_QUOTE__(IID_##iFaceType) + _
", cast(Any Ptr Ptr, interfacePtr))" _
) _
)
#endmacro
#define FAILED(hr) ((hr) < 0)
#define SUCCEEDED(hr) ((hr) >= 0)
- windows.win32.foundation
-- constants
Const NULL As Any Ptr = 0