LoadRunner??DLL?????
???????????? ???????[ 2015/4/16 13:46:27 ] ??????????????? LoadRunner DLL ????
????????????
????????????????QQ????????????????????????Щ??????????????????????????????????LoadRunner????????????????/?????????????????????????????????????????
???????β?????????????????????????????????????????????DEC?????????LoadRunner?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????ó???????????????????????????????????????????????????????????????????????????????????????????????
??????????????API?????LoadRunner???????????????????????????м????????????????????е????????μ??????????????ü????????????????????????????е????????????????????????????DLL????Ч???????????????????????????DLL???????????????????DLL???д??????LoadRunner?е??ó??????Ч??????????????????????????????????????????
??????????????д
??????Visual C++6.0?????????£???FileNewProject??????????Win32 Dynamic-Link Library??????????DLL?????
????1??Win32 Dynamic-Link Library???????Non-MFC DLL????????
????????DLL???????????????????????C??д????ó?????????????????WINMAIN???????????Non-MFC DLL??DllMain????????????????????????д?????DLL??????????????????????????????????????????????????????????ó????DLL????????????????????????????????????????????????????????????????????DLL?????.CPP????ж?DllMain()?????????????????д??
????
????BOOL APIENTRY DllMain(HANDLE hModule??DWORD ul_reason_for_call??LPVOID lpReserved)
????{
????switch(ul_reason_for_call)
????{
????case DLL_PROCESS_ATTACH:
????break;
????case DLL_THREAD_ATTACH:
????break;
????case DLL_THREAD_DETACH:
????break;
????case DLL_PROCESS_DETACH:
????break;
????default:
????break;
????}
????return TRUE;
????}
?????????У?hMoudle??????????????????????????????????(?????????????_DGROUP?ε????????)??ul_reason_for_call?????????????????????????????????????ж?????????????????????????????????????????????????????????е????????DLL_PROCESS_ATTACH:????????á?DLL_THREAD_ATTACH:???????á?DLL_PROCESS_DETACH:?????????DLL_THREAD_DETACH:????????lpReserved??????????????????DLL???????????д?????2????????????????????DLL?????м??????????????????????????
??????????????DLL???????????????????????ó??????DLL?е??????????????????Щ?????????????ó?????á????????Щ??????????????????????庯??????????????_declspec(dllexport)???????????????????DLL?????????鶨?????.Def???????????????????????????????????????DEF????????????????????????????????????????????DLL?????
???????????????????_declspec(dllexport)????MyDll.dll???????????????????????????????????????????????С??????MyDll.h??MyDLL.cpp????з???????????????????
????//MyDLL.h
????extern"C"_declspec(dllexport)int desinit(int mode);
????extern"C"_declspec(dllexport)void desdone(void);
????extern"C"_declspec(dllexport)void des_setkey(char*subkey??char*key);
????extern"C"_declspec(dllexport)void endes(char*block??char*subkey);
????extern"C"_declspec(dllexport)void dedes(char*block??char*subkey);
????//MyDll.cpp
????#include"MyDll.h"
????//?????????????С?????????????????????
????int desinit(int a??int b)
????{
????if(a>=b)return a;
????else
????return b;
????}
????int desdone(int a??int b)
????{
????if(a>=b)return b;
????else
????return a;
????}
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11