missing header files



Hello all,
EVC 4.0, i created a WinCE dynamic link library. called it web, then
clicked
on the option "a DLL that exports some symbols"

its a web dll using ISAPI. it works fine and everything (just displays
some html text)

then i added a CString variable , when i compile it gives me an error
"error C2065: 'CString' : undeclared identifier"
so i Added
#include "afx.h" to stdafx.h
now i have another error

"
uafxwced.lib(dllmodul.obj) : error LNK2005: _DllMain already defined in
web.obj
uafxwced.lib(dllmodul.obj) : warning LNK4006: _DllMain already defined
in web.obj; second definition ignored
"
i changed the way i defined DllMain from
"BOOL APIENTRY DllMain( HANDLE hModule,DWORD ul_reason_for_call,
LPVOID lpReserved )"

to
"extern "C" BOOL WINAPI DllMain(HANDLE hInstance, DWORD dwReason,
LPVOID lpReserved)"

i still got the same LNK2005 error.

on the project settings, under the general tab,it was set to
"not using MFC"
i changed it to "use MFC in a static library", and then "use MFC in
shared DLL"
none of them worked

what header/files i am missing?
thanks for the help


my c++ project options under settings,c++ tab
(/nologo /W3 /Zi /Od /D "DEBUG" /D _WIN32_WCE=$(CEVersion) /D
"$(CePlatform)" /D "SHx" /D "SH3" /D "_SH3_" /D UNDER_CE=$(CEVersion)
/D "UNICODE" /D "_UNICODE" /D "_USRDLL" /D "WEB_EXPORTS"
/Fp"SH3Dbg/web.pch" /Yu"stdafx.h" /Fo"SH3Dbg/" /Fd"SH3Dbg/"
/M$(CECrtMTDebug) /c )

<web.def>file
; web.def : Declares the module parameters for the DLL.

LIBRARY "web"
;DESCRIPTION 'web ISAPI Extension'

EXPORTS
; Explicit exports can go here

HttpExtensionProc @1
GetExtensionVersion @2
</web.def>

<stdafx.h>
// stdafx.h : include file for standard system include files,
// or project specific include files that are used frequently, but
// are changed infrequently
//

#if
!defined(AFX_STDAFX_H__D18EF12E_D65F_4264_9235_03A89484EBFE__INCLUDED_)
#define AFX_STDAFX_H__D18EF12E_D65F_4264_9235_03A89484EBFE__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000


// Insert your headers here
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows
headers

#include <windows.h>

// TODO: reference additional headers your program requires here
//i added this to use CString
#include "afx.h"

//{{AFX_INSERT_LOCATION}}
// Microsoft eMbedded Visual C++ will insert additional declarations
immediately before the previous line.

#endif //
!defined(AFX_STDAFX_H__D18EF12E_D65F_4264_9235_03A89484EBFE__INCLUDED_)

</stdafx.h>

.



Relevant Pages

  • Help about AFX_MANAGE_STATE macro
    ... I have an MFC based dll that only exports some classes. ... should i place this macro in the class, ...
    (microsoft.public.vc.mfc)
  • How to insure that MFC debug dll is unloaded last?
    ... My application uses MFC (as a shared dll) and another dll, which exports some data. ...
    (microsoft.public.vc.mfc)
  • How to insure order dll (MFC and custom dll with data export)unloa
    ... My application uses MFC (as a shared dll) and another dll, which exports some data. ...
    (microsoft.public.win32.programmer.kernel)
  • Re: Simple Input In a MFC application
    ... other MFC programmers have followed parallel lines to augment the MFC in a ... either distributing an extra dll or having to include resources in calling ... which is why I'd use a DLL ... Place an edit control on the dialog ...
    (microsoft.public.vc.mfc)
  • Re: Soft Input Panel SIP
    ... is without MFC support. ... I tried to setup a new projekt Win32 Smart Device Projekt -- DLL add ... // DllGetClassObject - Exported function called to get pointer to ... STDAPI DllGetClassObject (REFCLSID rclsid, REFIID riid, LPVOID *ppv) { ...
    (microsoft.public.windowsce.app.development)