DLL export
for creating a DLL in VC++ 2005, what's the following do? is it a must
have?
#ifdef _USRDLL
#define EPGLIB_API __declspec( dllexport )
#else /* _USRDLL */
#define EPGLIB_API __declspec( dllimport )
#endif /* _USRDLL */
======================
for each function that' call by DLL user, I must add
PROJECTName_API + return type + PASCAL + functionName like follows?
why related to PSCAL??
EPGLIB_API BOOL PASCAL CreateEPGLibInstance();
EPGLIB_API HRESULT PASCAL LoadXMLData(LPCTSTR tszXMLFileName);
EPGLIB_API HRESULT PASCAL PostSoapRequest();
======================
// EPGLib.h : main header file for the EPGLib DLL
//
#pragma once
#ifndef __AFXWIN_H__
#error "include 'stdafx.h' before including this file for PCH"
#endif
#include "resource.h" // main symbols
// CEPGLibApp
// See EPGLib.cpp for the implementation of this class
//
class CEPGLibApp : public CWinApp
{
public:
CEPGLibApp();
HRESULT LoadXMLData(LPCTSTR tszXMLFileName);
// Overrides
public:
virtual BOOL InitInstance();
virtual int ExitInstance();
DECLARE_MESSAGE_MAP()
};
#ifdef _USRDLL
#define EPGLIB_API __declspec( dllexport )
#else /* _USRDLL */
#define EPGLIB_API __declspec( dllimport )
#endif /* _USRDLL */
EPGLIB_API BOOL PASCAL CreateEPGLibInstance();
EPGLIB_API HRESULT PASCAL LoadXMLData(LPCTSTR tszXMLFileName);
EPGLIB_API HRESULT PASCAL PostSoapRequest();