www.pudn.com > NoReboot > MAIN.H, change:2001-08-29,size:6281b


typedef BOOL 
(WINAPI * 
pWlxNegotiate)( 
    DWORD                   dwWinlogonVersion, 
    PDWORD                  pdwDllVersion 
    ); 
 
typedef BOOL 
(WINAPI * 
pWlxInitialize)( 
    LPWSTR                  lpWinsta, 
    HANDLE                  hWlx, 
    PVOID                   pvReserved, 
    PVOID                   pWinlogonFunctions, 
    PVOID *                 pWlxContext 
    ); 
 
typedef VOID 
(WINAPI * 
pWlxDisplaySASNotice)( 
    PVOID                   pWlxContext 
    ); 
 
 
typedef int 
(WINAPI * 
pWlxLoggedOutSAS)( 
    PVOID                   pWlxContext, 
    DWORD                   dwSasType, 
    PLUID                   pAuthenticationId, 
    PSID                    pLogonSid, 
    PDWORD                  pdwOptions, 
    PHANDLE                 phToken, 
    PWLX_MPR_NOTIFY_INFO    pNprNotifyInfo, 
    PVOID *                 pProfile 
    ); 
 
typedef BOOL 
(WINAPI * 
pWlxActivateUserShell)( 
    PVOID                   pWlxContext, 
    PWSTR                   pszDesktopName, 
    PWSTR                   pszMprLogonScript, 
    PVOID                   pEnvironment 
    ); 
 
typedef int 
(WINAPI * 
pWlxLoggedOnSAS)( 
    PVOID                   pWlxContext, 
    DWORD                   dwSasType, 
    PVOID                   pReserved 
    ); 
 
typedef VOID 
(WINAPI * 
pWlxDisplayLockedNotice)( 
    PVOID                   pWlxContext 
    ); 
 
typedef int 
(WINAPI * 
pWlxWkstaLockedSAS)( 
    PVOID                   pWlxContext, 
    DWORD                   dwSasType 
    ); 
 
typedef BOOL 
(WINAPI * 
pWlxIsLockOk)( 
    PVOID                   pWlxContext 
    ); 
 
typedef BOOL 
(WINAPI * 
pWlxIsLogoffOk)( 
    PVOID                   pWlxContext 
    ); 
 
typedef VOID 
(WINAPI * 
pWlxLogoff)( 
    PVOID                   pWlxContext 
    ); 
 
 
typedef VOID 
(WINAPI * 
pWlxShutdown)( 
    PVOID                   pWlxContext, 
    DWORD                   ShutdownType 
    ); 
 
 
// 
// NEW for version 1.1 
// 
typedef BOOL 
(WINAPI * 
pWlxScreenSaverNotify)( 
    PVOID                   pWlxContext, 
    BOOL *                  pSecure); 
 
typedef BOOL 
(WINAPI * 
pWlxStartApplication)( 
    PVOID                   pWlxContext, 
    PWSTR                   pszDesktopName, 
    PVOID                   pEnvironment, 
    PWSTR                   pszCmdLine 
    ); 
 
// 
// New for 1.3 
// 
 
typedef BOOL 
(WINAPI * 
pWlxNetworkProviderLoad)( 
    PVOID                   pWlxContext, 
    PWLX_MPR_NOTIFY_INFO    pNprNotifyInfo 
    ); 
 
 
typedef BOOL 
(WINAPI * 
pWlxDisplayStatusMessage)( 
    PVOID                   pWlxContext, 
    HDESK                   hDesktop, 
    DWORD                   dwOptions, 
    PWSTR                   pTitle, 
    PWSTR                   pMessage 
    ); 
 
typedef BOOL 
(WINAPI * 
pWlxGetStatusMessage)( 
    PVOID                   pWlxContext, 
    DWORD *                 pdwOptions, 
    PWSTR                   pMessage, 
    DWORD                   dwBufferSize 
    ); 
 
typedef BOOL 
(WINAPI * 
pWlxRemoveStatusMessage)( 
    PVOID                   pWlxContext 
    ); 
 
