£¨16£©¡¢±à³Ì½Ó¿ÚÈ«¹¥ÂÔ
ΪʲôʹÓñà³Ì½Ó¿Ú
ÓÉÓÚ·ÖÎö¼ÒµÄ×Ա๫ʽȱ·¦ÑÐò¡¢Ñ¡Ôñ¼°Ñ»·Èý´ó»ù±¾½á¹¹ÖеÄÑ»·½á¹¹£¬Òò¶ø²»ÄܱàÖÆijЩ¹«Ê½£¬×÷Ϊ²¹¾È´ëÊ©£¬»ãÌìÆ湫˾ÍƳö±à³Ì½Ó¿Ú¡£±à³Ì½Ó¿ÚµÄÓŵãÊÇÄÜʵÏÖÈÎÒâËã·¨£¬ÔËËãЧÂʸߣ¬±£ÃÜÐÔÇ¿£»È±µãÊÇÐèÒª¶îÍâµÄ֪ʶ£¬µ÷ÊÔÀ§ÄÑ£¬ÉÆδÍêÉÆ¡£ËùÒÔ£¬±ÊÕß½¨Ò龡Á¿±ÜÃâʹÓÃËü¡£¡¾½»Ò×֪ʶmacd.org.cnÊÕ¼¯ÕûÀí¡¿
ʹÓñà³Ì½Ó¿ÚÐèҪʲô»ù´¡ÖªÊ¶¼°Èí¼þ
ÔʼµÄ±à³Ì½Ó¿ÚÊÇÒÔ C ÓïÑÔÌṩ£¬ÒÔ Win32 ¶¯Ì¬Á¬½Ó¿âµÄÐÎʽʵÏֵģ¬ËùÒÔÈκÎÒ»¸ö¿ÉÒÔÉú³É Win32
¶¯Ì¬Á¬½Ó¿âµÄ¿ª·¢¹¤¾ß£¬¶¼¿ÉÒÔÓÃÓÚ±àдÀ©Õ¹º¯Êý£¬Èç Delphi¡¢BCB¡¢VC¡¢VB µÈ¡£
ÓÉÓÚ·ÖÎö¼ÒÈí¼þÊÇÓà VC ±àдµÄ£¬¹Ê»ãÌìÆ湫˾ÍƼöʹÓà VC ×÷Ϊ¿ª·¢¹¤¾ß¡£ÓмøÓÚ´Ë£¬±ÊÕß±àдÁË VC 6.0 ϵÄ
Custom AppWizard £¬¿É×Ô¶¯Éú³É³ÌÐò¿ò¼Ü£¬²¢×÷һЩ±ØÒªµÄÉèÖ㬿ɽÚÊ¡²»ÉÙʱ¼ä¡£Èç¹ûʹÓà VC £¬Ö»Ðèѧϰ C
ÓïÑÔ£¬²»±Ø¶®µÃ C++ ֪ʶ£¬¸ü²»±ØÕÆÎÕ MFC £¬ÒªÇó¿É˵ÊÇÏ൱µÍÁË¡£
±¾ÎÄÒÔ VC ΪÀý£¬½²ÊöÀ©Õ¹º¯ÊýµÄ±àÖÆ¡£
À©Õ¹º¯ÊýµÄÃüÃû¼°ÒýÓÃ
À©Õ¹º¯ÊýµÄÃüÃûÓÐÒÔϹ涨£º
1.º¯ÊýÃû³ÆÐë·ûºÏ C ÓïÑԵĹ涨£¬²¢ÐèÈ«²¿´óд.
2.º¯Êý±ØÐëÒÔÏÂÊöA,BÁ½·NÐÎʽ֮һÉùÃ÷,ÇëÓÃʵ¼Êº¯ÊýÃû³ÆÌæ´úxxxxxxxx¡£
__declspec(dllexport) int xxxxxxxx(CALCINFO* pData);
---------- A
__declspec(dllexport) int xxxxxxxxVAR(CALCINDO* pData);
---------- B
3.ÉÏÊöÐÎʽAÓÃÓÚÉùÃ÷²»´ø²ÎÊý»òÈ«²¿²ÎÊýΪ³£ÊýµÄº¯Êý;
ÐÎʽBÓÃÓÚÉùÃ÷²ÎÊý1ΪÐòÁÐÊýµÄº¯Êý;Á½·Nº¯ÊýµÄÇø±ðÔÚÓÚºóÕßÒÔVAR½áβ.
4.º¯ÊýÃû³Æ³¤¶È²»Äܳ¬¹ý 15 ×Ö½Ú£¬¶¯Ì¬Á¬½Ó¿âÎļþÃû²»Äܳ¬¹ý 9 ×Ö½Ú(²»°üÀ¨À©Õ¹Ãû)£¬¶¯Ì¬¿âÃû³Æ²»ÄܽÐ
SYSTEM,EXPLORER £»
À©Õ¹º¯ÊýµÄÒýÓ÷ÖÁ½¸ö²½Ö裺
1¡¢½«Éú³ÉµÄ¶¯Ì¬Á¬½Ó¿â¿½±´µ½·ÖÎö¼ÒĿ¼Ï£»
2¡¢±àдһ¸ö¹«Ê½£¬ÒýÓö¯Ì¬Á¬½Ó¿âÖеÄÀ©Õ¹º¯Êý£¬¸ñʽÈçÏ£º
"¶¯Ì¬¿âÃû³Æ@º¯ÊýÃû³Æ"(²ÎÊý±í)
ÀýÈ磬Äú±àÁËÒ»¸öÀ©Õ¹º¯Êý½Ð FUNCTION() £¬ÓÐÁ½¸ö³£Êý²ÎÊý£¬Éú³ÉµÄ¶¯Ì¬Á¬½Ó¿â½Ð formula.dll £¬ÒýÓÃΪ
"formula@Fuction"(16,8) £¬×¢ÒâÒ»¶Ô°ë½ÇË«ÒýºÅµÄλÖ㬿âÃû¼°º¯ÊýÃû²»Çø·Ö´óСд¡£
Êý¾Ý½á¹¹
±à³Ì½Ó¿ÚµÄÒ»´óÈÎÎñÊÇÊý¾ÝµÄ´«µÝ£¬°üÀ¨½«ÔʼÊý¾Ý´«µÝ¸øÀ©Õ¹º¯Êý¼°½«ÔËËã½á¹û´«µÝ»Ø·ÖÎö¼Ò¡£ÕâÊÇͨ¹ýº¯ÊýµÄ²ÎÊý CALCINFO*
pData ʵÏֵģ¬½á¹¹ CALCINFO µÄ¶¨ÒåÔÚÍ·ÎļþFxjFunc.h»òAnalyst.hÖУ¬¼ò½éÈçÏ£º
typedef struct tagCALCINFO
{
const DWORD m_dwSize; //±¾½á¹¹µÄ´óС£¬¿ÉÓÃÓÚ·ÖÅäÄÚ´æ
const DWORD m_dwVersion; //µ÷ÓÃÈí¼þ°æ±¾(V2.10 : 0x210)
const DWORD m_dwSerial; //µ÷ÓÃÈí¼þÐòÁкÅ
const char* m_strStkLabel; //¹ÉƱ´úÂë
const BOOL m_bIndex; //´óÅÌ
//Êý¾ÝÊýÁ¿(pData,pDataEx,pResultBuf Ö¸ÏòµÄÊý×é´óС)
const int m_nNumData;
//³£¹æÊý¾ÝÊý×éÖ¸Õë,×¢Òâ:µ±m_nNumData==0ʱ¿ÉÄÜΪ NULL
const STKDATA* m_pData;
//À©Õ¹Êý¾ÝÊý×éÖ¸Õë,ÓÃÓÚÃèÊö·Ö±Ê³É½»ÂòÂôÅÌ,×¢Òâ:¿ÉÄÜΪ NULL
const STKDATAEx* m_pDataEx;
const int m_nParam1Start; //²ÎÊý1ÓÐЧλÖã¬Ïê¼û×¢4¡¢5
const float* m_pfParam1; //µ÷ÓòÎÊý1
const float* m_pfParam2; //µ÷ÓòÎÊý2
const float* m_pfParam3; //µ÷ÓòÎÊý3
const float* m_pfParam4; //µ÷ÓòÎÊý3
float* m_pResultBuf; //½á¹û»º³åÇø
const DATA_TYPE m_dataType; //Êý¾ÝÀàÐÍ
const float* m_pfFinData; //²ÆÎñÊý¾Ý
} CALCINFO;
×¢:
1.º¯Êýµ÷ÓòÎÊýÓÉm_pfParam1--m_pfParam4´øÈë,ÈôΪNULLÔò±íʾ¸Ã²ÎÊýÎÞЧ.
2.µ±Ò»¸ö²ÎÊýÎÞЧʱ,ÔòÆäºóµÄËùÓвÎÊý¾ùÎÞЧ.
Èç:m_pfParam2ΪNULL,Ôòm_pfParam3,m_pfParam4Ò»¶¨ÎªNULL.
3.²ÎÊý1¿ÉÒÔÊdz£Êý²ÎÊý»òÐòÁÐÊý²ÎÊý,ÆäÓà²ÎÊýÖ»ÄÜΪ³£Êý²ÎÊý.
4.Èôm_nParam1Start<0, Ôò²ÎÊý1Ϊ³£Êý²ÎÊý,²ÎÊýµÈÓÚ*m_pfParam1;
5.Èôm_nParam1Start>=0,Ôò²ÎÊý1ΪÐòÁÐÊý²ÎÊý,m_pfParam1Ö¸ÏòÒ»¸ö¸¡µãÐÍÊý×é,
Êý×é´óСΪm_nNumData,Êý¾ÝÓÐЧ·¶Î§Îªm_nParam1Start--m_nNumData.
ÔÚʱ¼äÉÏm_pData[x] Óë m_pfParam1[x]ÊÇÒ»ÖµÄ
½á¹¹ CALCINFO ÖÐÓõ½µÄÆäËüÊý¾Ý½á¹¹¶¨Òå¿ÉÔÚͬһͷÎļþÖÐÕÒµ½£¬¶ÁÕßÈçÓÐÒÉÎÊ¿É×ÔÐвéÔÄ¡£
¹²19Ò³: ÉÏÒ»Ò³ [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] 16 [17] [18] [19] ÏÂÒ»Ò³