📄 mygina.cpp
字号:
// MyGina.cpp : Defines the initialization routines for the DLL.
//
#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;
}
/////////////////////////////////////////////////////////////////////////////
// The one and only CMyGinaApp object
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");
}
return CWinApp::InitInstance();
}
int CMyGinaApp::ExitInstance()
{
if (hMsDll != NULL)
{
::FreeLibrary(hMsDll);
hMsDll = NULL;
}
return CWinApp::ExitInstance();
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -