title: Call method of shared-library with 2 different signatures (unknown target-system)
body: <p>In my program, I'm using a method of a shared library.</p>
  
  <p>My program is compiled for hundred of thousand different devices (Android) and I'm not able to provide specific binaries for each target-system.</p>
  
  <p>The method of the shared-library on the target-devices can sadly have 2 different signatures:</p>
  
  <p><strong>System A</strong></p>
  
  <pre><code>int (*open_output_stream)(
      struct audio_hw_device *dev, // equal on all systems 
      audio_io_handle_t handle, // unimportant 
      audio_devices_t devices, // unimportant 
      audio_output_flags_t flags, // unimportant 
      struct audio_config *config, // unimportant 
      struct audio_stream_out **stream_out // equal on all systems
  );
  </code></pre>
  
  <p><strong>System B</strong></p>
  
  <pre><code>int (*open_output_stream)(
      struct audio_hw_device *dev, // equal on all systems 
      uint32_t devices, // unimportant
      int *format, // unimportant 
      uint32_t *channels, // unimportant 
      uint32_t *sample_rate, // unimportant 
      struct audio_stream_out **out // equal on all systems
  );
  </code></pre>
  
  <p>In my code I need to call that method with the first param (<strong>struct audio_hw_device</strong>) and the last param (<strong>struct audio_stream_out</strong>) to get the result I need.</p>
  
  <p>The other 4 params between are not important for me and I would replace them by 0 or NULL.</p>
  
  <p>Who can tell me if I can just call those methods like</p>
  
  <p>audio_hw_device_t *outHwDev</p>
  
  <pre><code>int res = open_output_stream)(
      outHwDev, // equal on all systems 
      NULL or 0 ?, // unimportant
      NULL or 0 ?, // unimportant 
      NULL or 0 ?, // unimportant 
      NULL or 0 ?, // unimportant 
      &amp;outStream // equal on all systems
  );
  </code></pre>
  
  <p>or is something like a "try{callFunction}(catch UnknownMethodException){}" possible in C:? :)</p>
  
  <p>There is no official header-file for this, I have to define it by myself but that should matter here.</p>