vc++导出C#可用的DLL

加声明

extern "C" __declspec(dllexport)

在.h文件中

 

#ifdef CDECODER_EXPORTS
#define CDECODER_API __declspec(dllexport)
#else
#define CDECODER_API __declspec(dllimport)
#endif

// This class is exported from the CDecoder.dll
extern "C" CDECODER_API char* czDecode(int width,int height,int step,int channel,unsigned char* pCapturedImage);

posted @ 2009-03-24 11:02  拒绝潜水的鱼  阅读(275)  评论(0编辑  收藏  举报