<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
  <channel>
    <title>'How to create class DLL' Thread RSS Feed</title>
    <link>http://www.programmersheaven.com/</link>
    <description>Contains the latest posts from the thread 'How to create class DLL' posted on the 'Visual C++' forum at Programmer's Heaven.</description>
    <language>en</language>
    <copyright>Copyright 2013 Programmers Heaven</copyright>
    <pubDate>Sat, 18 May 2013 13:38:50 -0700</pubDate>
    <lastBuildDate>Sat, 18 May 2013 13:38:50 -0700</lastBuildDate>
    <generator>Argotic Syndication Framework 2007.3.0.1, http://www.codeplex.com/Argotic</generator>
    <docs>http://www.rssboard.org/rss-specification</docs>
    <ttl>360</ttl>
    <image>
      <url>http://www.programmersheaven.com/images/ph.gif</url>
      <title>Programmers Heaven</title>
      <link>http://www.programmersheaven.com/</link>
      <width>88</width>
      <height>31</height>
    </image>
    <item>
      <title>How to create class DLL</title>
      <link>http://www.programmersheaven.com/mb/vcpage/310523/310523/how-to-create-class-dll/</link>
      <description>Hello ,&lt;br /&gt;
&lt;br /&gt;
    I am developing application using COM interface. in that&lt;br /&gt;
     application i created 2 class. &lt;br /&gt;
     Now i want to convert that application in dll.&lt;br /&gt;
    But i don't know how to create Class DLL in vc++ and use that&lt;br /&gt;
    DLL in VB.&lt;br /&gt;
&lt;br /&gt;
    plase tell me how to create class DLL and how to use in vb.&lt;br /&gt;
    send me source code if possile or tell me the steps.&lt;br /&gt;
&lt;br /&gt;
    waiting for +ve response.&lt;br /&gt;
&lt;br /&gt;
Regards,&lt;br /&gt;
Rajesh&lt;br /&gt;
    &lt;br /&gt;
    &lt;br /&gt;
&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/vcpage/310523/310523/how-to-create-class-dll/</guid>
      <pubDate>Fri, 29 Jul 2005 06:30:47 -0700</pubDate>
      <category>Visual C++</category>
    </item>
    <item>
      <title>Re: How to create class DLL</title>
      <link>http://www.programmersheaven.com/mb/vcpage/310523/313698/re-how-to-create-class-dll/#313698</link>
      <description>: Hello ,&lt;br /&gt;
: &lt;br /&gt;
:     I am developing application using COM interface. in that&lt;br /&gt;
:      application i created 2 class. &lt;br /&gt;
:      Now i want to convert that application in dll.&lt;br /&gt;
:     But i don't know how to create Class DLL in vc++ and use that&lt;br /&gt;
:     DLL in VB.&lt;br /&gt;
: &lt;br /&gt;
:     plase tell me how to create class DLL and how to use in vb.&lt;br /&gt;
:     send me source code if possile or tell me the steps.&lt;br /&gt;
: &lt;br /&gt;
:     waiting for +ve response.&lt;br /&gt;
: &lt;br /&gt;
: Regards,&lt;br /&gt;
: Rajesh&lt;br /&gt;
&lt;span style="color: Blue;"&gt;&lt;br /&gt;
First create a DLL project with the two classes in.&lt;br /&gt;
This is what I do:&lt;/span&gt;&lt;pre class="sourcecode"&gt;
class foo
{
   Create ();
};
&lt;span style="color: Blue;"&gt;
// DLLs follow the C calling convention, so there
//is no standard way to export classes directly. MSVC
// provides a nonstandard way though.&lt;/span&gt;
extern "C"
{
_declspec (dllexport) int InitDLLInterface (foo** obj)
{
  *obj=new foo;
  return 0;
}
_declspec (dllexport) void ShutdownDLLInterface (foo** obj)
{
  delete obj;
}
}&lt;/pre&gt;&lt;span style="color: Blue;"&gt;&lt;br /&gt;
If you link in the DLL's *.lib file, the OS will&lt;br /&gt;
automatically load the DLL at startup. Or you could&lt;br /&gt;
load it via MSVC ::LoadLibrary().&lt;br /&gt;
&lt;br /&gt;
Sorry,  dont know how to link DLLs with VB though.&lt;br /&gt;
&lt;br /&gt;
Good Luck!&lt;/span&gt;&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/vcpage/310523/313698/re-how-to-create-class-dll/#313698</guid>
      <pubDate>Mon, 29 Aug 2005 15:42:30 -0700</pubDate>
      <category>Visual C++</category>
    </item>
    <item>
      <title>Re: How to create class DLL</title>
      <link>http://www.programmersheaven.com/mb/vcpage/310523/423427/re-how-to-create-class-dll/#423427</link>
      <description>The dll was great. But i want to know how the above code implement in in a class.&lt;br /&gt;
&lt;br /&gt;
waiting for a postive response &lt;br /&gt;
&lt;br /&gt;
Regards&lt;br /&gt;
Rejeesh R&lt;br /&gt;
&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/vcpage/310523/423427/re-how-to-create-class-dll/#423427</guid>
      <pubDate>Sun, 24 Apr 2011 09:48:57 -0700</pubDate>
      <category>Visual C++</category>
    </item>
    <item>
      <title>Re: How to create class DLL</title>
      <link>http://www.programmersheaven.com/mb/vcpage/310523/427954/re-how-to-create-class-dll/#427954</link>
      <description>As you said,how to implement this code in a class.If I got your problem right, you need to create an MFC extension dll.&lt;br /&gt;
After creation and successful registration of this dll you can add reference in VB project.please go through the link below (if not found):&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://www.codeguru.com/cpp/cpp/cpp_mfc/tutorials/article.php/c4017"&gt;http://www.codeguru.com/cpp/cpp/cpp_mfc/tutorials/article.php/c4017&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
When you raised this question by saying you have an application using COM interface,why don't you create COM dll?&lt;br /&gt;
&lt;br /&gt;
regards,&lt;br /&gt;
Vatsa&lt;br /&gt;
&lt;a href="http://www.objectiveprogramming.com"&gt;www.objectiveprogramming.com&lt;/a&gt;&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/vcpage/310523/427954/re-how-to-create-class-dll/#427954</guid>
      <pubDate>Thu, 22 Mar 2012 05:40:55 -0700</pubDate>
      <category>Visual C++</category>
    </item>
    <item>
      <title>Re: How to create class DLL</title>
      <link>http://www.programmersheaven.com/mb/vcpage/310523/427955/re-how-to-create-class-dll/#427955</link>
      <description>As you said,how to implement this code in a class.If I got your problem right, you need to create an MFC extension dll.&lt;br /&gt;
After creation and successful registration of this dll you can add reference in VB project.please go through the link below (if not found):&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://www.codeguru.com/cpp/cpp/cpp_mfc/tutorials/article.php/c4017"&gt;http://www.codeguru.com/cpp/cpp/cpp_mfc/tutorials/article.php/c4017&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
When you raised this question by saying you have an application using COM interface,why don't you create COM dll?&lt;br /&gt;
&lt;br /&gt;
regards,&lt;br /&gt;
Vatsa&lt;br /&gt;
&lt;a href="http://www.objectiveprogramming.com"&gt;www.objectiveprogramming.com&lt;/a&gt;&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/vcpage/310523/427955/re-how-to-create-class-dll/#427955</guid>
      <pubDate>Thu, 22 Mar 2012 05:43:43 -0700</pubDate>
      <category>Visual C++</category>
    </item>
  </channel>
</rss>