<?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[Voraussetzugen für das Registrieren einer DLL]]></title><description><![CDATA[<p>Hallo,</p>
<p>ich brauche in unserer ERP Software eine externe Komponente. Das ganz sollte aber performant sein. Ich habe mich daswegen für C++ entschieden. Bisher habe ich alle externen Funktionen usw. in C# in den VS2008 entwickelt und da kann ich beim kompilieren direkt sagen, dass die DLL direkt für COM Interop registriert werden soll.<br />
Diese Option gibt es aber nicht wenn ich über den Win32 Anwendungs Assistenten eine DLL erstelle.<br />
Kann mir vielleicht jemand ein minimal Model einer DLL zukommen lassen dieregistriert werden kann? Ich weiß nicht so ganz wo ich anfangen soll...</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/248526/voraussetzugen-für-das-registrieren-einer-dll</link><generator>RSS for Node</generator><lastBuildDate>Wed, 16 Sep 2026 23:04:33 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/248526.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 26 Aug 2009 07:48:21 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Voraussetzugen für das Registrieren einer DLL on Wed, 26 Aug 2009 07:48:21 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>ich brauche in unserer ERP Software eine externe Komponente. Das ganz sollte aber performant sein. Ich habe mich daswegen für C++ entschieden. Bisher habe ich alle externen Funktionen usw. in C# in den VS2008 entwickelt und da kann ich beim kompilieren direkt sagen, dass die DLL direkt für COM Interop registriert werden soll.<br />
Diese Option gibt es aber nicht wenn ich über den Win32 Anwendungs Assistenten eine DLL erstelle.<br />
Kann mir vielleicht jemand ein minimal Model einer DLL zukommen lassen dieregistriert werden kann? Ich weiß nicht so ganz wo ich anfangen soll...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1766814</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1766814</guid><dc:creator><![CDATA[secondsun]]></dc:creator><pubDate>Wed, 26 Aug 2009 07:48:21 GMT</pubDate></item><item><title><![CDATA[Reply to Voraussetzugen für das Registrieren einer DLL on Wed, 26 Aug 2009 07:55:06 GMT]]></title><description><![CDATA[<p>Das ist nicht C++.<br />
Soll ich das nach WinAPI, C++/CLI oder C# verschieben? Oder nochwoanders hin?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1766816</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1766816</guid><dc:creator><![CDATA[volkard]]></dc:creator><pubDate>Wed, 26 Aug 2009 07:55:06 GMT</pubDate></item><item><title><![CDATA[Reply to Voraussetzugen für das Registrieren einer DLL on Wed, 26 Aug 2009 07:58:13 GMT]]></title><description><![CDATA[<p>C# auf keinen Fall. Da komme ich ja her und hätte das Problem auch nicht.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1766819</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1766819</guid><dc:creator><![CDATA[secondsun]]></dc:creator><pubDate>Wed, 26 Aug 2009 07:58:13 GMT</pubDate></item><item><title><![CDATA[Reply to Voraussetzugen für das Registrieren einer DLL on Wed, 26 Aug 2009 09:03:56 GMT]]></title><description><![CDATA[<p>Mach einfach eine COM DLL, sowas gibts doch bei der Projektauswahl, oder?</p>
<p><strong>Edit:</strong><br />
<a class="plugin-mentions-user plugin-mentions-a" href="https://www.c-plusplus.net/forum/uid/106">@volkard</a>: ich würds nach Visual C++ / MFC verschieben - ist das passendste, wenn auch nicht perfekt.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1766842</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1766842</guid><dc:creator><![CDATA[theta]]></dc:creator><pubDate>Wed, 26 Aug 2009 09:03:56 GMT</pubDate></item><item><title><![CDATA[Reply to Voraussetzugen für das Registrieren einer DLL on Wed, 26 Aug 2009 09:47:02 GMT]]></title><description><![CDATA[<p>Okay,<br />
ich habe eine MFC DLL erstellt. Nun stehe ich vor dem Problem, dass ich eigentlich gar nicht so genau weiß wo ich meinen Code einfügen soll. Im Prinzip reicht es ja erstmal, wenn ich nach außen hin eine Funktion zum Testen sehen kann..</p>
<p>Das ist die Haupt *.cpp</p>
<pre><code class="language-cpp">// STRPerfTest.cpp : Definiert die Initialisierungsroutinen für die DLL.
//

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

#ifdef _DEBUG
#define new DEBUG_NEW
#endif
// CSTRPerfTestApp

BEGIN_MESSAGE_MAP(CSTRPerfTestApp, CWinApp)
END_MESSAGE_MAP()

// CSTRPerfTestApp-Erstellung

CSTRPerfTestApp::CSTRPerfTestApp()
{
	// TODO: Hier Code zur Konstruktion einfügen.
	// Alle wichtigen Initialisierungen in InitInstance positionieren.
}

// Das einzige CSTRPerfTestApp-Objekt

CSTRPerfTestApp theApp;

const GUID CDECL BASED_CODE _tlid =
		{ 0x7FFB6491, 0xE048, 0x4985, { 0x97, 0xB1, 0xD3, 0x5C, 0x71, 0xE6, 0x67, 0x48 } };
const WORD _wVerMajor = 1;
const WORD _wVerMinor = 0;

// CSTRPerfTestApp-Initialisierung

BOOL CSTRPerfTestApp::InitInstance()
{
	CWinApp::InitInstance();

	// Alle OLE-Server(-factorys) als aktiv registrieren. Dies aktiviert die
	//  OLE-Bibliotheken, um Objekte von anderen Anwendungen zu erstellen.
	COleObjectFactory::RegisterAll();

	return TRUE;
}

// DllGetClassObject - Gibt eine Klassenfactory zurück.

STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID* ppv)
{
	AFX_MANAGE_STATE(AfxGetStaticModuleState());
	return AfxDllGetClassObject(rclsid, riid, ppv);
}

// DllCanUnloadNow - Ermöglicht COM, eine DLL zu entladen.

STDAPI DllCanUnloadNow(void)
{
	AFX_MANAGE_STATE(AfxGetStaticModuleState());
	return AfxDllCanUnloadNow();
}

// DllRegisterServer - Fügt der Systemregistrierung Einträge hinzu.

STDAPI DllRegisterServer(void)
{
	AFX_MANAGE_STATE(AfxGetStaticModuleState());

	if (!AfxOleRegisterTypeLib(AfxGetInstanceHandle(), _tlid))
		return SELFREG_E_TYPELIB;

	if (!COleObjectFactory::UpdateRegistryAll())
		return SELFREG_E_CLASS;

	return S_OK;
}

// DllUnregisterServer - Entfernt Einträge aus der Systemregistrierung.

STDAPI DllUnregisterServer(void)
{
	AFX_MANAGE_STATE(AfxGetStaticModuleState());

	if (!AfxOleUnregisterTypeLib(_tlid, _wVerMajor, _wVerMinor))
		return SELFREG_E_TYPELIB;

	if (!COleObjectFactory::UpdateRegistryAll(FALSE))
		return SELFREG_E_CLASS;

	return S_OK;
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1766863</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1766863</guid><dc:creator><![CDATA[secondsun]]></dc:creator><pubDate>Wed, 26 Aug 2009 09:47:02 GMT</pubDate></item><item><title><![CDATA[Reply to Voraussetzugen für das Registrieren einer DLL on Wed, 26 Aug 2009 10:05:52 GMT]]></title><description><![CDATA[<p>secondsun schrieb:</p>
<blockquote>
<p>Bisher habe ich alle externen Funktionen usw. in C# in den VS2008 entwickelt und da kann ich beim kompilieren direkt sagen, dass die DLL direkt für COM Interop registriert werden soll.<br />
Diese Option gibt es aber nicht wenn ich über den Win32 Anwendungs Assistenten eine DLL erstelle.</p>
</blockquote>
<p>Eventuell hilft <a href="http://stackoverflow.com/questions/465345/how-do-you-create-a-com-dll-in-visual-studio-2008" rel="nofollow">das hier</a> oder <a href="http://www.codeproject.com/KB/atl/SimpleDlls.aspx" rel="nofollow">das</a>?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1766876</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1766876</guid><dc:creator><![CDATA[Whatever17]]></dc:creator><pubDate>Wed, 26 Aug 2009 10:05:52 GMT</pubDate></item><item><title><![CDATA[Reply to Voraussetzugen für das Registrieren einer DLL on Wed, 26 Aug 2009 10:25:31 GMT]]></title><description><![CDATA[<p>Du sollst keine MFC DLL erstellen, sondern eine COM DLL, einen COM Server.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1766887</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1766887</guid><dc:creator><![CDATA[theta]]></dc:creator><pubDate>Wed, 26 Aug 2009 10:25:31 GMT</pubDate></item><item><title><![CDATA[Reply to Voraussetzugen für das Registrieren einer DLL on Wed, 26 Aug 2009 12:35:22 GMT]]></title><description><![CDATA[<p>Ok, das ist das was ich eigentlich bräuchte aber...</p>
<p>Scheiße, wieso geht das denn nicht noch komplizierter?!<br />
Da kann ich schon fast übelegen, das mit Assembler zu machen..</p>
<p>Ich glaube ich bleibe bei C#. Das ist mir sonst zu doof...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1766968</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1766968</guid><dc:creator><![CDATA[secondsun]]></dc:creator><pubDate>Wed, 26 Aug 2009 12:35:22 GMT</pubDate></item><item><title><![CDATA[Reply to Voraussetzugen für das Registrieren einer DLL on Wed, 26 Aug 2009 13:07:16 GMT]]></title><description><![CDATA[<p>Ich verstehe Dein Problem nicht.<br />
Eine DLL ist nichts anderes als eine besondere Bibliothek mit eigenen Funktionen. Die Einbindung ist Angelegenheit des Compilers und des Linkers.<br />
Unterschiede gibt es nur, ob Konsole oder Windows. Wie man das macht, sollte in den Beschreibungen des verwendeten Compilers ausreichend beschrieben sein. C++ hat damit keine grossen Schwierigkeiten!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1766996</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1766996</guid><dc:creator><![CDATA[berniebutt]]></dc:creator><pubDate>Wed, 26 Aug 2009 13:07:16 GMT</pubDate></item></channel></rss>