<?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[MCI und zwei CD LW]]></title><description><![CDATA[<p>Hallo !</p>
<p>Wie kann ich zwei CD LW mit MCI ansprechen (nicht gleichzeitig) ?<br />
Normalerweise wird einem ja immer das primäre Laufwerk geliefert.</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/74768/mci-und-zwei-cd-lw</link><generator>RSS for Node</generator><lastBuildDate>Fri, 10 Apr 2026 22:00:47 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/74768.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 24 May 2004 15:37:16 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to MCI und zwei CD LW on Mon, 24 May 2004 15:37:16 GMT]]></title><description><![CDATA[<p>Hallo !</p>
<p>Wie kann ich zwei CD LW mit MCI ansprechen (nicht gleichzeitig) ?<br />
Normalerweise wird einem ja immer das primäre Laufwerk geliefert.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/526396</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/526396</guid><dc:creator><![CDATA[cppboy]]></dc:creator><pubDate>Mon, 24 May 2004 15:37:16 GMT</pubDate></item><item><title><![CDATA[Reply to MCI und zwei CD LW on Mon, 24 May 2004 16:15:40 GMT]]></title><description><![CDATA[<p>Mit<br />
open &quot;d:&quot; type CDAudio alias nenLaufwerkAlias<br />
das Laufwerk öffnen und dann in weiteren MCI-Calls einfach statt CDAudio den Alias &quot;nenLaufwerkAlias&quot; benutzen <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=";D"
      alt="😉"
    /></p>
<p>Hier Laufwerk öffnen und schließen von beliebigen CD-LWs:</p>
<pre><code class="language-cpp">// test_cdeject.cpp : Defines the entry point for the application.
//

#include &quot;stdafx.h&quot;
#include &quot;mmsystem.h&quot;

int cd_open(char *lw);
int cd_close(char *lw);

int APIENTRY WinMain(HINSTANCE hInstance,
                     HINSTANCE hPrevInstance,
                     LPSTR     lpCmdLine,
                     int       nCmdShow)
{
	cd_open(&quot;e&quot;);
	cd_close(&quot;e&quot;);

	return 0;
}

int cd_open(char *lw)
{
	char retString[256];
	char mciCmd[100];

	wsprintf(mciCmd,&quot;open \&quot;%s:\&quot; type CDAudio alias audio_lw shareable&quot;,lw);
	if (mciSendString(mciCmd,retString,sizeof(retString),NULL)!=0)
	{
		// Fehler!
		OutputDebugString(&quot;Laufwerk-Alias konnte nicht geöffnet werden!\n&quot;);
		return 0;
	}

	if (mciSendString(&quot;Set audio_lw Door Open&quot;,retString,sizeof(retString),NULL)!=0)
	{
		// Fehler!
		OutputDebugString(&quot;Laufwerk konnte nicht geöffnet werden!\n&quot;);
		return 0;
	}

	if (mciSendString(&quot;close audio_lw&quot;,retString,sizeof(retString),NULL)!=0)
	{
		// Fehler!
		OutputDebugString(&quot;Laufwerk-Alias konnte nicht geschlossen werden!\n&quot;);
		return 0;
	}

	return 1;
}

int cd_close(char *lw)
{
	char retString[256];
	char mciCmd[100];

	wsprintf(mciCmd,&quot;open \&quot;%s:\&quot; type CDAudio alias audio_lw shareable&quot;,lw);
	if (mciSendString(mciCmd,retString,sizeof(retString),NULL)!=0)
	{
		// Fehler!
		OutputDebugString(&quot;Laufwerk-Alias konnte nicht geöffnet werden!\n&quot;);
		return 0;
	}

	if (mciSendString(&quot;Set audio_lw Door Closed&quot;,retString,sizeof(retString),NULL)!=0)
	{
		// Fehler!
		OutputDebugString(&quot;Laufwerk konnte nicht geöffnet werden!\n&quot;);
		return 0;
	}

	if (mciSendString(&quot;close audio_lw&quot;,retString,sizeof(retString),NULL)!=0)
	{
		// Fehler!
		OutputDebugString(&quot;Laufwerk-Alias konnte nicht geschlossen werden!\n&quot;);
		return 0;
	}

	return 1;
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/526422</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/526422</guid><dc:creator><![CDATA[geeky]]></dc:creator><pubDate>Mon, 24 May 2004 16:15:40 GMT</pubDate></item></channel></rss>