<?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[Multithreaded-DLL]]></title><description><![CDATA[<p>Hi!</p>
<p>Ich will im VS2005 Standard reine WinApi Programmierung machen. In den Einstellungen sieht auch alles sehr gut aus:</p>
<p>Verwendung von MFC: Windows-Standardbibliotheken verwenden<br />
Verwendung von ATL: ATL wird nicht verwendet<br />
CLR-Unterstützung: Nein<br />
[...]<br />
Aber im Bereich Codegenerierung hab ich das hier entdeckt:<br />
Laufzeitbibliotek: Multihreaded-DLL<br />
Mit dieser Einstellung werden die Programme nur erfreuliche 10kb groß. Wenn ich auf Multithreaded (ohne DLL) umstelle komm ich auf über 400.<br />
Ist diese Multithreaded-DLL standardmäßig auf Windows-PCs vorhanden oder muss ich sie wirklich dazulinken?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/168395/multithreaded-dll</link><generator>RSS for Node</generator><lastBuildDate>Thu, 16 Jul 2026 06:32:33 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/168395.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 21 Dec 2006 16:18:17 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Multithreaded-DLL on Thu, 21 Dec 2006 16:18:17 GMT]]></title><description><![CDATA[<p>Hi!</p>
<p>Ich will im VS2005 Standard reine WinApi Programmierung machen. In den Einstellungen sieht auch alles sehr gut aus:</p>
<p>Verwendung von MFC: Windows-Standardbibliotheken verwenden<br />
Verwendung von ATL: ATL wird nicht verwendet<br />
CLR-Unterstützung: Nein<br />
[...]<br />
Aber im Bereich Codegenerierung hab ich das hier entdeckt:<br />
Laufzeitbibliotek: Multihreaded-DLL<br />
Mit dieser Einstellung werden die Programme nur erfreuliche 10kb groß. Wenn ich auf Multithreaded (ohne DLL) umstelle komm ich auf über 400.<br />
Ist diese Multithreaded-DLL standardmäßig auf Windows-PCs vorhanden oder muss ich sie wirklich dazulinken?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1196218</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1196218</guid><dc:creator><![CDATA[Spieler]]></dc:creator><pubDate>Thu, 21 Dec 2006 16:18:17 GMT</pubDate></item><item><title><![CDATA[Reply to Multithreaded-DLL on Fri, 22 Dec 2006 19:18:57 GMT]]></title><description><![CDATA[<p>[Schwachsinn, Sorry <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="😉"
    /> ]</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1196220</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1196220</guid><dc:creator><![CDATA[CodeFinder]]></dc:creator><pubDate>Fri, 22 Dec 2006 19:18:57 GMT</pubDate></item><item><title><![CDATA[Reply to Multithreaded-DLL on Thu, 21 Dec 2006 16:23:34 GMT]]></title><description><![CDATA[<p>Naja ich will mich mit der WinApi beschäftigen um sehr kleine Programme zu erstellen (auch wenn das heute lächerlich klingt <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="😉"
    /> ). Sonnst kann ich ja auch beim Borland C++Builder bleiben und die VCL mit mir rumschleppen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1196224</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1196224</guid><dc:creator><![CDATA[Spieler]]></dc:creator><pubDate>Thu, 21 Dec 2006 16:23:34 GMT</pubDate></item><item><title><![CDATA[Reply to Multithreaded-DLL on Thu, 21 Dec 2006 17:01:19 GMT]]></title><description><![CDATA[<p>Nein da hast Du allerdings vollkommen Recht <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f44d.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--thumbs_up"
      title=":+1:"
      alt="👍"
    /> ! Hab ich irgendwie grad nicht dran gedacht <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="😃"
    /> ... . Glaub ich sollte beim posten nit so viel AC/DC hören <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="😃"
    /> .</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1196242</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1196242</guid><dc:creator><![CDATA[CodeFinder]]></dc:creator><pubDate>Thu, 21 Dec 2006 17:01:19 GMT</pubDate></item><item><title><![CDATA[Reply to Multithreaded-DLL on Thu, 21 Dec 2006 17:38:45 GMT]]></title><description><![CDATA[<p>CodeFinder schrieb:</p>
<blockquote>
<p>Die sind eigenltich immmer dabei.</p>
</blockquote>
<p>Blödsinn! Bei VS2005 heissen die DLLs msvcr80.dll / msvcp80.dll / msvcm80.dll und sind bei (fast) keinem OS dabei!!! (möglicherweise bei Vista; aber sonst 100%ig bei keinem anderen).</p>
<p>Wenn Du *ganz* kleine Programme erstellen willst, dann verzichte auf die CRT und stelle einen eigenen Entry-Point zur Verfügung!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1196264</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1196264</guid><dc:creator><![CDATA[Jochen Kalmbach]]></dc:creator><pubDate>Thu, 21 Dec 2006 17:38:45 GMT</pubDate></item><item><title><![CDATA[Reply to Multithreaded-DLL on Thu, 21 Dec 2006 18:09:10 GMT]]></title><description><![CDATA[<p>Sry ich versteh nur Bahnhof <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="😃"
    /></p>
<p>Also soll ich auf das Benutzen der C-Standardbibliothek verzichten. Heißt das ich darf eigentlich nur die windows.h benutzen?</p>
<p>Und was du mit &quot;eigenem Entry-Point&quot; meinst weiß ich leider auch nicht.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1196281</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1196281</guid><dc:creator><![CDATA[Spieler]]></dc:creator><pubDate>Thu, 21 Dec 2006 18:09:10 GMT</pubDate></item><item><title><![CDATA[Reply to Multithreaded-DLL on Thu, 21 Dec 2006 19:01:23 GMT]]></title><description><![CDATA[<p>Ok im Release-Mode wird die Datei mit DLL 7 kb groß ohne DLL 64 kb. Das ist noch annehmbar. Wenn ich damit auf der sicheren Seite bin werd ich mich wohl damit zufriedengeben müssen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1196299</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1196299</guid><dc:creator><![CDATA[Spieler]]></dc:creator><pubDate>Thu, 21 Dec 2006 19:01:23 GMT</pubDate></item><item><title><![CDATA[Reply to Multithreaded-DLL on Thu, 21 Dec 2006 19:03:23 GMT]]></title><description><![CDATA[<p>Spieler schrieb:</p>
<blockquote>
<p>Also soll ich auf das Benutzen der C-Standardbibliothek verzichten. Heißt das ich darf eigentlich nur die windows.h benutzen?</p>
</blockquote>
<p>Ja. Dann kannst Du Programme schreiben sie so klein wie möglich sind...</p>
<p>Spieler schrieb:</p>
<blockquote>
<p>Und was du mit &quot;eigenem Entry-Point&quot; meinst weiß ich leider auch nicht.</p>
</blockquote>
<p>In den Projekteinstellungen unter &quot;Linker|Advanced|Entry Point&quot; oder &quot;/ENTRY:&quot;</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1196301</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1196301</guid><dc:creator><![CDATA[Jochen Kalmbach]]></dc:creator><pubDate>Thu, 21 Dec 2006 19:03:23 GMT</pubDate></item><item><title><![CDATA[Reply to Multithreaded-DLL on Thu, 21 Dec 2006 21:19:40 GMT]]></title><description><![CDATA[<blockquote>
<p>Wenn Du *ganz* kleine Programme erstellen willst, dann verzichte auf die CRT und stelle einen eigenen Entry-Point zur Verfügung!</p>
</blockquote>
<p>Weisst du was dann alles nichtmehr geht, wenn man keine CRT linkt? Und was man für nen Tanz aufführen muss dass überhaupt noch *irgendwas* geht ohne CRT? Also zumindest mit dem VS ist das ein echter Krampf, ganz ganz grausam.<br />
Da würde ich mich eher nach einem anderen Compiler umsehen... vielleicht mal sehen was mit dem g++ oder Digital Mars so geht.</p>
<p>Oder eben, sicherste Möglichkeit, nen guten optimierenden Macro Assembler nehmen :^)</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1196370</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1196370</guid><dc:creator><![CDATA[hustbaer]]></dc:creator><pubDate>Thu, 21 Dec 2006 21:19:40 GMT</pubDate></item><item><title><![CDATA[Reply to Multithreaded-DLL on Fri, 22 Dec 2006 07:05:02 GMT]]></title><description><![CDATA[<p>hustbaer schrieb:</p>
<blockquote>
<blockquote>
<p>Wenn Du *ganz* kleine Programme erstellen willst, dann verzichte auf die CRT und stelle einen eigenen Entry-Point zur Verfügung!</p>
</blockquote>
<p>Weisst du was dann alles nichtmehr geht, wenn man keine CRT linkt?</p>
</blockquote>
<p>Was meinst Du damit? Die CRT ist nur ein &quot;Aufsatz&quot; auf der WinAPI. Somit kannst Du auch ohne CRT alles machen, was man sonst auch machen kann <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="😉"
    /></p>
<p>hustbaer schrieb:</p>
<blockquote>
<p>Und was man für nen Tanz aufführen muss dass überhaupt noch *irgendwas* geht ohne CRT? Also zumindest mit dem VS ist das ein echter Krampf, ganz ganz grausam.</p>
</blockquote>
<p>Was meinst Du damit?<br />
Die Release-Version von Folgendem Programm:</p>
<pre><code class="language-cpp">#include &lt;windows.h&gt;
#pragma comment(linker, &quot;/ENTRY:myMain&quot;)

extern &quot;C&quot; int __stdcall myMain()
{
  ExitProcess(0);
}
</code></pre>
<p>hat keinerlei Abhängigkeiten zur CRT...<br />
Auch ist die Datei ganze 2,944 Bytes gross.<br />
Nach deaktivieren der Debug-Infos und abschalten des eingebetten Manifests ist es noch 2,048 Bytes gross.<br />
Und ein &quot;dumpbin /ALL&quot; erzeugt:</p>
<blockquote>
<p>Microsoft (R) COFF/PE Dumper Version 8.00.50727.42<br />
Copyright (C) Microsoft Corporation. All rights reserved.</p>
<p>Dump of file CPP_OhneCRT.exe</p>
<p>PE signature found</p>
<p>File Type: EXECUTABLE IMAGE</p>
<p>FILE HEADER VALUES<br />
14C machine (x86)<br />
3 number of sections<br />
458B8284 time date stamp Fri Dec 22 08:00:20 2006<br />
0 file pointer to symbol table<br />
0 number of symbols<br />
E0 size of optional header<br />
103 characteristics<br />
Relocations stripped<br />
Executable<br />
32 bit word machine</p>
<p>OPTIONAL HEADER VALUES<br />
10B magic # (PE32)<br />
8.00 linker version<br />
200 size of code<br />
600 size of initialized data<br />
0 size of uninitialized data<br />
1000 entry point (00401000)<br />
1000 base of code<br />
2000 base of data<br />
400000 image base (00400000 to 00403FFF)<br />
1000 section alignment<br />
200 file alignment<br />
4.00 operating system version<br />
0.00 image version<br />
4.00 subsystem version<br />
0 Win32 version<br />
4000 size of image<br />
400 size of headers<br />
0 checksum<br />
3 subsystem (Windows CUI)<br />
400 DLL characteristics<br />
No structured exception handler<br />
100000 size of stack reserve<br />
1000 size of stack commit<br />
100000 size of heap reserve<br />
1000 size of heap commit<br />
0 loader flags<br />
10 number of directories<br />
0 [ 0] RVA [size] of Export Directory<br />
2010 [ 28] RVA [size] of Import Directory<br />
0 [ 0] RVA [size] of Resource Directory<br />
0 [ 0] RVA [size] of Exception Directory<br />
0 [ 0] RVA [size] of Certificates Directory<br />
0 [ 0] RVA [size] of Base Relocation Directory<br />
0 [ 0] RVA [size] of Debug Directory<br />
0 [ 0] RVA [size] of Architecture Directory<br />
0 [ 0] RVA [size] of Global Pointer Directory<br />
0 [ 0] RVA [size] of Thread Storage Directory<br />
0 [ 0] RVA [size] of Load Configuration Directory<br />
0 [ 0] RVA [size] of Bound Import Directory<br />
2000 [ 8] RVA [size] of Import Address Table Directory<br />
0 [ 0] RVA [size] of Delay Import Directory<br />
0 [ 0] RVA [size] of COM Descriptor Directory<br />
0 [ 0] RVA [size] of Reserved Directory</p>
<p>SECTION HEADER #1<br />
.text name<br />
9 virtual size<br />
1000 virtual address (00401000 to 00401008)<br />
200 size of raw data<br />
400 file pointer to raw data (00000400 to 000005FF)<br />
0 file pointer to relocation table<br />
0 file pointer to line numbers<br />
0 number of relocations<br />
0 number of line numbers<br />
60000020 flags<br />
Code<br />
Execute Read</p>
<p>RAW DATA #1<br />
00401000: 6A 00 FF 15 00 20 40 00 CC j.ÿ.. @.Ì</p>
<p>SECTION HEADER #2<br />
.rdata name<br />
5C virtual size<br />
2000 virtual address (00402000 to 0040205B)<br />
200 size of raw data<br />
600 file pointer to raw data (00000600 to 000007FF)<br />
0 file pointer to relocation table<br />
0 file pointer to line numbers<br />
0 number of relocations<br />
0 number of line numbers<br />
40000040 flags<br />
Initialized Data<br />
Read Only</p>
<p>RAW DATA #2<br />
00402000: 40 20 00 00 00 00 00 00 00 30 40 00 58 30 40 00 @ .......0@.X0@.<br />
00402010: 38 20 00 00 00 00 00 00 00 00 00 00 4E 20 00 00 8 ..........N ..<br />
00402020: 00 20 00 00 00 00 00 00 00 00 00 00 00 00 00 00 . ..............<br />
00402030: 00 00 00 00 00 00 00 00 40 20 00 00 00 00 00 00 ........@ ......<br />
00402040: 04 01 45 78 69 74 50 72 6F 63 65 73 73 00 4B 45 ..ExitProcess.KE<br />
00402050: 52 4E 45 4C 33 32 2E 64 6C 6C 00 00 RNEL32.dll..</p>
<p>Section contains the following imports:</p>
<p>KERNEL32.dll<br />
402000 Import Address Table<br />
402038 Import Name Table<br />
0 time date stamp<br />
0 Index of first forwarder reference</p>
<p>104 ExitProcess</p>
<p>SECTION HEADER #3<br />
.data name<br />
324 virtual size<br />
3000 virtual address (00403000 to 00403323)<br />
0 size of raw data<br />
0 file pointer to raw data<br />
0 file pointer to relocation table<br />
0 file pointer to line numbers<br />
0 number of relocations<br />
0 number of line numbers<br />
C0000040 flags<br />
Initialized Data<br />
Read Write</p>
<p>Summary</p>
<p>1000 .data<br />
1000 .rdata<br />
1000 .text</p>
</blockquote>
<p>Also ich finde es überhaupt nicht schwierig... oder was hast Du gemeint?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1196425</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1196425</guid><dc:creator><![CDATA[Jochen Kalmbach]]></dc:creator><pubDate>Fri, 22 Dec 2006 07:05:02 GMT</pubDate></item><item><title><![CDATA[Reply to Multithreaded-DLL on Fri, 22 Dec 2006 07:37:02 GMT]]></title><description><![CDATA[<p>sehe ich das richtig das ein manifest nur dann benötigt wird wenn man die CRT 8 verwendet? ich versuche nämlich auch schon seit längerem meine appgröße im relase möglichst klein zu halten und bekam die CRT bisher einfach nicht raus. das hat teilweise auch schon dazu geführt das auf manchen systemen meine anwendung erst garnicht starten wollte. (FM: Fehler in Anwendungskonfiguration, installieren Sie die anwendung neu oder ähnlich) ich brauch die CRT nämlich auch nicht wirklich, das bissle strings hin und herkopieren kann man au selbst implementieren oder aus den win limps importiern (lstrcmp, lstrcpy, ...)<br />
meine app ist ein reiner server benötigt keine CRT, kein manifest und soll auf allen win systemen laufen ohne zusätzliche dll's.</p>
<p>gibts vllt irgendwo tutorials zur größenoptimierung mit VS2005 wenn man REINE winapi apps machen möchte? bin in der richtung noch ned so fit.</p>
<p>MfG<br />
RadiatioN</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1196436</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1196436</guid><dc:creator><![CDATA[Radiation2k5 offline]]></dc:creator><pubDate>Fri, 22 Dec 2006 07:37:02 GMT</pubDate></item><item><title><![CDATA[Reply to Multithreaded-DLL on Fri, 22 Dec 2006 08:02:19 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-user plugin-mentions-a" href="https://www.c-plusplus.net/forum/uid/5675">@Jochen</a>: Wenn wir bei C bleiben OK.<br />
Wie sieht das mit C++ aus, wenn dann statische/globale Objekte hinzukommen? new/delete sind IMHO komplett Abhängig von der CRT... oder irre ich mich da?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1196447</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1196447</guid><dc:creator><![CDATA[Martin Richter]]></dc:creator><pubDate>Fri, 22 Dec 2006 08:02:19 GMT</pubDate></item><item><title><![CDATA[Reply to Multithreaded-DLL on Fri, 22 Dec 2006 09:18:21 GMT]]></title><description><![CDATA[<p>Martin Richter schrieb:</p>
<blockquote>
<p><a class="plugin-mentions-user plugin-mentions-a" href="https://www.c-plusplus.net/forum/uid/5675">@Jochen</a>: Wenn wir bei C bleiben OK.<br />
Wie sieht das mit C++ aus, wenn dann statische/globale Objekte hinzukommen? new/delete sind IMHO komplett Abhängig von der CRT... oder irre ich mich da?</p>
</blockquote>
<p>Hmm... bei C++ wird es etwas komplexer, da hier noch vom Compiler spezielle Funktionen erwartet werden.<br />
Das Folgende Beispiel hat z.B: auch keinerlei Abhängigkeiten zur CRT:</p>
<pre><code class="language-cpp">#include &lt;windows.h&gt;
#pragma comment(linker, &quot;/ENTRY:myMain&quot;)

void* operator new(size_t size)
{
  void *p = HeapAlloc(GetProcessHeap(), 0, size);
  //if (p == 0)
  //  throw 0;
  return (p);
}
void operator delete(void *pUserData)
{
  if (pUserData != NULL)
    HeapFree(GetProcessHeap(), 0, pUserData);
}

class A
{
public:
  A()
  {
    a = 11;
    b = 2;
  }
  void Out()
  {
    DWORD dwWritten;
    WriteConsoleA(GetStdHandle(STD_OUTPUT_HANDLE), &quot;Hello world&quot;, a, &amp;dwWritten, NULL);
  }
  DWORD a;
  int b;
};

extern &quot;C&quot; int __stdcall myMain()
{
  A a;
  A *pa = new A();
  pa-&gt;Out();
  delete pa;
  ExitProcess(0);
}
</code></pre>
<p>Wenn Du das &quot;throw&quot; wieder reinnimmst, dann wird es kompliziert... dieses hier ist jetzt vollkommen Compiler-Spezifisch... kann aber auch ersetzt werden, wenn Du weisst, was der Compiler genau erwartet.<br />
Das scheint mir auch der einzige Code-Teil der CRT zu sein, welcher <strong>nicht</strong> bei den Sourcen dabei ist!<br />
Hier findet sich z.B: mehr darüber:<br />
<a href="http://www.ddj.com/dept/windows/184416600" rel="nofollow">http://www.ddj.com/dept/windows/184416600</a></p>
<p>Folgendes ist dann der (Test-)Code mit C++-Exceptions, welches auch keinerlei Abhängigkeiten zur CRT hat:</p>
<pre><code class="language-cpp">#include &lt;windows.h&gt;
#pragma comment(linker, &quot;/ENTRY:myMain&quot;)
// TODO: Linker-Options: /NODEFAULTLIB:msvcrt.lib&quot;

void* operator new(size_t size)
{
  void *p = HeapAlloc(GetProcessHeap(), 0, size);
  if (p == 0)
    throw 0;
  return (p);
}
void operator delete(void *pUserData)
{
  if (pUserData != NULL)
    HeapFree(GetProcessHeap(), 0, pUserData);
}

class type_info {
public:
  virtual ~type_info() {}
    bool operator==(const type_info&amp; rhs) const {return false;}
    bool operator!=(const type_info&amp; rhs) const {return false;}
    int before(const type_info&amp; rhs) const {return 0;}
    const char* name() const {return 0;}
    const char* raw_name() const {return 0;}
};

const DWORD CPP_EXCEPTION    = 0xE06D7363; 
const DWORD MS_MAGIC         = 0x19930520;
extern &quot;C&quot; void __stdcall _CxxThrowException(void * pObject, _s__ThrowInfo const * pObjectInfo)
{
  const ULONG_PTR args[] ={ MS_MAGIC, (ULONG_PTR)pObject, (ULONG_PTR)pObjectInfo };
  RaiseException(CPP_EXCEPTION, EXCEPTION_NONCONTINUABLE, sizeof(args)/sizeof(args[0]), args);
}

class A
{
public:
  A()
  {
    a = 11;
    b = 2;
  }
  void Out()
  {
    DWORD dwWritten;
    WriteConsoleA(GetStdHandle(STD_OUTPUT_HANDLE), &quot;Hello world&quot;, a, &amp;dwWritten, NULL);
  }
  DWORD a;
  int b;
};

extern &quot;C&quot; int __stdcall myMain()
{
  A a;
  A *pa = new A();
  pa-&gt;Out();
  delete pa;
  ExitProcess(0);
}
</code></pre>
<p>Und das mit den globalen Objekten wird man auch in der Griff bekommen, da ja hier die Sourcen vorliegen <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="😉"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1196481</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1196481</guid><dc:creator><![CDATA[Jochen Kalmbach]]></dc:creator><pubDate>Fri, 22 Dec 2006 09:18:21 GMT</pubDate></item><item><title><![CDATA[Reply to Multithreaded-DLL on Fri, 22 Dec 2006 22:24:49 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-user plugin-mentions-a" href="https://www.c-plusplus.net/forum/uid/5675">@Jochen</a> Kalmbach:<br />
Genau solche Sachen meinte ich mit &quot;fürchterlich kompliziert&quot; <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 />
Sobald du Exceptions verwenden willst heisst es basteln. Sobald du dynamic_cast verwenden willst heisst es noch mehr basteln. RTTI im Allgemeinen -&gt; basteln.<br />
Weiters kannst du in deinem Programm zwar Exceptions werfen, aber nicht fangen. Stack Unwinding -&gt; wieder in der CRT implementiert.</p>
<p>Wenn man also reinen C-Code schreiben will, bzw. bloss &quot;etwas schöneren C-Code&quot; mit C++, dann geht es vielleicht. Trotzdem würde ich mich da eher nach einem Compiler umsehen wo man das etwas einfacher hinbekommt als mit dem MSVC <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/1196828</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1196828</guid><dc:creator><![CDATA[hustbaer]]></dc:creator><pubDate>Fri, 22 Dec 2006 22:24:49 GMT</pubDate></item></channel></rss>