<?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[wrapper dll]]></title><description><![CDATA[<p>Hallo,</p>
<p>vorab: ich bin ein absoluter anfänger in c++ und ich hoffe die frage ist nicht zu blöd.</p>
<p>ich versuche eine dll in labview zu integrieren die einen zeiger auf eine callback funktion benötigt (geht in labview nicht). ich muss also eine wrapperdll schreiben die mit loadlibary und getrpocadress sozusagen den zeiger erzeug.</p>
<p>mit stürzt beim aufrufen der dll leider labview komplett ab: mein code:</p>
<p>// wrapperfuerant.cpp : Definiert die exportierten Funktionen für die DLL-Anwendung.<br />
//<br />
#include &quot;stdafx.h&quot;<br />
#include &lt;stdio.h&gt;<br />
#include &lt;windows.h&gt;</p>
<p>typedef unsigned long int (*ANT_vFn)();<br />
__declspec( dllexport ) unsigned long int (ANT_vFN);<br />
ANT_vFn ANT_AssignChannelEventFunction = NULL;<br />
void DLLint()<br />
{<br />
HINSTANCE hDLL = NULL;<br />
hDLL = LoadLibrary(&quot;ANT_DLL.dll&quot;);</p>
<p>if(hDLL == NULL)<br />
return;</p>
<p>else {<br />
ANT_AssignChannelEventFunction = (ANT_vFn)GetProcAddress(hDLL, &quot;_ANT_AssignChannelEventFunction&quot;);</p>
<p>if(ANT_AssignChannelEventFunction == NULL){<br />
FreeLibrary(hDLL);<br />
return;<br />
}<br />
}<br />
}</p>
<p>hat vielleicht jemand eine ahnung wieso das passiert? oder kann mir wer helfen zu lernen wie das funktionieren könnte? (würde auch dafür zahlen)</p>
<p>lg<br />
sojahulk</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/219382/wrapper-dll</link><generator>RSS for Node</generator><lastBuildDate>Mon, 13 Apr 2026 05:46:49 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/219382.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 02 Aug 2008 11:39:19 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to wrapper dll on Sat, 02 Aug 2008 11:39:19 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>vorab: ich bin ein absoluter anfänger in c++ und ich hoffe die frage ist nicht zu blöd.</p>
<p>ich versuche eine dll in labview zu integrieren die einen zeiger auf eine callback funktion benötigt (geht in labview nicht). ich muss also eine wrapperdll schreiben die mit loadlibary und getrpocadress sozusagen den zeiger erzeug.</p>
<p>mit stürzt beim aufrufen der dll leider labview komplett ab: mein code:</p>
<p>// wrapperfuerant.cpp : Definiert die exportierten Funktionen für die DLL-Anwendung.<br />
//<br />
#include &quot;stdafx.h&quot;<br />
#include &lt;stdio.h&gt;<br />
#include &lt;windows.h&gt;</p>
<p>typedef unsigned long int (*ANT_vFn)();<br />
__declspec( dllexport ) unsigned long int (ANT_vFN);<br />
ANT_vFn ANT_AssignChannelEventFunction = NULL;<br />
void DLLint()<br />
{<br />
HINSTANCE hDLL = NULL;<br />
hDLL = LoadLibrary(&quot;ANT_DLL.dll&quot;);</p>
<p>if(hDLL == NULL)<br />
return;</p>
<p>else {<br />
ANT_AssignChannelEventFunction = (ANT_vFn)GetProcAddress(hDLL, &quot;_ANT_AssignChannelEventFunction&quot;);</p>
<p>if(ANT_AssignChannelEventFunction == NULL){<br />
FreeLibrary(hDLL);<br />
return;<br />
}<br />
}<br />
}</p>
<p>hat vielleicht jemand eine ahnung wieso das passiert? oder kann mir wer helfen zu lernen wie das funktionieren könnte? (würde auch dafür zahlen)</p>
<p>lg<br />
sojahulk</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1558005</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1558005</guid><dc:creator><![CDATA[sojahulk]]></dc:creator><pubDate>Sat, 02 Aug 2008 11:39:19 GMT</pubDate></item><item><title><![CDATA[Reply to wrapper dll on Sat, 02 Aug 2008 11:47:41 GMT]]></title><description><![CDATA[<p>codetagging made easy by sothis</p>
<pre><code class="language-cpp">#include &quot;stdafx.h&quot;
#include &lt;stdio.h&gt;
#include &lt;windows.h&gt;

typedef unsigned long int (*ANT_vFn)();
__declspec( dllexport ) unsigned long int (ANT_vFN);
ANT_vFn ANT_AssignChannelEventFunction = NULL;
void DLLint()
{
    HINSTANCE hDLL = NULL;
    hDLL = LoadLibrary(&quot;ANT_DLL.dll&quot;);

    if (hDLL == NULL)
        return;

    else
    {
        ANT_AssignChannelEventFunction = (ANT_vFn)GetProcAddress(hDLL, &quot;_ANT_AssignChannelEventFunction&quot;);

        if (ANT_AssignChannelEventFunction == NULL)
        {
            FreeLibrary(hDLL);
            return;
        }
    }
}
</code></pre>
<p>bist du dir auch sicher, dass GetProcAdress einen gültigen Zeiger zurückliefert? ich würde die von labview benötigte funktion direkt implementieren und aus dieser funktion die eigentliche funktion &quot;ANT_AssignChannelEventFunction&quot; aufrufen (dann natürlich mit einem anderen bezeichner). dann hast du etwas flexibelere möglichkeiten zur fehlerbehandlung <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1558010</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1558010</guid><dc:creator><![CDATA[sothis_]]></dc:creator><pubDate>Sat, 02 Aug 2008 11:47:41 GMT</pubDate></item><item><title><![CDATA[Reply to wrapper dll on Sat, 02 Aug 2008 13:42:53 GMT]]></title><description><![CDATA[<p>hallo - vorab mal: danke für die antwort <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /></p>
<p>wenn ich das richtig verstanden habe lade ich die dll,</p>
<p>rufe dann die funktio in der dll auf</p>
<pre><code class="language-cpp">BOOL ANT_ChannelEventFunction(UCHAR ucChannel, UCHAR ucEvent);
UCHAR aucChannelEventBuffer[MESG_DATA_SIZE];
ANT_AssignChannelEventFunction(channel_0, &amp;ANT_ChannelEventFunction, aucChannelEventBuffer);
</code></pre>
<p>(laut der doku)</p>
<p>inludiere alle header files die auch die usprüngliche dll hat (wegen der ganzen definitionen usw.)</p>
<p>und lasse mir dan also das ergebnis von &quot;ANT_AssignChannelEventFuncion&quot; zurückgeben? würde das so gehen?</p>
<p>danke vielmals <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f603.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--grinning_face_with_big_eyes"
      title=":D"
      alt="😃"
    /><br />
sojahulk</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1558053</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1558053</guid><dc:creator><![CDATA[sojahulk]]></dc:creator><pubDate>Sat, 02 Aug 2008 13:42:53 GMT</pubDate></item><item><title><![CDATA[Reply to wrapper dll on Sat, 02 Aug 2008 14:35:33 GMT]]></title><description><![CDATA[<p>Ich würde eiene separate DLL machen, die dir ermöglicht eine DLL in LabView zu Laden, z.B. so:</p>
<pre><code class="language-cpp">HINSTANCE h = 0;

int myLoadLibrary(const char* lib)
{
	if(h == 0)
	{
		h = LoadLibrary(lib);
		return 0; // ok
	}

	return 1; // error
}

void myFreeLibrary()
{
	FreeLibrary(h);
}

// übergib addr in LabView der anderen DLL-Funktion
int myGetProcAddress(const char* proc, int* addr)
{
	if(h != 0)
	{
		*addr = (int)GetProcAddress(h, proc);
		return *addr != 0; // ok
	}

	return 1; // error
}
</code></pre>
<p>Die Funktionsadresse kannst du dann in Labview der anderen DLL als Integer übergeben.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1558069</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1558069</guid><dc:creator><![CDATA[__Stefan__]]></dc:creator><pubDate>Sat, 02 Aug 2008 14:35:33 GMT</pubDate></item><item><title><![CDATA[Reply to wrapper dll on Thu, 07 Aug 2008 12:55:25 GMT]]></title><description><![CDATA[<p>Hallo nochmals,</p>
<p>vorab - danke für die antwort <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /></p>
<p>ich habs jetzt mal probiert aber irgendwie hauts nicht hin.</p>
<p>folgender code:</p>
<pre><code class="language-cpp">##include &quot;stdafx.h&quot;
#include &lt;windows.h&gt;

HINSTANCE h = 0;
const char* lib =&quot;MeineDLL.dll&quot;;
const char* proc=&quot;DLL Funktion&quot;;
extern &quot;C&quot; __declspec(dllexport) int myDLLload(LPCWSTR lib)
{
    if(h == 0) 
    {

        LPCWSTR lib = libinput;
        h = LoadLibrary(lib);
        return 0; // ok 
    }

    return 1; // error 
} 

// übergib addr in LabView der anderen DLL-Funktion 
 extern &quot;C&quot; __declspec(dllexport) int myDLLgetprocaddr(LPCSTR proc, int* addr) 
{ 
    if(h != 0) 
    { 
        *addr = (int)GetProcAddress(h, proc); 
        return *addr != 0; // ok 
    } 

    return 1; // error 
} 
 extern &quot;C&quot; __declspec(dllexport) void myDLLFree() 
{ 
    FreeLibrary(h); 
}
</code></pre>
<p>ich habe dann probiert, in labview die dll aufzurufen - hat auch funktioniert nur gibt sie mir nix zurück... <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f61e.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--disappointed_face"
      title=":("
      alt="😞"
    /></p>
<p>Die funtkion myDLLload gibt mir irgendwie immer 0 zurück, egal wie ich lib defineire... und myDLLgetprocaddress funktionier nicht (returnwert 1; address 0).</p>
<p>ich bin für jede hilfe und antwort sehr sehr sehr dankbar.</p>
<p>lg<br />
hulk</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1560839</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1560839</guid><dc:creator><![CDATA[sojahulk]]></dc:creator><pubDate>Thu, 07 Aug 2008 12:55:25 GMT</pubDate></item><item><title><![CDATA[Reply to wrapper dll on Thu, 07 Aug 2008 13:12:46 GMT]]></title><description><![CDATA[<p>Sicher nur ein Problem des Pfades, bzw. des Arbeitsverzeichnisses.<br />
Guck mal mit GetLastError()...<br />
Simon</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1560865</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1560865</guid><dc:creator><![CDATA[simon.gysi]]></dc:creator><pubDate>Thu, 07 Aug 2008 13:12:46 GMT</pubDate></item><item><title><![CDATA[Reply to wrapper dll on Thu, 07 Aug 2008 18:51:17 GMT]]></title><description><![CDATA[<p>Für mehr Flexibilität könntest du auch den Pfad und den Funktionsnamen aus Labview der DLL übergeben. Dann musst du nicht immer neu Kompilieren, wenn du eine andere Library laden willst:</p>
<pre><code class="language-cpp">#include &lt;windows.h&gt;

HINSTANCE h = 0;

// weg damit!
// const char* lib =&quot;MeineDLL.dll&quot;;
// const char* proc=&quot;DLL Funktion&quot;;

// die call library node konfigurerst du so:
//     int32 myDLLload(const char* lib)
// lib ist ein Labview-String, den du als const char* übergibst!
extern &quot;C&quot; __declspec(dllexport) int myDLLload(const char* lib)
{
    if(h == 0)
    {
        h = LoadLibrary(lib);
        return 0; // ok
    }

    return 1; // error
}

// auch hier übergibst du füp proc einen LV-String als char*!
// addr übergibst du als pointer auf int32
extern &quot;C&quot; __declspec(dllexport) int myDLLgetprocaddr(const char* proc, int* addr)
{
    if(h != 0)
    {
        *addr = (int)GetProcAddress(h, proc);
        return *addr == 0; // ok
    }

    return 1; // error
}

 extern &quot;C&quot; __declspec(dllexport) void myDLLFree()
{
    FreeLibrary(h);
    h = 0;
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1561049</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1561049</guid><dc:creator><![CDATA[__Stefan__]]></dc:creator><pubDate>Thu, 07 Aug 2008 18:51:17 GMT</pubDate></item><item><title><![CDATA[Reply to wrapper dll on Sat, 09 Aug 2008 16:02:57 GMT]]></title><description><![CDATA[<p>Dieser Thread wurde von Moderator/in <a href="http://www.c-plusplus.net/forum/profile-var-mode-is-viewprofile-and-u-is-403.html" rel="nofollow">HumeSikkins</a> aus dem Forum <a href="http://www.c-plusplus.net/forum/viewforum-var-f-is-15.html" rel="nofollow">C++</a> in das Forum <a href="http://www.c-plusplus.net/forum/viewforum-var-f-is-4.html" rel="nofollow">WinAPI</a> verschoben.</p>
<p>Im Zweifelsfall bitte auch folgende Hinweise beachten:<br />
<a href="http://www.c-plusplus.net/forum/viewtopic-var-t-is-39405.html" rel="nofollow">C/C++ Forum :: FAQ - Sonstiges :: Wohin mit meiner Frage?</a></p>
<p><em>Dieses Posting wurde automatisch erzeugt.</em></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1561887</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1561887</guid><dc:creator><![CDATA[C++ Forumbot]]></dc:creator><pubDate>Sat, 09 Aug 2008 16:02:57 GMT</pubDate></item><item><title><![CDATA[Reply to wrapper dll on Sun, 10 Aug 2008 08:12:43 GMT]]></title><description><![CDATA[<p>hallo leute,</p>
<p>soda - dank eurer hilfe habe ich es nun geschafft einen pointer auf eine dllfuction zu bekommen (die ich mit dem labview appbuilder gemacht habe) und sie an meine zieldll als zeiger auf einen wert zu übergeben. das hätte, laut labviewforen funktionieren sollen. wie das leben so ist funktionierts nicht :p</p>
<p>da hab ich mir dann gedanken gemacht und ein wenig im internet geguckt und hätte folgende frage.</p>
<p>ist es möglich einen zeiger auf die addresse von der callbackfunktion der dll selbst zu bekommen? schaut folgendermaßen aus(in der .c datei)</p>
<pre><code class="language-cpp">typedef struct
{
   CHANNEL_EVENT_FUNC pfLinkEvent;
   UCHAR *pucRxBuffer;
} CHANNEL_LINK;
</code></pre>
<p>und wird von</p>
<pre><code class="language-cpp">__declspec (dllexport) void ANT_AssignChannelEventFunction(UCHAR ucLink, CHANNEL_EVENT_FUNC pfLinkEvent, UCHAR *pucRxBuffer)
{
   sLink[ucLink].pfLinkEvent = pfLinkEvent;
   sLink[ucLink].pucRxBuffer = pucRxBuffer;
}
</code></pre>
<p>benötigt.</p>
<p>in der .h ist es wie folgt definiert</p>
<pre><code class="language-cpp">// Application callback function pointer
typedef BOOL (*CHANNEL_EVENT_FUNC)(UCHAR ucANTChannel, UCHAR ucEvent);
</code></pre>
<p>und wird von</p>
<pre><code class="language-cpp">void ANT_AssignChannelEventFunction(UCHAR ucANTChannel, // Initialize Channel pointers
                                    CHANNEL_EVENT_FUNC pfChannelEvent,
                                    UCHAR *pucRxBuffer);
</code></pre>
<p>benötigt.</p>
<p>danke im voraus für die hilfe <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /><br />
martin</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1562114</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1562114</guid><dc:creator><![CDATA[sojahulk]]></dc:creator><pubDate>Sun, 10 Aug 2008 08:12:43 GMT</pubDate></item><item><title><![CDATA[Reply to wrapper dll on Tue, 26 Aug 2008 10:05:40 GMT]]></title><description><![CDATA[<p>hallo,</p>
<p>vorab mal danke fürs helfen.. aber ich komm jetzt überhautp nimmer weiter... <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f61e.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--disappointed_face"
      title=":("
      alt="😞"
    /></p>
<p>ich möchte ja eigentlich nix anderes tun, als die daten die im *pucRxBuffer stehen auslesen.</p>
<p>ich habe es versucht wie in der dokumentation zu machen (<a href="http://www.thisisant.com/index.php?module=resourcesmodule&amp;src=@random43c2ebc53db95" rel="nofollow">http://www.thisisant.com/index.php?module=resourcesmodule&amp;src=@random43c2ebc53db95</a>) aber ich bring das einfach nicht zusammen.</p>
<p>vorgestellt hätte ich es mir so, dass ich die assignchanneleventfunction aus der herstellerdll lade, sie mit der callbackfunktion versorge und mir den zeiger auf den pucRxBuffer zurückgeben lasse.</p>
<p>-- soweit so gut -- aber wie schaut die callbackfunktion denn nun aus?</p>
<p>danke im voraus für alle tipps<br />
hulk</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1571600</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1571600</guid><dc:creator><![CDATA[sojahulk__]]></dc:creator><pubDate>Tue, 26 Aug 2008 10:05:40 GMT</pubDate></item><item><title><![CDATA[Reply to wrapper dll on Tue, 26 Aug 2008 10:35:48 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>sojahulk__ schrieb:</p>
<blockquote>
<p>-- soweit so gut -- aber wie schaut die callbackfunktion denn nun aus?</p>
</blockquote>
<p>Man erkennt aus diesem hier:</p>
<pre><code class="language-cpp">typedef BOOL (*CHANNEL_EVENT_FUNC)(UCHAR ucANTChannel, UCHAR ucEvent);
</code></pre>
<p>dass die Callback-Funktion so:</p>
<pre><code class="language-cpp">BOOL myChannelEventFunction(UCHAR ucANTChannel, UCHAR ucEvent)
{
   // Code
}
</code></pre>
<p>aussehen muss, aber das willst du wahrscheinlich auch nicht wissen, weil du das oben schon erkannt hast:</p>
<blockquote>
<p>BOOL ANT_ChannelEventFunction(UCHAR ucChannel, UCHAR ucEvent);<br />
UCHAR aucChannelEventBuffer[MESG_DATA_SIZE];<br />
ANT_AssignChannelEventFunction(channel_0, &amp;ANT_ChannelEventFunction, aucChannelEventBuffer);</p>
</blockquote>
<p>MfG,</p>
<p>Probe-Nutzer</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1571616</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1571616</guid><dc:creator><![CDATA[Probe-Nutzer]]></dc:creator><pubDate>Tue, 26 Aug 2008 10:35:48 GMT</pubDate></item><item><title><![CDATA[Reply to wrapper dll on Tue, 26 Aug 2008 12:50:14 GMT]]></title><description><![CDATA[<p>hallo,</p>
<p>danke für die antwort.</p>
<p>bleibt eigentlich nur noch eine frage offen.</p>
<p>hab folgendes geschreiben:</p>
<pre><code class="language-cpp">/*
 * Dynastream Innovations Inc.
 * Cochrane, AB, CANADA
 *
 * Copyright © 1998-2007 Dynastream Innovations Inc.
 * All rights reserved. This software may not be reproduced by
 * any means without express written approval of Dynastream
 * Innovations Inc.
 */ 
/* 
 * VCS Information - autogenerated - do not modify
 * 
 *
 **************************************************************************
 *
 *
 **************************************************************************
 */
#include &quot;stdafx.h&quot;
#include &quot;types.h&quot;

#include &quot;antdefines.h&quot;
#include &quot;antmessage.h&quot;
#include &quot;callbackwrapper.h&quot;

//////////////////////////////////////////////////////////////////////////////////
// Public Variables
//////////////////////////////////////////////////////////////////////////////////

// Function Pointers
P_ANT_ARF         ANT_AssignResponseFunction;
P_ANT_AEF         ANT_AssignChannelEventFunction;

//////////////////////////////////////////////////////////////////////////////////
// Private Variables
//////////////////////////////////////////////////////////////////////////////////
static UCHAR aucChannelEventBuffer[10];
static HMODULE hANTdll;
static BOOL bLoaded = FALSE;
UCHAR ucChannel;

//////////////////////////////////////////////////////////////////////////////////
// Public Functions
//////////////////////////////////////////////////////////////////////////////////

///////////////////////////////////////////////////////////////////////
extern &quot;C&quot; __declspec(dllexport) BOOL ANT_Load(void)
{
   if (bLoaded)
      return TRUE;

   hANTdll = LoadLibraryA(&quot;ANT_DLL.dll&quot;);
   if (hANTdll == NULL)
      return FALSE;

   ANT_AssignResponseFunction = (P_ANT_ARF) GetProcAddress(hANTdll, &quot;ANT_AssignResponseFunction&quot;);
   ANT_AssignChannelEventFunction = (P_ANT_AEF) GetProcAddress(hANTdll, &quot;ANT_AssignChannelEventFunction&quot;);

   if (ANT_AssignResponseFunction == NULL)
      return FALSE;
   if (ANT_AssignChannelEventFunction == NULL)
      return FALSE;

   bLoaded = TRUE;
   return TRUE;
}

///////////////////////////////////////////////////////////////////////
extern &quot;C&quot; __declspec(dllexport) void ANT_UnLoad(void)
{
   if (hANTdll != NULL)
   {
      FreeLibrary(hANTdll);
   }
   bLoaded = FALSE;
}

///////////////////////////////////////////////////////////////////////
BOOL __cdecl ANT_ChannelEventFunction(UCHAR ucChannel, UCHAR ucEvent)
{
if(aucChannelEventBuffer != 0){
	aucChannelEventBuffer[MESG_DATA_SIZE]; 
	return(TRUE);
	}	
else{
	return(FALSE);
	}
}

extern &quot;C&quot; __declspec(dllexport)UCHAR* ANT_EVENT(UCHAR ucChannel)
{

ANT_AssignChannelEventFunction(ucChannel, &amp;ANT_ChannelEventFunction, aucChannelEventBuffer); 
return aucChannelEventBuffer;
}
</code></pre>
<p>leider bekomme ich in labview (zumindest keinen absturz mehr hin <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /> )den inhalt vom aucChannelEventBuffer zurück. soweit ich das verstanden habe besteht der buffer aus einem array - muss ich da vielleicht die werte irgendwie rauslesen?</p>
<p>danke<br />
martin</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1571689</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1571689</guid><dc:creator><![CDATA[sojahulk_]]></dc:creator><pubDate>Tue, 26 Aug 2008 12:50:14 GMT</pubDate></item></channel></rss>