If I read correctly you are looking for an example of passing a UI1 array INTO a com instance, correct? If so the below example will write the specified data to file for you to verify:

Code:
alias ui1_inputTest {

  ;; DATA TO PASS INTO THE THE COM AS A UI1 ARRAY  
  bset -t &ui1_data 1 this is some data to send as ui1_array
  
  
  comopen ui1_test ADODB.Stream
  if (!$com(ui1_test) || $comerr) {
    echo -a failed to create stream instance
  }
  elseif (!$com(ui1_test, open, 1) || $comerr) {
    echo -a Failed to open stream
  }
  elseif (!$com(ui1_test, type, 4, integer, 1) || $comerr) {
    echo -a Failed to set the read/write type to binary
  }

  
  ;; THIS LINE PASSES A UI1 ARRAY INTO THE COM
  elseif (!$com(ui1_test, write, 1, array &ui1, &ui1_data) || $comerr) {
    echo -a Failed to write data to stream
  }
  
  
  elseif (!$com(ui1_test, position, 4, integer, 0) || $comerr) {
    echo -a Failed to reset position
  }
  elseif (!$com(ui1_test, saveToFile, 1, bstr, $mircdirui1_text.dat, integer, 2) || $comerr) {
    echo -a Failed to save to file
  }
  elseif (!$com(ui1_test, close, 1) || $comerr) {
    echo -a Failed to close stream
  }
  else {
    echo -a All done; check $mircdirui1_text.dat to see what was wrote
  }
  
  if ($com(ui1_test)) .comclose ui1_test
}

Last edited by Khaled; 20/01/17 06:59 PM.

I am SReject
My Stuff