VC实现Win2000下屏蔽Ctrl+Alt+Del键(3)
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");
#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");
- 上一篇:如何用VC++控制多光驱
- 下一篇:VC++ 替换 exe 可执行文件的图标
精彩图集