Anyone have a good example of how to access a variant object generated from COM?
My stuff looks like:
VB
function Availability(
/ VT_PTR [26] [in][out] --> VT_VARIANT [12] / &$arrResponse,
/ VT_PTR [26] [in][out] --> VT_BSTR [8] / &$FailReason,
/ VT_BSTR [8] [in] / $CustId,
/ VT_I2 [2] [in] / $CourseID,
/ VT_DATE [7] [in] / $StartDate,
/ VT_DATE [7] [in] / $EndDate,
/ VT_I2 [2] [in] / $Players,
/ VT_BSTR [8] [in] / $PreferAMPM,
/ VT_PTR [26] [in][out] --> VT_BSTR [8] / &$strAvailList,
/ VT_BSTR [8] [in] / $strRateType,
/ VT_BSTR [8] [in] / $strCourseList
)
{
PHP
$golfobj = new COM("System");
$golfobj->SQLServerName = "XXX.XXX.XXX.XXX";
$golfobj->SQLDBName = "db";
$golfobj->SQLUserID = "id";
$golfobj->SQLPassword = "pass";
$response = new Variant;
$response = array();
$failure = "";
$customer_id = "";
$course_id = 1;
$start_date = '07-12-2009';
$end_date = '07-12-2009';
$num_players = 1;
$pref = "PM";
if($golfobj->GolfProAvailability($response,$failure,$customer_id,$course_id,$start_date,$end_date,$num_players,$pref)) {
$avail[] = $response;
}
I know I am doing something wrong but not sure what. Hit me with your best shot.
Thanks