How to create dll in Visual Studio 2008 in Visual C++

Hello,
  I have insatlled Visual Studio 2008. I have to create DLL in Project
type Visual C++.
Which Template i have to select to reate dll, MFC DLL or Class
Library?.

I have to call or import this dll in Windows Forms Application. How
can i do this. Please give details procedure to do this.
0
4/30/2008 5:58:46 AM
vc.mfc 33608 articles. 0 followers. Follow

1 Replies
492 Views

Similar Articles

[PageSpeed] 51

"Abhijit D. Babar" <abhijitit94@gmail.com> ha scritto nel messaggio 
news:a1269dbc-fbb7-41ba-8de3-b6935ee5f0b6@q27g2000prf.googlegroups.com...

>  I have insatlled Visual Studio 2008. I have to create DLL in Project
> type Visual C++.
> Which Template i have to select to reate dll, MFC DLL or Class
> Library?.
>
> I have to call or import this dll in Windows Forms Application.

If you want to create a "managed" (i.e. CLR-based) DLL to be used from C#, I 
think that you should choose "Class Library" (under Visual C++ / CLR node in 
the "Project types" tree). This class library will export "managed" 
(CLR-based) classes, i.e. it will have an object-oriented structure (with 
classes, methods, etc.)
You can create these classes using C++/CLI extensions to C++ language, and 
you can use these classes in other .NET languages, including C# and VB.NET.

However, you can also create a "native" DLL, with a C interface [*], and 
call that from a Windows Form Application. C# and VB.NET offer mechanisms to 
call native DLLs.
In that case, yuo can select "Win32 Project" from Visual C++ / Win32 node 
(in "Project types" tree).
Then you go to "Application Settings", and choose "Application type: DLL".

And it is also possible to develop a COM-based DLL in C++ (exporting an 
object-oriented interface, using COM), and call that DLL from Windows Forms 
Application.
In that case you can use ATL to build the COM DLL (so you can choose project 
type: Visual C++ -> ATL -> ATL Project), or you can use MFC (so you can 
choose project type: Visual C++ -> MFC -> MFC ActiveX Control).

There are several options... it depends on your needs...

If you want to build a DLL with an object-oriented interface using C++/CLI, 
and call these managed classes (written in C++/CLI and exposed from the DLL) 
from C# or VB.NET in Windows Form Applications, maybe the simplest solution 
is the first one.


[*] Of course you can use C++ inside the DLL, what is important is that the 
interface must be pure C.


HTH,
Giovanni


0
4/30/2008 9:06:43 AM
Reply:

Similar Artilces:

Create Company contact in GAL
How do I create 1 contact with everyones email from the GAL. This way if Joe wants to send an email to everyone in the company he click to the "Company" and it emails everyone. In news:7EB7B340-79E3-48CB-957E-ECADD6B2C0DE@microsoft.com, pwverber <pwverber@discussions.microsoft.com> typed: > How do I create 1 contact with everyones email from the GAL. This way > if Joe wants to send an email to everyone in the company he click to > the "Company" and it emails everyone. Create a distribution group called Company and add all the users to it. You create...

Publisher 2003 always creates PNG graphics
Even though I do not check the box to allow use of PNG format, Publisher always uses it. How do I stop it? Please post only in the correct group, and then only once. Refer to your post in webdesign. David Bartosik - [MSFT MVP] www.publishermvps.com www.davidbartosik.com "Lisa" <Lisa@discussions.microsoft.com> wrote in message news:008E0558-CF3A-4961-AAD7-28A3DB7629CC@microsoft.com... > Even though I do not check the box to allow use of PNG format, Publisher > always uses it. How do I stop it? ...

Automatically creat a folder in Inbox
What we'd like to do is have a new folder created in everyone's mailbox. We want to set the quota for thsi folder to zero, and then point it to a homepage. I have looked at managed folders as an option, but had no luck. Can anyone point me in the right direction? We need a way to create this folder in mass for existing users, and also to have it automatically added for new users. I suppose if we had a script that we could run once a week for example, that would be good enough as well. Any ideas? Thanks On Wed, 27 Jan 2010 08:45:09 -0800 (PST), TP <purif...

