<?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[Window Handle]]></title><description><![CDATA[<p>Hallo</p>
<p>Habe folgendes Problem. Ich muss einen Treiber öffnen. Fkt.:<br />
extern HINSTANCE DLLAPI OpenDriverLINX (const HWND hWnd, LPCSTR name)</p>
<p>Dem hWnd soll das Handle des aufrufendnen Fensters (bei mir: Form1) übergeben werden. Benutze Borland C++Builder6, Quellcode:</p>
<p>#include &lt;vcl.h&gt;<br />
#pragma hdrstop</p>
<p>#include &quot;AIScanMain.h&quot;<br />
#include &quot;drvlinx.h&quot;<br />
#include &quot;dlcodes.h&quot;</p>
<p>HANDLE hInstance; // instance handle for the driver<br />
HANDLE hWin; // handle to this application</p>
<p>//---------------------------------------------------------------------------<br />
#pragma package(smart_init)<br />
#pragma resource &quot;*.dfm&quot;<br />
TForm1 <em>Form1;<br />
//---------------------------------------------------------------------------<br />
__fastcall TForm1::TForm1(TComponent</em> Owner)<br />
: TForm(Owner)<br />
{<br />
}<br />
//---------------------------------------------------------------------------<br />
void __fastcall TForm1::cmdOpenClick(TObject *Sender)<br />
{<br />
// get the handle of this application's window<br />
hWin = Form1-&gt;Handle; //auch schon mit hWin=GetActiveWindow(); probiert</p>
<p>// call OpenDriverLINX()<br />
hInstance = (HANDLE)OpenDriverLINX( hWin, &quot;kpci3100&quot; );<br />
.<br />
.<br />
.<br />
}<br />
Wenn ich das Programm laufen lasse und den Treiber öffnen will, kommt die Message: 'invalid window handle'. was habe ich nicht begriffen?<br />
Für Hilfe bin ich sehr dankbar</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/83285/window-handle</link><generator>RSS for Node</generator><lastBuildDate>Wed, 01 Jul 2026 19:45:11 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/83285.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 19 Aug 2004 10:29:46 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Window Handle on Thu, 19 Aug 2004 10:29:46 GMT]]></title><description><![CDATA[<p>Hallo</p>
<p>Habe folgendes Problem. Ich muss einen Treiber öffnen. Fkt.:<br />
extern HINSTANCE DLLAPI OpenDriverLINX (const HWND hWnd, LPCSTR name)</p>
<p>Dem hWnd soll das Handle des aufrufendnen Fensters (bei mir: Form1) übergeben werden. Benutze Borland C++Builder6, Quellcode:</p>
<p>#include &lt;vcl.h&gt;<br />
#pragma hdrstop</p>
<p>#include &quot;AIScanMain.h&quot;<br />
#include &quot;drvlinx.h&quot;<br />
#include &quot;dlcodes.h&quot;</p>
<p>HANDLE hInstance; // instance handle for the driver<br />
HANDLE hWin; // handle to this application</p>
<p>//---------------------------------------------------------------------------<br />
#pragma package(smart_init)<br />
#pragma resource &quot;*.dfm&quot;<br />
TForm1 <em>Form1;<br />
//---------------------------------------------------------------------------<br />
__fastcall TForm1::TForm1(TComponent</em> Owner)<br />
: TForm(Owner)<br />
{<br />
}<br />
//---------------------------------------------------------------------------<br />
void __fastcall TForm1::cmdOpenClick(TObject *Sender)<br />
{<br />
// get the handle of this application's window<br />
hWin = Form1-&gt;Handle; //auch schon mit hWin=GetActiveWindow(); probiert</p>
<p>// call OpenDriverLINX()<br />
hInstance = (HANDLE)OpenDriverLINX( hWin, &quot;kpci3100&quot; );<br />
.<br />
.<br />
.<br />
}<br />
Wenn ich das Programm laufen lasse und den Treiber öffnen will, kommt die Message: 'invalid window handle'. was habe ich nicht begriffen?<br />
Für Hilfe bin ich sehr dankbar</p>
]]></description><link>https://www.c-plusplus.net/forum/post/586167</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/586167</guid><dc:creator><![CDATA[houver]]></dc:creator><pubDate>Thu, 19 Aug 2004 10:29:46 GMT</pubDate></item><item><title><![CDATA[Reply to Window Handle on Thu, 19 Aug 2004 10:50:58 GMT]]></title><description><![CDATA[<p>Probier's mal mit <em>Application-&gt;Handle</em>, alternativ einfach mit NULL.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/586183</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/586183</guid><dc:creator><![CDATA[Jansen]]></dc:creator><pubDate>Thu, 19 Aug 2004 10:50:58 GMT</pubDate></item></channel></rss>