Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
csc.c
Package: shell.rar [view]
Upload User: xhy777
Upload Date: 2007-02-14
Package Size: 24088k
Code Size: 1k
Category:
Windows Kernel
Development Platform:
Visual C++
- #include "stdafx.h"
- #include "systray.h"
- #include <cscuiext.h>
- ///////////////////////////////////////////////////////////////////////////////
- // CSC_CheckEnable
- typedef BOOL (WINAPI* PFNCSCMSGPROCESS)(LPMSG);
- static HWND g_hWndCSC = NULL;
- static HMODULE g_hCSCUIDll = NULL;
- static PFNCSCMSGPROCESS g_pfnMsgProcess = NULL;
- BOOL CSC_CheckEnable(HWND hWnd, BOOL bSvcEnabled)
- {
- if ((g_hWndCSC && IsWindow(g_hWndCSC) && !bSvcEnabled) ||
- (((!g_hWndCSC) || !IsWindow(g_hWndCSC)) && bSvcEnabled))
- {
- if (!g_hCSCUIDll)
- g_hCSCUIDll = LoadLibrary(TEXT("cscui.dll"));
- if (g_hCSCUIDll)
- {
- PFNCSCUIINITIALIZE pfn = (PFNCSCUIINITIALIZE)GetProcAddress(g_hCSCUIDll, "CSCUIInitialize");
- g_pfnMsgProcess = (PFNCSCMSGPROCESS)GetProcAddress(g_hCSCUIDll, "CSCUIMsgProcess");
- if (pfn)
- {
- DWORD dwFlags = CI_INITIALIZE | CI_CREATEWINDOW;
- if (!bSvcEnabled)
- dwFlags = CI_TERMINATE | CI_DESTROYWINDOW;
- g_hWndCSC = (*pfn)(NULL, dwFlags);
- }
- }
- if (g_hCSCUIDll && !bSvcEnabled)
- {
- FreeLibrary(g_hCSCUIDll);
- g_hCSCUIDll = NULL;
- g_pfnMsgProcess = NULL;
- }
- }
- return(TRUE);
- }
- BOOL CSC_MsgProcess(LPMSG pMsg)
- {
- if (g_pfnMsgProcess)
- return (*g_pfnMsgProcess)(pMsg);
- return FALSE;
- }