0
votes

I have a function GetPoints from COM Object

/* DISPID=21 */
/* VT_PTR [26] */
function GetPoints( 
/* VT_BSTR [8] [in] */ $WhereClause, 
/* VT_PTR [26] [in] --> ? [29] */ &$pAsynchStatus )

When I call the function :

$this->PIserver->GetPoints((string) "tag = 'P260*'")

I get a com_exception:

Uncaught com_exception: Parameter 0: Type Mismatch

What can I do to resolve this error ?

1

1 Answers

0
votes

You are using the PI SDK, which is now a legacy product. Furthermore you need to deal with COM which error codes and types errors are quite cryptic.

I have never used it, but I'd recommend having a look at PHP:DOTNET, then install the AF SDK that is available in the AF Client. You'll be able to find much better examples and do more things with the AF SDK than the PI SDK. AF SDK Documentation, Online course to learn PI AF SDK.