<?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[Domain auslesen]]></title><description><![CDATA[<p>hi leute..<br />
also ich habe nun ein programm geschrieben(mit hilfe des forums) welches mir die daten aus dem AD ausliest, in eine txt dateispeichert und dann in ein bestimmtest format für eine telefonanlage speichert.<br />
nun habe ich das problem das das programm in verschiedenen domains angewendet werden soll..an und für sich kein problem nur dieses programm soll automatisch ausgeführt werden...meine frage wie kann ich den domainnamen speichern aberso das er wieder aufgerufen wird ohne das was gemacht wird.....habt ihr da ne gute lösung die auch für kunden einsetzbar wäre...?<br />
Vielen dank</p>
<pre><code>//---------------------------------------------------------------------------
#include &lt;iostream&gt;
#include &lt;iomanip&gt;
#include &lt;string&gt;
#include &lt;fstream&gt;
using namespace std;

//---------------------------------------------------------------------------

int main(int argc, char* argv[])
{
fstream file;
fstream ofile;
int i=0;

system (&quot;csvde -f ad_auslesung.txt -d ou=test,dc=martin,dc=test -r objectclass=user&quot;);
cout &lt;&lt; &quot;\n&quot;;

file.open(&quot;ad_auslesung.txt&quot;, ios::in);

	if (file.good())
	{
	std::string strZeile;
	string null (&quot;00&quot;);
	ofile.open(&quot;C:\\4760\\Client\\data\\import\\kurzwahlnummern.txt&quot;,ios::out|ios::ate);
	ofile &lt;&lt; &quot;Kurzwahlnummern\n&quot; &lt;&lt; &quot;\t Knoten \t Kurzwahlnummer \t Kurzwahl nach Bereichen \t Kurzwahlnummer \t Rufnummer \t Nachname \t Vorname\n&quot;;
		while (getline(file,strZeile))
		{
			size_t start = strZeile.find('+'),ende = strZeile.find(',',start);
			if(start==string::npos) continue;
			string teil (strZeile.substr(start,ende-start));
			teil.replace(0,5,null);
			size_t start2 = strZeile.find(' '),ende2 = strZeile.find(',',start2);
			if(start2==string::npos) continue;
			string teil2 (strZeile.substr(start2,ende2-start2));
			teil2.replace(0,1,&quot;&quot;);
			if (teil2.length() &gt; 8)
			{teil2.erase(8,teil2.length());}
			size_t start1 = strZeile.find(&quot;CN=&quot;),ende1 = strZeile.find('  ',start1);
			if(start1==string::npos) continue;
			string teil1 (strZeile.substr(start1,ende1-start1));
			teil1.replace(0,3,&quot;&quot;);
			if (teil1.length() &gt; 8)
			{teil1.erase(8,teil1.length());}
			ofile &lt;&lt;  &quot;\ttest\t1\t0\t&quot; &lt;&lt; i &lt;&lt; &quot;\t&quot; &lt;&lt; teil;
			ofile &lt;&lt; &quot;\t&quot; &lt;&lt; teil2 &lt;&lt; &quot;\t&quot; &lt;&lt; teil1 &lt;&lt; &quot;\n&quot;;	
			i++;

		}
	ofile.close();
	file.close();
	}	

	else
	{
		cout &lt;&lt; &quot;Datei nicht gefunden.&quot; &lt;&lt; endl;
	}
	return 0;

}
//---------------------------------------------------------------------------
</code></pre>
<p>so sieht es bis jetzt aus....</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/187995/domain-auslesen</link><generator>RSS for Node</generator><lastBuildDate>Fri, 25 Sep 2026 01:09:28 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/187995.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 26 Jul 2007 07:39:33 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Domain auslesen on Thu, 26 Jul 2007 07:39:33 GMT]]></title><description><![CDATA[<p>hi leute..<br />
also ich habe nun ein programm geschrieben(mit hilfe des forums) welches mir die daten aus dem AD ausliest, in eine txt dateispeichert und dann in ein bestimmtest format für eine telefonanlage speichert.<br />
nun habe ich das problem das das programm in verschiedenen domains angewendet werden soll..an und für sich kein problem nur dieses programm soll automatisch ausgeführt werden...meine frage wie kann ich den domainnamen speichern aberso das er wieder aufgerufen wird ohne das was gemacht wird.....habt ihr da ne gute lösung die auch für kunden einsetzbar wäre...?<br />
Vielen dank</p>
<pre><code>//---------------------------------------------------------------------------
#include &lt;iostream&gt;
#include &lt;iomanip&gt;
#include &lt;string&gt;
#include &lt;fstream&gt;
using namespace std;

//---------------------------------------------------------------------------

int main(int argc, char* argv[])
{
fstream file;
fstream ofile;
int i=0;

system (&quot;csvde -f ad_auslesung.txt -d ou=test,dc=martin,dc=test -r objectclass=user&quot;);
cout &lt;&lt; &quot;\n&quot;;

file.open(&quot;ad_auslesung.txt&quot;, ios::in);

	if (file.good())
	{
	std::string strZeile;
	string null (&quot;00&quot;);
	ofile.open(&quot;C:\\4760\\Client\\data\\import\\kurzwahlnummern.txt&quot;,ios::out|ios::ate);
	ofile &lt;&lt; &quot;Kurzwahlnummern\n&quot; &lt;&lt; &quot;\t Knoten \t Kurzwahlnummer \t Kurzwahl nach Bereichen \t Kurzwahlnummer \t Rufnummer \t Nachname \t Vorname\n&quot;;
		while (getline(file,strZeile))
		{
			size_t start = strZeile.find('+'),ende = strZeile.find(',',start);
			if(start==string::npos) continue;
			string teil (strZeile.substr(start,ende-start));
			teil.replace(0,5,null);
			size_t start2 = strZeile.find(' '),ende2 = strZeile.find(',',start2);
			if(start2==string::npos) continue;
			string teil2 (strZeile.substr(start2,ende2-start2));
			teil2.replace(0,1,&quot;&quot;);
			if (teil2.length() &gt; 8)
			{teil2.erase(8,teil2.length());}
			size_t start1 = strZeile.find(&quot;CN=&quot;),ende1 = strZeile.find('  ',start1);
			if(start1==string::npos) continue;
			string teil1 (strZeile.substr(start1,ende1-start1));
			teil1.replace(0,3,&quot;&quot;);
			if (teil1.length() &gt; 8)
			{teil1.erase(8,teil1.length());}
			ofile &lt;&lt;  &quot;\ttest\t1\t0\t&quot; &lt;&lt; i &lt;&lt; &quot;\t&quot; &lt;&lt; teil;
			ofile &lt;&lt; &quot;\t&quot; &lt;&lt; teil2 &lt;&lt; &quot;\t&quot; &lt;&lt; teil1 &lt;&lt; &quot;\n&quot;;	
			i++;

		}
	ofile.close();
	file.close();
	}	

	else
	{
		cout &lt;&lt; &quot;Datei nicht gefunden.&quot; &lt;&lt; endl;
	}
	return 0;

}
//---------------------------------------------------------------------------
</code></pre>
<p>so sieht es bis jetzt aus....</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1332749</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1332749</guid><dc:creator><![CDATA[alter]]></dc:creator><pubDate>Thu, 26 Jul 2007 07:39:33 GMT</pubDate></item><item><title><![CDATA[Reply to Domain auslesen on Fri, 27 Jul 2007 09:02:38 GMT]]></title><description><![CDATA[<p>OMG was für ein scheiss</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1333704</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1333704</guid><dc:creator><![CDATA[Just]]></dc:creator><pubDate>Fri, 27 Jul 2007 09:02:38 GMT</pubDate></item></channel></rss>