File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -1949,6 +1949,23 @@ Utility functions
1949
1949
It behaves similar to ``pointer(obj) ``, but the construction is a lot faster.
1950
1950
1951
1951
1952
+ .. function :: CopyComPointer(src, dst)
1953
+
1954
+ Copies a COM pointer from *src * to *dst * and returns the Windows specific
1955
+ :c:type: `!HRESULT ` value.
1956
+
1957
+ If *src * is not ``NULL ``, its ``AddRef `` method is called, incrementing the
1958
+ reference count.
1959
+
1960
+ In contrast, even if *dst * is not ``NULL ``, its reference count will not be
1961
+ decremented before assigning the new value. You need to call its ``Release ``
1962
+ to free it appropriately.
1963
+
1964
+ .. availability :: Windows
1965
+
1966
+ .. versionadded :: next
1967
+
1968
+
1952
1969
.. function :: cast(obj, type)
1953
1970
1954
1971
This function is similar to the cast operator in C. It returns a new instance
You can’t perform that action at this time.
0 commit comments