?
Solved

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

Posted on 2003-02-24
9
Medium Priority
?
310 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
9 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
Get MySQL database support online, now!

At Percona’s web store you can order your MySQL database support needs in minutes. No hassles, no fuss, just pick and click. Pay online with a credit 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

Learn how to optimize MySQL for your business need

With the increasing importance of apps & networks in both business & personal interconnections, perfor. has become one of the key metrics of successful communication. This ebook is a hands-on business-case-driven guide to understanding MySQL query parameter tuning & database perf

Question has a verified solution.

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

Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
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.
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
Suggested Courses

770 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