restoring backup after reformatting c:
I wiped out my c: drive and reformatted it. I have reinstalled Money but it will not let me use the backup disks I created. It gives me an error message "My Money Backup d1.mbf is corrupded or not a Money backup file." I don't think it's corrupted - but it may be becasue I previously used the 99 version of Money and later upgraded to this version. When it looks for backup files, the file extensios it looks for do not seem to match ".mbf" Can anyone help??? Thank you! Have you tried double clicking on the backup file instead of trying to open it using Mon...

Create Closed Opportunity Through SDK CRM 3.0
Is it possible to create a closed opportunity through the SDK in CRM 3.0. I'm writing an import tool to import several thousand opportunities into CRM and most of them are closed and finished already. When i set the .statecode to 1 = won or 2 = lost it simply comes into CRM as Open. On Apr 9, 10:32=A0am, Brett C <b32chel...@gmail.com> wrote: > Is it possible to create a closed opportunity through the SDK in CRM > 3.0. I'm writing an import tool to import several thousand > opportunities into CRM and most of them are closed and finished > already. > When i set the ...

Vista Home Premium / Dell Vostro 200
I'm getting nowhere with this ! Have been Googling, and hunting around this PC looking for something that looks like it might be missing, or simply never included in the first place ! I was guessing that this PC came with a leaflet, and/or advice usually along the lines of, "The first thing you must do is create a 'Recovery Disc set,' " Well, I have scoured through, for ages, what's installed on this DELL PC and I'm darned if I can see it ! I wanted to make a "Recovery Disc Set" that could, if necessary, restore the Recovery Partition,...

Linking a Non MFC dll to a MFC dll
Hi, I have a non-mfc dll (user.dll). I need to link it with another application that accepts input. I decided to use a MFC dialog box for that purpose (MyDLL). I tested the functioning of the MyDll from a MFC exe application (TestDll). But when I try to link it to the non-mfc dll (ie user.dll) the following errors are generated: ------------------------- F:\xyz\MyDll\MyClass.h(16): error C2146: syntax error : missing ';' before identifier 'SayHello' F:\xyz\MyDll\MyClass.h(16): error C2071: 'CMyClass::CString' : illegal storage class F:\xyz\MyDll\MyClass.h(16): err...

creating fax forms
When I was working years ago I used to create very pretty fax forms. Now that I am well into retirement I have forgotten how to do these. I either used Word or Excel for the forms. Can anyone help?? Thank you Likely, it was Word. Try this, Nana: http://www.officearticles.com/word/create_a_fill-in_form_in_microsoft_word.htm or this http://www.officearticles.com/word/easy_guided_forms_in_microsoft_word.htm or hit File-->New and use one of Word's built-in templates. ************ Anne Troy www.OfficeArticles.com "nana72" <nana72@discussions.microsoft.com> wrote in ...

How to create 4-panels brochure
When I create new brochure by wizard. I can't select 4 panels option in task pane. This option is inactive. Why? Thank for your help What version Publisher? Usually when you select a four panel, Publisher will default to a template for legal size stock (14 x 8.5). Setup your printer for legal, see if that makes a difference. -- Mary Sauer MSFT MVP http://office.microsoft.com/ http://msauer.mvps.org/ news://msnews.microsoft.com "pat07" <pat07@discussions.microsoft.com> wrote in message news:3F92FF05-2D75-4C98-914D-0ADA610BDFAD@microsoft.com... > When I create ne...

Publisher
I created an original "certificate" in Publisher. I want to shrink the certificate so that I can make it into a post card. I want to be able to fit four on a page when I print it out. I do not want it to effect the integrity of the doucument. How can I accomplish this? I gotta ask this - Why didn't you make it small to start with? One way to solve your dilemma: Set all of your text to "Shrink to fit". Select all, group it, grab a handle and drag it in. -- JoAnn Paules MVP Microsoft [Publisher] "shrinkwrap" <shrinkwrap@discussions.microsoft.com...

