tags:

views:

8

answers:

0
 $this->ADOStream = new COM('ADODB.Stream');
 $this->ADOStream->Mode = adModeReadWrite;
 $this->ADOStream->Type = adTypeBinary;
 $this->ADOStream->Open();
 $this->ADOStream->Write($this->Value);
 $this->ADOStream->Position = 0;
 $this->Size = $this->ADOStream->Size;

$this->Value is the result of

 $myDataFile = "c:\\temp\\test.PNG";
 $Data = file_get_contents($myDataFile);

I'm getting a "Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another." error on the ADOStream->Write() call. WriteText() works fine, but for this case I need Write().