<div dir="ltr">I've found a  workaround using gpgme_data_cbs implementing my own read and write functions.<div><br></div><div>If any other way is available or you have any suggestions please let me know!</div><div><br></div><div>Thanks,</div><div>Marco</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Il giorno ven 25 giu 2021 alle ore 15:26 Marco <<a href="mailto:bna.marco@gmail.com">bna.marco@gmail.com</a>> ha scritto:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">I've switched 1 to 0 for<div><br></div><div><span style="color:rgb(80,0,80)">>   err = gpgme_data_new_from_file(&in, input.string().c_str(), 1);</span><br></div><div><span style="color:rgb(80,0,80)"><br></span></div><div>as suggested.</div><div>The error is:</div><div>Failed to set input file with error: 117440567 --> Invalid value<br></div><div><br></div><div><br></div><div>  <br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Il giorno ven 25 giu 2021 alle ore 15:15 Marco <<a href="mailto:bna.marco@gmail.com" target="_blank">bna.marco@gmail.com</a>> ha scritto:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">After reading the documentation I supposed it was not correct because says to be not implemented.<div><div><br></div><div>I'll give a try immediately and I'll let you know (but I expect it will work!)</div></div><div><br></div><div>Thank you!!!</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Il giorno ven 25 giu 2021 alle ore 15:05 Werner Koch <<a href="mailto:wk@gnupg.org" target="_blank">wk@gnupg.org</a>> ha scritto:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Fri, 25 Jun 2021 09:39, Marco said:<br>
<br>
>   err = gpgme_data_new_from_file(&in, input.string().c_str(), 1);<br>
<br>
The 1 means copy the data to an internal buffer.  Use 0 here to stream<br>
the data.<br>
<br>
<br>
Salam-Shalom,<br>
<br>
   Werner<br>
<br>
-- <br>
Die Gedanken sind frei.  Ausnahmen regelt ein Bundesgesetz.<br>
</blockquote></div>
</blockquote></div>
</blockquote></div>