<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[69 zeilen c++ c konform machen; sozusagen c++ raus - c rein.]]></title><description><![CDATA[<p>hallo<br />
folgender code (k8055.cpp) soll so abgeändert werden, dass er in ein c program (zb. myMain.c) per #include &quot;k8055.c&quot; includiert werden kann und man dann in myMain.c die in k8055.c enthaltenen funktionen aufrufen kann.<br />
ich hoffe mich einigermassen verständlich ausgedrückt zu haben.</p>
<p>vielen dank<br />
olli</p>
<p>k8055.cpp</p>
<p>typedef void(__stdcall *t_func)(long );<br />
typedef void(__stdcall *t_func0)();<br />
typedef long(__stdcall *t_func1)();<br />
typedef void(__stdcall *t_func2)(long *, long *);<br />
typedef void(__stdcall *t_func3)(long , long );<br />
typedef long(__stdcall *t_func4)(long );<br />
typedef bool(__stdcall *t_func5)(long );</p>
<p>//Allgemeine Arbeitsweisen<br />
t_func4 OpenDevice;<br />
t_func0 CloseDevice;</p>
<p>//Analog in Digital konvertiern<br />
t_func4 ReadAnalogChannel;<br />
t_func2 ReadAllAnalog;</p>
<p>//Digital in Analog konvertieren<br />
t_func3 OutputAnalogChannel;<br />
t_func3 OutputAllAnalog;<br />
t_func ClearAnalogChannel;<br />
t_func0 ClearAllAnalog;<br />
t_func SetAnalogChannel;<br />
t_func0 SetAllAnalog;</p>
<p>//Digitaler Ausgang<br />
t_func WriteAllDigital;<br />
t_func ClearDigitalChannel;<br />
t_func0 ClearAllDigital;<br />
t_func SetDigitalChannel;<br />
t_func0 SetAllDigital;</p>
<p>//Digitaler Eingang<br />
t_func5 ReadDigitalChannel;<br />
t_func1 ReadAllDigital;</p>
<p>//Zählerfunktionen<br />
t_func3 ReadCounter;<br />
t_func ResetCounter;<br />
t_func3 SetCounterDebounceTime;</p>
<p>HINSTANCE hModule;</p>
<p>int init()<br />
{<br />
hModule = LoadLibrary(&quot;k8055d.dll&quot;);<br />
OpenDevice = (t_func4) GetProcAddress(hModule, &quot;OpenDevice&quot;);<br />
CloseDevice = (t_func0) GetProcAddress(hModule, &quot;CloseDevice&quot;);<br />
ReadAnalogChannel = (t_func4) GetProcAddress(hModule, &quot;ReadAnalogChannel&quot;);<br />
ReadAllAnalog = (t_func2) GetProcAddress(hModule, &quot;ReadAllAnalog&quot;);<br />
OutputAnalogChannel = (t_func3) GetProcAddress(hModule, &quot;OutputAnalogChannel&quot;);<br />
OutputAllAnalog = (t_func3) GetProcAddress(hModule, &quot;OutputAllAnalog&quot;);<br />
ClearAnalogChannel = (t_func) GetProcAddress(hModule, &quot;ClearAnalogChannel&quot;);<br />
ClearAllAnalog = (t_func0) GetProcAddress(hModule, &quot;ClearAllAnalog&quot;);<br />
SetAnalogChannel = (t_func) GetProcAddress(hModule, &quot;SetAnalogChannel&quot;);<br />
SetAllAnalog = (t_func0) GetProcAddress(hModule, &quot;SetAllAnalog&quot;);<br />
WriteAllDigital = (t_func) GetProcAddress(hModule, &quot;WriteAllDigital&quot;);<br />
ClearDigitalChannel = (t_func) GetProcAddress(hModule, &quot;ClearDigitalChannel&quot;);<br />
SetDigitalChannel = (t_func) GetProcAddress(hModule, &quot;SetDigitalChannel&quot;);<br />
SetAllDigital = (t_func0) GetProcAddress(hModule, &quot;SetAllDigital&quot;);<br />
ClearAllDigital = (t_func0) GetProcAddress(hModule, &quot;ClearAllDigital&quot;);<br />
ReadDigitalChannel = (t_func5) GetProcAddress(hModule, &quot;ReadDigitalChannel&quot;);<br />
ReadAllDigital = (t_func1) GetProcAddress(hModule, &quot;ReadAllDigital&quot;);<br />
ReadCounter = (t_func3) GetProcAddress(hModule, &quot;ReadCounter&quot;);<br />
ResetCounter = (t_func) GetProcAddress(hModule, &quot;ResetCounter&quot;);<br />
SetCounterDebounceTime = (t_func3) GetProcAddress(hModule, &quot;SetCounterDebounceTime&quot;);<br />
}</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/207555/69-zeilen-c-c-konform-machen-sozusagen-c-raus-c-rein</link><generator>RSS for Node</generator><lastBuildDate>Sun, 11 Oct 2026 06:11:37 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/207555.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 09 Mar 2008 02:34:46 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to 69 zeilen c++ c konform machen; sozusagen c++ raus - c rein. on Sun, 09 Mar 2008 02:34:46 GMT]]></title><description><![CDATA[<p>hallo<br />
folgender code (k8055.cpp) soll so abgeändert werden, dass er in ein c program (zb. myMain.c) per #include &quot;k8055.c&quot; includiert werden kann und man dann in myMain.c die in k8055.c enthaltenen funktionen aufrufen kann.<br />
ich hoffe mich einigermassen verständlich ausgedrückt zu haben.</p>
<p>vielen dank<br />
olli</p>
<p>k8055.cpp</p>
<p>typedef void(__stdcall *t_func)(long );<br />
typedef void(__stdcall *t_func0)();<br />
typedef long(__stdcall *t_func1)();<br />
typedef void(__stdcall *t_func2)(long *, long *);<br />
typedef void(__stdcall *t_func3)(long , long );<br />
typedef long(__stdcall *t_func4)(long );<br />
typedef bool(__stdcall *t_func5)(long );</p>
<p>//Allgemeine Arbeitsweisen<br />
t_func4 OpenDevice;<br />
t_func0 CloseDevice;</p>
<p>//Analog in Digital konvertiern<br />
t_func4 ReadAnalogChannel;<br />
t_func2 ReadAllAnalog;</p>
<p>//Digital in Analog konvertieren<br />
t_func3 OutputAnalogChannel;<br />
t_func3 OutputAllAnalog;<br />
t_func ClearAnalogChannel;<br />
t_func0 ClearAllAnalog;<br />
t_func SetAnalogChannel;<br />
t_func0 SetAllAnalog;</p>
<p>//Digitaler Ausgang<br />
t_func WriteAllDigital;<br />
t_func ClearDigitalChannel;<br />
t_func0 ClearAllDigital;<br />
t_func SetDigitalChannel;<br />
t_func0 SetAllDigital;</p>
<p>//Digitaler Eingang<br />
t_func5 ReadDigitalChannel;<br />
t_func1 ReadAllDigital;</p>
<p>//Zählerfunktionen<br />
t_func3 ReadCounter;<br />
t_func ResetCounter;<br />
t_func3 SetCounterDebounceTime;</p>
<p>HINSTANCE hModule;</p>
<p>int init()<br />
{<br />
hModule = LoadLibrary(&quot;k8055d.dll&quot;);<br />
OpenDevice = (t_func4) GetProcAddress(hModule, &quot;OpenDevice&quot;);<br />
CloseDevice = (t_func0) GetProcAddress(hModule, &quot;CloseDevice&quot;);<br />
ReadAnalogChannel = (t_func4) GetProcAddress(hModule, &quot;ReadAnalogChannel&quot;);<br />
ReadAllAnalog = (t_func2) GetProcAddress(hModule, &quot;ReadAllAnalog&quot;);<br />
OutputAnalogChannel = (t_func3) GetProcAddress(hModule, &quot;OutputAnalogChannel&quot;);<br />
OutputAllAnalog = (t_func3) GetProcAddress(hModule, &quot;OutputAllAnalog&quot;);<br />
ClearAnalogChannel = (t_func) GetProcAddress(hModule, &quot;ClearAnalogChannel&quot;);<br />
ClearAllAnalog = (t_func0) GetProcAddress(hModule, &quot;ClearAllAnalog&quot;);<br />
SetAnalogChannel = (t_func) GetProcAddress(hModule, &quot;SetAnalogChannel&quot;);<br />
SetAllAnalog = (t_func0) GetProcAddress(hModule, &quot;SetAllAnalog&quot;);<br />
WriteAllDigital = (t_func) GetProcAddress(hModule, &quot;WriteAllDigital&quot;);<br />
ClearDigitalChannel = (t_func) GetProcAddress(hModule, &quot;ClearDigitalChannel&quot;);<br />
SetDigitalChannel = (t_func) GetProcAddress(hModule, &quot;SetDigitalChannel&quot;);<br />
SetAllDigital = (t_func0) GetProcAddress(hModule, &quot;SetAllDigital&quot;);<br />
ClearAllDigital = (t_func0) GetProcAddress(hModule, &quot;ClearAllDigital&quot;);<br />
ReadDigitalChannel = (t_func5) GetProcAddress(hModule, &quot;ReadDigitalChannel&quot;);<br />
ReadAllDigital = (t_func1) GetProcAddress(hModule, &quot;ReadAllDigital&quot;);<br />
ReadCounter = (t_func3) GetProcAddress(hModule, &quot;ReadCounter&quot;);<br />
ResetCounter = (t_func) GetProcAddress(hModule, &quot;ResetCounter&quot;);<br />
SetCounterDebounceTime = (t_func3) GetProcAddress(hModule, &quot;SetCounterDebounceTime&quot;);<br />
}</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1470841</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1470841</guid><dc:creator><![CDATA[gonso]]></dc:creator><pubDate>Sun, 09 Mar 2008 02:34:46 GMT</pubDate></item><item><title><![CDATA[Reply to 69 zeilen c++ c konform machen; sozusagen c++ raus - c rein. on Sun, 09 Mar 2008 05:06:43 GMT]]></title><description><![CDATA[<p>Schön, dass du uns sagst, was DU machen musst.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1470844</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1470844</guid><dc:creator><![CDATA[el coder]]></dc:creator><pubDate>Sun, 09 Mar 2008 05:06:43 GMT</pubDate></item><item><title><![CDATA[Reply to 69 zeilen c++ c konform machen; sozusagen c++ raus - c rein. on Sun, 09 Mar 2008 08:18:09 GMT]]></title><description><![CDATA[<p>gonso schrieb:</p>
<blockquote>
<p>ich hoffe mich einigermassen verständlich ausgedrückt zu haben.</p>
</blockquote>
<p>Viel Spaß bei der Arbeit. Wenn schon gehört das unter Projekte und dann ggf. mit Angabe der Summe die du bereit bist dem Umschreiber zu zahlen.</p>
<p>Deine Arbeit wird hier jedenfall (so hoffe ich wenigstens) keiner für lau erledigen.</p>
<p>cu André</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1470854</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1470854</guid><dc:creator><![CDATA[asc]]></dc:creator><pubDate>Sun, 09 Mar 2008 08:18:09 GMT</pubDate></item><item><title><![CDATA[Reply to 69 zeilen c++ c konform machen; sozusagen c++ raus - c rein. on Sun, 09 Mar 2008 08:23:38 GMT]]></title><description><![CDATA[<p>Wo ist da C++-Code? Schon mal versucht einfach als C-Quellcode zu kompilieren.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1470856</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1470856</guid><dc:creator><![CDATA[Don06]]></dc:creator><pubDate>Sun, 09 Mar 2008 08:23:38 GMT</pubDate></item><item><title><![CDATA[Reply to 69 zeilen c++ c konform machen; sozusagen c++ raus - c rein. on Sun, 09 Mar 2008 11:25:08 GMT]]></title><description><![CDATA[<p>ein super beispiel für faulheit.</p>
<p>@OP: initialisier doch wenigstens hModule mit NULL, und überprüf, ob die DLL überhaupt geladen werden kann.</p>
<p>ansonsten: das müsste eigentlich mit jedem C compiler compilierbar sein. wenn du den MS compiler hast, einfach mal in .c umbennen, oder .cpp lassen und einen großen extern &quot;C&quot; block drum rum schreiben.</p>
<p>aber deine arbeit wird dir hier niemand abnehmen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1470904</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1470904</guid><dc:creator><![CDATA[Xantus]]></dc:creator><pubDate>Sun, 09 Mar 2008 11:25:08 GMT</pubDate></item><item><title><![CDATA[Reply to 69 zeilen c++ c konform machen; sozusagen c++ raus - c rein. on Sun, 09 Mar 2008 11:28:17 GMT]]></title><description><![CDATA[<p>Hallo</p>
<p>Xantus schrieb:</p>
<blockquote>
<p>aber deine arbeit wird dir hier niemand abnehmen.</p>
</blockquote>
<p>Du tust es doch gerade.</p>
<p>chrische</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1470907</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1470907</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Sun, 09 Mar 2008 11:28:17 GMT</pubDate></item></channel></rss>