pWlxNegotiate				prcWlxNegotiate = NULL; 
pWlxInitialize				prcWlxInitialize = NULL; 
pWlxDisplaySASNotice		prcWlxDisplaySASNotice = NULL; 
pWlxLoggedOutSAS			prcWlxLoggedOutSAS = NULL; 
pWlxActivateUserShell		prcWlxActivateUserShell = NULL; 
pWlxLoggedOnSAS				prcWlxLoggedOnSAS = NULL; 
pWlxDisplayLockedNotice		prcWlxDisplayLockedNotice = NULL; 
pWlxWkstaLockedSAS			prcWlxWkstaLockedSAS = NULL; 
pWlxIsLockOk				prcWlxIsLockOk = NULL; 
pWlxIsLogoffOk				prcWlxIsLogoffOk = NULL; 
pWlxLogoff					prcWlxLogoff = NULL; 
pWlxShutdown				prcWlxShutdown = NULL; 
pWlxScreenSaverNotify		prcWlxScreenSaverNotify = NULL; 
pWlxStartApplication		prcWlxStartApplication = NULL; 
pWlxNetworkProviderLoad		prcWlxNetworkProviderLoad = NULL; 
pWlxDisplayStatusMessage	prcWlxDisplayStatusMessage = NULL; 
pWlxGetStatusMessage		prcWlxGetStatusMessage = NULL; 
pWlxRemoveStatusMessage		prcWlxRemoveStatusMessage = NULL; 
 
HINSTANCE hGina = NULL; 
 
BOOL LoadMsGina(){ 
	hGina = LoadLibrary(L"msgina.dll"); 
	if (hGina){ 
		prcWlxNegotiate = (pWlxNegotiate)GetProcAddress(hGina, "WlxNegotiate"); 
		prcWlxInitialize = (pWlxInitialize)GetProcAddress(hGina, "WlxInitialize"); 
		prcWlxDisplaySASNotice = (pWlxDisplaySASNotice )GetProcAddress(hGina, "WlxDisplaySASNotice"); 
		prcWlxLoggedOutSAS = (pWlxLoggedOutSAS)GetProcAddress(hGina, "WlxLoggedOutSAS"); 
		prcWlxActivateUserShell = (pWlxActivateUserShell)GetProcAddress(hGina, "WlxActivateUserShell"); 
		prcWlxLoggedOnSAS = (pWlxLoggedOnSAS)GetProcAddress(hGina, "WlxLoggedOnSAS"); 
		prcWlxDisplayLockedNotice = (pWlxDisplayLockedNotice)GetProcAddress(hGina, "WlxDisplayLockedNotice"); 
		prcWlxWkstaLockedSAS = (pWlxWkstaLockedSAS)GetProcAddress(hGina, "WlxWkstaLockedSAS"); 
		prcWlxIsLockOk = (pWlxIsLockOk)GetProcAddress(hGina, "WlxIsLockOk"); 
		prcWlxIsLogoffOk = (pWlxIsLogoffOk)GetProcAddress(hGina, "WlxIsLogoffOk"); 
		prcWlxLogoff = (pWlxLogoff)GetProcAddress(hGina, "WlxLogoff"); 
		prcWlxShutdown = (pWlxShutdown)GetProcAddress(hGina, "WlxShutdown"); 
		prcWlxScreenSaverNotify = (pWlxScreenSaverNotify)GetProcAddress(hGina, "WlxScreenSaverNotify"); 
		prcWlxStartApplication = (pWlxStartApplication)GetProcAddress(hGina, "WlxStartApplication"); 
		prcWlxNetworkProviderLoad = (pWlxNetworkProviderLoad)GetProcAddress(hGina, "WlxNetworkProviderLoad"); 
		prcWlxDisplayStatusMessage = (pWlxDisplayStatusMessage)GetProcAddress(hGina, "WlxDisplayStatusMessage"); 
		prcWlxGetStatusMessage = (pWlxGetStatusMessage)GetProcAddress(hGina, "WlxGetStatusMessage"); 
		prcWlxRemoveStatusMessage = (pWlxRemoveStatusMessage)GetProcAddress(hGina, "WlxRemoveStatusMessage"); 
		return prcWlxNegotiate && prcWlxInitialize && prcWlxDisplaySASNotice && prcWlxLoggedOutSAS 
			&& prcWlxActivateUserShell && prcWlxLoggedOnSAS && prcWlxDisplayLockedNotice 
			&& prcWlxWkstaLockedSAS && prcWlxIsLockOk && prcWlxIsLogoffOk && prcWlxLogoff 
			&& prcWlxShutdown && prcWlxScreenSaverNotify && prcWlxStartApplication 
			&& prcWlxNetworkProviderLoad && prcWlxDisplayStatusMessage && prcWlxGetStatusMessage 
			&& prcWlxRemoveStatusMessage; 
	} 
	else  
		return FALSE; 
} 
 
void ReleaseMsGina() 
{ 
	if (hGina){ 
		FreeLibrary(hGina); 
	} 
}