龙盟编程博客 | 无障碍搜索 | 云盘搜索神器
快速搜索
主页 > 软件开发 > VC开发 >

VC实现Win2000下屏蔽Ctrl+Alt+Del键(3)

时间:2009-12-30 15:42来源:未知 作者:admin 点击:
分享到:
extern CMyGinaApp theApp; #endif ////////////////// #include "stdafx.h" #include "MyGina.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif ////////////
  extern CMyGinaApp theApp;
  #endif
  //////////////////
  #include "stdafx.h"
  #include "MyGina.h"
  #ifdef _DEBUG
  #define new DEBUG_NEW
  #undef THIS_FILE
  static char THIS_FILE[] = __FILE__;
  #endif
  /////////////////////////////////////////////////////////////////////////////// CMyGinaApp
  BEGIN_MESSAGE_MAP(CMyGinaApp, CWinApp)
  //{{AFX_MSG_MAP(CMyGinaApp)
  // NOTE - the ClassWizard will add and remove mapping macros here.
  // DO NOT EDIT what you see in these blocks of generated code!
  //}}AFX_MSG_MAP
  END_MESSAGE_MAP()
  ////////////////////////////////////////////// CMyGinaApp construction
  CMyGinaApp::CMyGinaApp()
  {
  // 初始化各变量
  hMsDll = NULL;
  MyWlxNegotiate = NULL;
  MyWlxInitialize = NULL;
  MyWlxActivateUserShell = NULL;
  MyWlxDisplayLockedNotice = NULL;
  MyWlxDisplaySASNotice = NULL;
  MyWlxDisplayStatusMessage = NULL;
  MyWlxGetStatusMessage = NULL;
  MyWlxIsLockOk = NULL;
  MyWlxIsLogoffOk = NULL;
  MyWlxLoggedOnSAS = NULL;
  MyWlxLoggedOutSAS = NULL;
  MyWlxLogoff = NULL;
  MyWlxNetworkProviderLoad = NULL;
  MyWlxRemoveStatusMessage = NULL;
  MyWlxScreenSaverNotify = NULL;
  MyWlxShutdown = NULL;
  MyWlxStartApplication = NULL;
  MyWlxWkstaLockedSAS = NULL;
  }
  CMyGinaApp theApp;
  BOOL CMyGinaApp::InitInstance()
  {
  // 得到默认的gina dll
  if (hMsDll == NULL)
  {
  hMsDll = ::LoadLibrary("msgina.dll");
  }
  // 导入各个接口函数
  if (hMsDll != NULL)
  {
  MyWlxNegotiate= (NEGOTIATE) GetProcAddress(hMsDll,"WlxNegotiate");
  MyWlxInitialize= (INITIALIZE) GetProcAddress(hMsDll,"WlxInitialize");
  MyWlxActivateUserShell= (ACTIVATE_USHELL)GetProcAddress(hMsDll,"WlxActivateUserShell");
  MyWlxDisplayLockedNotice= (PARAM_PVOID)GetProcAddress(hMsDll,"WlxDisplayLockedNotice");
  MyWlxDisplaySASNotice= (PARAM_PVOID)GetProcAddress(hMsDll,"WlxDisplaySASNotice");
  MyWlxDisplayStatusMessage= (DISP_STATUS)GetProcAddress(hMsDll,"WlxDisplayStatusMessage");
  MyWlxGetStatusMessage= (GET_STATUS)GetProcAddress(hMsDll,"WlxGetStatusMessage");
  MyWlxIsLockOk= (PARAM_PVOID)GetProcAddress(hMsDll,"WlxIsLockOk");
  MyWlxIsLogoffOk= (PARAM_PVOID)GetProcAddress(hMsDll,"WlxIsLogoffOk");
  MyWlxLoggedOnSAS= (LOGON_SAS)GetProcAddress(hMsDll,"WlxLoggedOnSAS");
  MyWlxLoggedOutSAS= (LOGOUT_SAS)GetProcAddress(hMsDll,"WlxLoggedOutSAS");
  MyWlxLogoff= (PARAM_PVOID) GetProcAddress(hMsDll,"WlxLogoff");
  MyWlxNetworkProviderLoad= (NETWORK_LOAD)GetProcAddress(hMsDll,"WlxNetworkProviderLoad");
  MyWlxRemoveStatusMessage= (PARAM_PVOID)GetProcAddress(hMsDll,"WlxRemoveStatusMessage");
  MyWlxScreenSaverNotify= (SCR_SAVER)GetProcAddress(hMsDll,"WlxScreenSaverNotify");
  MyWlxShutdown= (SHUT_DOWN)GetProcAddress(hMsDll,"WlxShutdown");
  MyWlxStartApplication= (START_APP)GetProcAddress(hMsDll,"WlxStartApplication");
  MyWlxWkstaLockedSAS= (LOCKED_SAS)GetProcAddress(hMsDll,"WlxWkstaLockedSAS");
精彩图集

赞助商链接