Win32Dll.cpp
上传用户:salebz
上传日期:2013-04-17
资源大小:207k
文件大小:2k
- // Win32Dll.cpp : Defines the entry point for the DLL application.
- //
- #include "stdafx.h"
- #include "Win32Dll.h"
- BOOL APIENTRY DllMain( HANDLE hModule,
- DWORD ul_reason_for_call,
- LPVOID lpReserved
- )
- {
- switch (ul_reason_for_call)
- {
- case DLL_PROCESS_ATTACH:
- case DLL_THREAD_ATTACH:
- case DLL_THREAD_DETACH:
- case DLL_PROCESS_DETACH:
- break;
- }
- return TRUE;
- }
- WIN32DLL_API unsigned long GS_QADog(PQA_DLL_PARA pmdp)
- {
- MHSTATUS resu;
- DogAddr1 = pmdp->DogAddr1;
- DogAddr2 = pmdp->DogAddr2;
- DogBytes = pmdp->DogBytes;
- DogPassword = pmdp->DogPassword;
- DogData = (void*)&pmdp->DogData[0];
- OperationNo = pmdp->OperationNo;
- DogCascade = pmdp->DogCascade;
-
- switch(pmdp->Command)
- {
- case DOGCHECK:
- resu = DogCheck();
- break;
- case READDOG:
- resu = ReadDog();
- break;
- case WRITEDOG:
- resu = WriteDog();
- break;
- case BOGUSREAD:
- resu = BogusRead();
- break;
- case BOGUSWRITE:
- resu = BogusWrite();
- break;
- case WRITEEXPRESSIONS:
- resu = WriteExpressions();
- break;
- case COMPARE:
- resu = Compare();
- break;
- case OPERATION:
- resu = Operation();
- break;
- case GETCURRENTNO:
- resu = GetCurrentNo();
- break;
- case WRITEONLY:
- resu = WriteOnly();
- break;
- case DISABLESHARE:
- resu = DisableShare();
- break;
- case ENABLESHARE:
- resu = EnableShare();
- break;
- default:
- resu = 18000;
- break;
- }
-
- pmdp->DogResult = DogResult;
- return resu;
- }