Thank you both for responding. I tried the first suggestion (extern "C"

and I was still getting the name mangling. I don't know if what I want can be done. I have a basic-like language (assume it's VB) and I want to call exported functions from an MFC dll (dynamically linked -- 2nd radio button in project setup list). The books, I think, say I can do this if the functions are exported correctly. So far, I haven't found how to do that.
So I thought I would include the code (cut and paste into a word processor -- ie wordpad -- to get a cleaner view). There is a .h and .cpp file. I am trying to call the SHOWIT function from VB with the code at the bottom of the this file. I am getting a BAD DLL CALL error when it runs.
Regards,
Sean
/**===============================================================**
// MFC_EL.h : main header file for the MFC_EL DLL
//
#if !defined(AFX_MFC_EL_H__9DEF8B8A_DCE0_11D4_BCA2_000102257065__INCLUDED_)
#define AFX_MFC_EL_H__9DEF8B8A_DCE0_11D4_BCA2_000102257065__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#ifndef __AFXWIN_H__
#error include 'stdafx.h' before including this file for PCH
#endif
#include "resource.h" // main symbols
/////////////////////////////////////////////////////////////////////////////
// CMFC_ELApp
// See MFC_EL.cpp for the implementation of this class
//
class CMFC_ELApp : public CWinApp
{
public:
CMFC_ELApp();
int __stdcall CMFC_ELApp::SHOWIT(int t);
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CMFC_ELApp)
//}}AFX_VIRTUAL
//{{AFX_MSG(CMFC_ELApp)
// NOTE - the ClassWizard will add and remove member functions here.
// DO NOT EDIT what you see in these blocks of generated code !
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_MFC_EL_H__9DEF8B8A_DCE0_11D4_BCA2_000102257065__INCLUDED_)
//**===============================================================**
// MFC_EL.cpp : Defines the initialization routines for the DLL.
//
#include "stdafx.h"
#include "MFC_EL.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
//
// Note!
//
// If this DLL is dynamically linked against the MFC
// DLLs, any functions exported from this DLL which
// call into MFC must have the AFX_MANAGE_STATE macro
// added at the very beginning of the function.
//
// For example:
//
// extern "C" BOOL PASCAL EXPORT ExportedFunction()
// {
// AFX_MANAGE_STATE(AfxGetStaticModuleState());
// // normal function body here
// }
//
// It is very important that this macro appear in each
// function, prior to any calls into MFC. This means that
// it must appear as the first statement within the
// function, even before any object variable declarations
// as their constructors may generate calls into the MFC
// DLL.
//
// Please see MFC Technical Notes 33 and 58 for additional
// details.
//
/////////////////////////////////////////////////////////////////////////////
// CMFC_ELApp
BEGIN_MESSAGE_MAP(CMFC_ELApp, CWinApp)
//{{AFX_MSG_MAP(CMFC_ELApp)
// NOTE - the ClassWizard will add and remove mapping macros here.
// DO NOT EDIT what you see in these blocks of generated code!
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CMFC_ELApp construction
CMFC_ELApp::CMFC_ELApp()
{
// TODO: add construction code here,
// Place all significant initialization in InitInstance
}
/////////////////////////////////////////////////////////////////////////////
// The one and only CMFC_ELApp object
int __stdcall CMFC_ELApp::SHOWIT(int t)
{
AFX_MANAGE_STATE(AfxGetStaticModuleState());
t = t + 40;
return t;
}
VB CODE:
Declare Function SHOWIT Lib "c:\mfc_el.dll" (iItemNo As Integer) As Integer
'Rem
Sub Main()
Dim y As Integer
Dim T As Integer
y = 10
T = SHOWIT
Debug.Print (T)
End Sub