WAB.DLL
I am not able to send out email using Outlook 2000 or Outlook Express. I using operating system 2000. If anybody have this file only, please zip it to me. I have a system that uses the same OS and office version. Nowhere does it have WAB.DLL - so that isn't a critical file for the connection. It does have OUTLWAB.DLL in Windows\System32. I think you have a different problem. Can you connect to the internet through your ISP? I'd suggest reinstalling Outlook and if it still can't sendreceive mail, call your ISP for configuration help. "mail@holmestool.com" <ano...

Creating month sequences
I was wondering... Is there an easy way to create a range of cells that a) show just the month and year and b) can calculate the next month and year for each cell in the range? Example: jan-06 feb-06 ... nov-10 dec-10 Enter the first 2 dates (I use the m/d/y format): A1 = 1/1/2006 B1 = 2/1/2006 Select both A1 and B1 and format the way you want: Format>Cells>Custom mmm-yy OK With both cells still selected "grab" the fill handle and drag across as needed. -- Biff Microsoft Excel MVP "Henry Stock" <henry@henry-stock.com> wrote in mes...

Creating Suitable Certificates for SCOM Gateway in SBS 2008
I need to create a certificate to allow an operations manager gateway to work on a SBS 2008 machine. The problem is that the CA on the SBS server appears to be fuctioning as an Enterprise CA which means I need to create a new certificate template (as per the Operations Manager 2007 R2 Security Guide). The problem is once created I can not install this certificate template because this is not an enterprise version of Windows Server and therefore adding v2 and v3 templates is not supported. A possible solution would be to backup the CA, uninstall it and then reinstall as a Stand...

Create This Rule On All Accounts Grayed Out
I have two Microsoft Exchange 5.5 mailboxes open in Microsoft Outlook 2002. I am trying to create a rule that will run on both Exchange mailboxes but the "Create This Rule On All Accounts" check box is grayed out and cannot be selected. How do I enable this check box? Thanks, Mark rules only apply to the default exchange account, not secondary ones. You'd need to log into the mailbox and create server side rules for them to work on the second mailbox. -- Diane Poremsky [MVP - Outlook] Author, Teach Yourself Outlook 2003 in 24 Hours Coauthor, OneNote 2003 for Windows (V...

Dialog
Hello, I have a dialog (*.rc) and I want to add a field that will be behind an existing field. When you add a new item to the dialog, automatically it appears on the front. Is it possible to bring items that were created before to the front? Thank a lot, Liat It can be a bit messy until you get the hang of it, but you change it with the tab order, which you can invoke by pressing <Ctrl>+D -- Bjarne Nielsen "Liat" <anonymous@discussions.microsoft.com> skrev i en meddelelse news:096801c3c483$ca6da8d0$a101280a@phx.gbl... > Hello, > > I have a dialog (*.rc)...

How to create a Workflow .NET assembly that creates a CUSTOM ENTITY object?
Hi everybody! I need some help!! :) I created a custom entity on my CRM 3.0 Server, called "PosVenda". I also created some custom fields and a relationship with the Opportunity entity. It's working fine. But now, I need to create a workflow rule, that fires when an Opportunity is closed (Won), and creates a "PosVenda". I'm trying now to create a Workflow .NET assembly, to do this action. But the question is: How can I use CRM classes to create a new "PosVenda"? Thanks a lot for your help!! []'s Nando ...

how do i create an XYZ chart?
i want to make a 3D chart from my series of 3 dimensional points (3 columns) but it appears excel cant do it. Excel has only the most rudimentary 3D charting capabilities, mostly along the lines of adding 3D effects to a perfectly good 2D chart. Andy Pope has a working example showing how to use formulas and a 2D XY chart to fake a 3D XYZ chart: http://andypope.info - Jon ------- Jon Peltier, Microsoft Excel MVP Peltier Technical Services Tutorials and Custom Solutions http://PeltierTech.com/ _______ Jeromy wrote: > i want to make a 3D chart from my series of 3 dimensional poin...

Creating price list
Right newbie here What is the best way to create a product list and a price list for those products that covers a daily rate, weekly rate, monthly rate and yearly rate? i.e product 1MB IPVPN Circuit with a price list giving daily, weekly, monthly and yearly rates. ...

Creating & Exporting ASCII Fixed Length Records
I'm not sure you can do this in Excel but thought I would bounce off you guys... I want to create a data input form in Excel and then export it as an ASCII Fixed Length Record. Each field has a specified lenght of characters/bytes. First I thought of doing it like this... Name _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ Address _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ Account: _ _ _ _ _ _ _ _ _ _ But, when you highlight this and try to export, all the field will be the same length... I think? I could do it all on a single row maybe with titles over each cell and com...

XmlReader.Create fails with a path not found error
I run through the following code, and most of the time it works fine. Dim oXmlReader As System.Xml.XmlReader = Nothing Dim fiXmlFile as new System.IO.FileInfo ("C:\...\...File.xml") 'load file into XML doc & validate against schema oXmlReader = System.Xml.XmlReader.Create(fiXmlFile.FullName, oXmlReaderSettings) But then every once in awhile it reports the error below (which is confusing). Restarting the program allows it to pick up the file with no problem. Any help is welcome. System.UnauthorizedAccessException: Access to the path 'D:\Program Files\Company Name\...

alternative of xp_smtp_sendmail in sql server 2008
Hi, I have moved my database sql server 2000 to sql server 2008 and on 64 bit. For mail I used xp_smtp_sendmail but this is not working in sql server 2008 .. Please suggest me alternative for this Thanks, Hemant You should use sp_send_dbmail http://msdn.microsoft.com/en-us/library/ms190307.aspx before doing this you should configure a mail profile http://msdn.microsoft.com/en-us/library/ms189879.aspx Hemant wrote: > Hi, > > I have moved my database sql server 2000 to sql server 2008 and on 64 > bit. For mail I used xp_smtp_sendmail but this is...

how do i create a replic in access 2007
Could some one give me some insight on creating a replic in acccess 2007, if a replic can not be made is there another way to run a database sync ? I haven't actually tried to make one with 07. 07's .accdb format does not support replication. I view this as a hint that MS is phasing out looking forward. But 07's .mdb format does support it. It is possible that you can't make it with 07 but can support it if made in a prior version - not sure. There is an MVP David Fenton that is a real replication guru and hopefully he'll see this and add some notes. I l...

Creating mailboxes from trusted domain
I have learned throught Exchange Design newsgroup that it is possible to associate domain accounts in a trusted domain with a mailbox in the Exchange 2003 server in the trusting domain. (external trust) We are trying to figure out if the Trusting domain with Exchange 2003 has to get involved each time a new user is added a trusted domain. We have a datacenter with Exchange 2003 servicing 4 banks each with their own domain/forest. With the Exchange Admin Tools and the correct permissions, is it possible to create the mailboxes in the trusting domain from a computer in the trusted dom...

Creating Symbol
I am using an Excel spreadsheet as a database for generating work orders. I need to insert a custom symbol into a cell. While I can create the symbol, essentially a diamond with and S in the center, I cannot actually insert it into a cell or find any way to save this as a custom symbol. The software that generates the workorder will not recognize anything from the database other than what is part of the cell body. Is there a way to create custom symbols in Excel? Thank you How did you create the symbol? Using the windows Char set or with som other tool -- Message posted from http://www...

Create A Search Field on a Form
I have a form that allows the user to add a new record. Now I want to allow the user the capability to change a record in the database, when necessary. I want to create a search (or filter) on my date field. Do I need to create a new form or can I use the same form for adding? Also how do I create the search???? Summing multiple fields on a form wrote: > I have a form that allows the user to add a new record. Now I want to > allow the user the capability to change a record in the database, > when necessary. I want to create a search (or filter) on my date > field. ...