Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

What are the steps for developing and testing dll in VC++?

Posted on 2003-02-24
9
Medium Priority
?
317 Views
Last Modified: 2013-11-20
Hi,

I am using VC++ 6.0.

I want to develop a dll in VC++ and will use it in VB.

I know how to develop a dll in VB but I don't know it for VC++.

What are the steps for developing and testing a dll in VC++?
How to debug the dll while it is being used in VB?

Plz hurry.

Any help will be appreciated.

Thanx.
0
Comment
Question by:shaileshganatra
  • 3
  • 2
6 Comments
 
LVL 2

Accepted Solution

by:
kozmo_jonny earned 100 total points
ID: 8007786
use the wizard,

choose MFC DLL WIZARD , and select a regular DLL.

enjoy
0
 

Expert Comment

by:vijay_rangaraj
ID: 8008216
Well... use the MFC DLL WIZARD and select regular DLL as kozmo_jonny has said, but remember to export the functions in the export file. (Just make an entry of the function name in the export file). Also add the
AFX_MANAGE_STATE(AfxGetStaticModuleState());
 as the first line of the function you are exporting.
0
 

Author Comment

by:shaileshganatra
ID: 8019126
Hi,

Thanks for your reply.

Can you give me a code of dll that can teach me some basic functionalities?

Waiting...
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:shaileshganatra
ID: 8019319
Hi,

I was developing a simple project in which the header and implementation files are different.
But when I tried the following code in MFC exe project it gives error.

Plz check it out.

TestClass.h
===========
class CTest
{
private:
     int no;
public:
     CTest()
     {
       n = 0;
     }
     void setno(int n);
     int getno();
};

TestClass.cpp
=============
#include "head.h"
#include "stdafx.h"

void CTest::setno(int n)
{
     no = n;
}

int CTest::getno()
{
     return no;
}

Errors
======
C:test\TestClass.cpp(4) : error C2653: 'CTest' : is not a class or namespace name
C:test\TestClass.cpp(6) : error C2065: 'no' : undeclared identifier
C:test\TestClass.cpp(9) : error C2653: 'CTest' : is not a class or namespace name
Generating Code...
Error executing cl.exe.

test.exe - 3 error(s), 0 warning(s)
========================================

Thanx.
0
 

Author Comment

by:shaileshganatra
ID: 8019424
Sorry, there is a mistake.
I have included "TestClass.h" instead of "head.h" in "TestClass.cpp", but still it gives the same errors.
0
 

Assisted Solution

by:vijay_rangaraj
vijay_rangaraj earned 100 total points
ID: 8022683
Plz make sure you have included the header file in the project & in the workspace. Regarding creating DLLs this link should be very helpful.


http://www.programmersheaven.com/zone15/articles/article279.htm

0

Featured Post

[Webinar] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…
Suggested Courses

564 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question