ورود

View Full Version : سوال: کاربرد __declspec



etedali
چهارشنبه 23 آذر 1390, 18:46 عصر
سلام.
من سورس یک فایل dll را دارم که به زبان سی ++ هست میخوام از این فایل dll در سی شارپ استفاده کنم اما هر کدام از توابه این فایل با اینکه توابع را خود کمپانی نویسنده dll معرفی کرده، پیغام میده که نمیتونه پیدا کنه سورس فایل سی ++ را که نگاه کردم ابتدای کار به این کدها برخورد کردم آیا به خاطر این قسمت هست؟

// The following ifdef block is the standard way of creating macros which make exporting
// from a DLL simpler. All files within this DLL are compiled with the PTACAMSDK_EXPORTS
// symbol defined on the command line. this symbol should not be defined on any project
// that uses this DLL. This way any other project whose source files include this file see
// PTACAMSDK_API functions as being imported from a DLL, wheras this DLL sees symbols
// defined with this macro as being exported.
#ifdef PTACAMSDK_EXPORTS
#define PTACAMSDK_API __declspec(dllexport)
#else
#define PTACAMSDK_API __declspec(dllimport)
#endif