Click here to Skip to main content
15,892,697 members
Articles / Programming Languages / Visual Basic

Lock Windows Desktop

Rate me:
Please Sign up or sign in to vote.
4.84/5 (160 votes)
3 May 20059 min read 1.5M   63.8K   445  
Restricting Windows access by hiding desktop windows and disabling special keys.
#ifndef WINLOCKDLL_H
#define WINLOCKDLL_H

typedef struct _THREAD_DATA
{
	HDESK hDesk;
	char  szDesktopName[20];
} THREAD_DATA;

#ifdef  _DLL_
#define DLL_EXP_IMP __declspec(dllexport)
#else
#define DLL_EXP_IMP __declspec(dllimport)
#endif

DLL_EXP_IMP int WINAPI Desktop_Show_Hide(BOOL bShowHide);
DLL_EXP_IMP int WINAPI StartButton_Show_Hide(BOOL bShowHide);
DLL_EXP_IMP int WINAPI Taskbar_Show_Hide(BOOL bShowHide);
DLL_EXP_IMP int WINAPI Clock_Show_Hide(BOOL bShowHide);
DLL_EXP_IMP int WINAPI Keys_Enable_Disable(BOOL bEnableDisable);
DLL_EXP_IMP int WINAPI AltTab1_Enable_Disable(BOOL bEnableDisable);
DLL_EXP_IMP int WINAPI AltTab2_Enable_Disable(HWND hWnd, BOOL bEnableDisable);
DLL_EXP_IMP int WINAPI TaskSwitching_Enable_Disable(BOOL bEnableDisable);
DLL_EXP_IMP int WINAPI TaskManager_Enable_Disable(BOOL bEnableDisable);
DLL_EXP_IMP int WINAPI CtrlAltDel_Enable_Disable(BOOL bEnableDisable);
DLL_EXP_IMP int WINAPI Thread_Desktop(LPTHREAD_START_ROUTINE ThreadFunc, THREAD_DATA *td);
DLL_EXP_IMP int WINAPI Process_Desktop(char *szDesktopName, char *szPath);

#endif

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
Portugal Portugal
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions