次のように定義された COM オブジェクト メソッドを参照しようとしています。
IEdmFile7::GetDerivedBOMs
Returns the derived (a.k.a. "named" or "saved") bills of materials associated with this file.
Prototype:
HRESULT GetDerivedBOMs( [out,ref] SAFEARRAY ( struct EdmBomInfo ) *ppoBoms );
edmFile 変数に IEdmFile7 オブジェクトへの参照があります。
メソッドが次のように表示される場合<cfdump var="#edmFile#">
:
Method: GetDerivedBOMs([out]USERDEFINED, [out, retval]VOID)
メソッドを呼び出そうとすると(多くの異なるパラメータータイプを渡そうとしました):
<cfset edmFile.GetDerivedBOMs(???)>
でエラーになりAutomationException: Member not found
ます。パラメータを正しく認識またはキャストしていないと推測できます。(構造体の) safearray への参照をメソッドに正しく渡すにはどうすればよいですか?
(コメントから編集)
私が試したことのいくつかの例:
<cfset myObject = createObject("java","java.lang.Object").init()>
<cfset myArray = arrayNew(1)>
<cfset myRefArrayOfObjects = javaCast("java.lang.Object[]", myArray)>
<cfset myResultArray = edmFile.GetDerivedBOMs(myRefArrayOfObjects)>
結果:
Member Not Found Description: Automation Exception: Member Not Found
コメントからの別の試み:
<cfset myArray = ArrayNew(1)>
<cfset myArray = edmFile.GetDerivedBOMs()>
結果:
There are no methods with the specified method name and argument types.
Check your function and retry