title: How to design a function with pointers with plain C
body: <p>I am building the following function to retrieve the element name and type of a UIAutomationElement:</p>
  <pre class="lang-c prettyprint-override"><code>main(){
  
      BSTR element_name = NULL;
      BSTR element_type = NULL;
  
      GetDataElement(element_name,element_type);
  
  }
  
  void GetDataElement(BSTR element_name, BSTR element_type){
  
      [code before]
  
      hr = IUIAutomationElement_get_CurrentName(element,&amp;element_name);
      hr = IUIAutomationElement_get_CurrentLocalizedControlType(element,&amp;element_type);
  
  }
  
  </code></pre>
  <p>In both functions, get_CurrentName and get_CurrentLocalizedControlType, retrieves the element name and element type respectively as BSTR which is a pointer. I would like to receive those pointers into my main function. How could I achieve this?</p>