Click here to Skip to main content
15,867,330 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am writing a control panel for a .NET application. Using the COM class I am able to run methods successfully, but I am unable to view a return value. I am expecting a value between -1 though 13.

PHP
<?php

$archivals = new COM('Unreal.ArchivalCtrl', NULL, CP_UTF8) or die ('Unable to Launch Archival Com'); 
//Open up COM

$archivals->ManualStart('localhost', 'test', true, false);
//Lets start recording a video on the server

$status = new Variant(NULL);
//Set variant var to nothing

$status = $archivals->GetSourceStatus('localhost', 'test');
//Lets make sure it's recording, get a status

$s = print_r($status);
//Convert status to string	

echo "$s";
//View status 

?>

The output is: 'variant Object 1'


I have tried variant_get_type as well as var_dump with no success.

Here is the link to the API I am working with.

Thank you in advance for your help
Posted

1 solution

The API shows to call "State" after the method is called.

So this should be working code.

PHP
$archivals = new COM('Unreal.ArchivalCtrl') or die ('Unable to Launch Archival Com');
//Open up COM 

$archivals->ManualStart('localhost', 'test', true, false);
//Start Recording

$status = $archivals->GetSourceStatus('localhost', 'test')->State();
//GetSourceStatus, then run State = $status

echo "$status"; 
//See status 
 
?>
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900