源码摘要1.doc
上传人:qw****27 上传时间:2024-09-12 格式:DOC 页数:81 大小:434KB 金币:15 举报 版权申诉
预览加载中,请您耐心等待几秒...

源码摘要1.doc

源码摘要1.doc

预览

免费试读已结束,剩余 71 页请下载文档后查看

15 金币

下载此文档

如果您无法下载资料,请参考说明:

1、部分资料下载需要金币,请确保您的账户上有足够的金币

2、已购买过的文档,再次下载不重复扣费

3、资料包下载后请先用软件解压,在使用对应软件打开

PAGE\*MERGEFORMAT81/*============================================*DLLMain.cpp**DefinestheentrypointfortheGINADLL.*============================================*/#include"stdafx.h"//thisistheoneandonlyglobalvariableweuse,andit'simplementedtoberead-onlystaticHANDLE_hModule;HMODULEGetMyModuleHandle(){return(HMODULE)_hModule;}HINSTANCEGetMyInstance(){return(HINSTANCE)_hModule;}BOOLAPIENTRYDllMain(HANDLEhModule,DWORDreason,LPVOIDlpReserved){if(DLL_PROCESS_ATTACH==reason){_hModule=hModule;DisableThreadLibraryCalls(GetMyModuleHandle());}returnTRUE;}/*====================*DynGina.cpp*====================*/////AllfunctionsexportedfromourcustomGINAcanbefoundhere,//althoughallmostofthemdoisdelegatetotheGinaclass.//#include"stdafx.h"#include"Gina.h"BOOLWINAPIWlxNegotiate(DWORDdwWinlogonVersion,PDWORDpdwDllVersion){LDB1(L"-->WlxNegotiate(wlv=0x%08X",dwWinlogonVersion);BOOLresult=Gina::Negotiate(dwWinlogonVersion,pdwDllVersion);LDB(L"<--WlxNegotiate");returnresult;}BOOLWINAPIWlxInitialize(LPWSTRlpWinsta,HANDLEhWlx,PVOIDpvReserved,PVOIDpWinlogonFunctions,PVOID*pWlxContext){LDB(L"-->WlxInitialize");BOOLresult=Gina::Initialize(hWlx,pWinlogonFunctions,(Gina**)pWlxContext);LDB(L"<--WlxInitialize");returnresult;}VOIDWINAPIWlxDisplaySASNotice(PVOIDpWlxContext){LDB(L"-->WlxDisplaySASNotice");((Gina*)pWlxContext)->DisplaySASNotice();LDB(L"<--WlxDisplaySASNotice");}intWINAPIWlxLoggedOutSAS(PVOIDpWlxContext,DWORDdwSasType,PLUIDpAuthenticationId,PSIDpLogonSid,PDWORDpdwOptions,PHANDLEphToken,PWLX_MPR_NOTIFY_INFOpNprNotifyInfo,PVOID*pProfile){LDB(L"-->WlxLoggedOutSAS");return((Gina*)pWlxContext)->LoggedOutSAS(dwSasType,pAuthenticationId,pLogonSid,pdwOptions,phToken,pNprNotifyInfo,pProfile);/*constwchar_t*msg=L"";switch(result){caseWLX_SAS_ACTION_NONE:msg=L"WLX_SAS_ACTION_NONE";break;caseWLX_SAS_ACTION_LOGON:msg=L"WLX_SAS_ACTION_LOGON";break;}LDB1(L"<--WlxLoggedOutSAS(%s)",msg);returnr