diff --git a/TypeComp/TypeComp.ahk b/TypeComp/TypeComp.ahk index 2ff7467..5cea736 100644 --- a/TypeComp/TypeComp.ahk +++ b/TypeComp/TypeComp.ahk @@ -47,6 +47,9 @@ class TypeComp extends Unknown Returns: BOOL success - true on success, false otherwise + + Remarks: + If a VARDESC or FUNCDESC is returned via "outValue", the caller is responsible for deleting it with the returned type description ("info") by calling ITypeInfo::ReleaseFuncDesc or ITypeInfo::ReleaseVarDesc on it. */ Bind(name, hash := 0, flags := 0, byRef info := "", byRef kind := 0, byRef outValue := 0) { @@ -57,9 +60,9 @@ class TypeComp extends Unknown if (info && IsObject(TypeInfo)) info := new TypeInfo(info) if (kind == 1 && IsObject(FUNCDESC)) - outValue := FUNCDESC.FromStructPtr(outValue) + outValue := FUNCDESC.FromStructPtr(outValue, false) if ((kind == 2 || kind == 4) && IsObject(VARDESC)) - outValue := VARDESC.FromStructPtr(outValue) + outValue := VARDESC.FromStructPtr(outValue, false) if (kind == 3) outValue := new TypeComp(outValue) return bool diff --git a/TypeInfo/TypeInfo.ahk b/TypeInfo/TypeInfo.ahk index cf977d6..964637e 100644 --- a/TypeInfo/TypeInfo.ahk +++ b/TypeInfo/TypeInfo.ahk @@ -39,12 +39,15 @@ class TypeInfo extends Unknown Returns: TYPEATTR info - an instance of the TYPEATTR class containing the information + + Remarks: + Free the returned structure by passing it to . */ GetTypeAttr() { local out this._Error(DllCall(NumGet(this.vt+03*A_PtrSize), "ptr", this.ptr, "ptr*", out)) - return TYPEATTR.FromStructPtr(out) + return TYPEATTR.FromStructPtr(out, false) } /* @@ -78,7 +81,7 @@ class TypeInfo extends Unknown { local out this._Error(DllCall(NumGet(this.vt+05*A_PtrSize), "ptr", this.ptr, "UInt", index, "ptr*", out)) - return IsObject(FUNCDESC) ? FUNCDESC.FromStructPtr(out) : out + return IsObject(FUNCDESC) ? FUNCDESC.FromStructPtr(out, false) : out } /* @@ -98,7 +101,7 @@ class TypeInfo extends Unknown { local out this._Error(DllCall(NumGet(this.vt+06*A_PtrSize), "ptr", this.ptr, "UInt", index, "ptr*", out)) - return IsObject(VARDESC) ? VARDESC.FromStructPtr(out) : out + return IsObject(VARDESC) ? VARDESC.FromStructPtr(out, false) : out } /* diff --git a/TypeLib/TypeLib.ahk b/TypeLib/TypeLib.ahk index d20e392..522c8e0 100644 --- a/TypeLib/TypeLib.ahk +++ b/TypeLib/TypeLib.ahk @@ -159,7 +159,7 @@ class TypeLib extends Unknown { local out this._Error(DllCall(NumGet(this.vt+07*A_PtrSize), "ptr", this.ptr, "ptr*", out)) - return TLIBATTR.FromStructPtr(out) + return TLIBATTR.FromStructPtr(out, false) } /*