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
0X10.cpp
Package: riptideAnyWhere.rar [view]
Upload User: hyz2004817
Upload Date: 2022-03-30
Package Size: 226k
Code Size: 2k
Category:
Remote Control
Development Platform:
Visual C++
- #include "stdafx.h"
- extern HANDLE g_hExitEvent;
- //////////////////////////////////////////////////////////////
- //
- // 通过调用 ShellExecute 函数创建一个进程
- //
- BOOL
- WINAPI
- RCAID_0X10_HANDLER(
- SOCKET s,
- RCAREQUESTHANDLEDATA * pData,
- RCAREQUESTHEADER * pRCAHead,
- HANDLE hEventArray[2]
- )
- {
- // 计算需要接收的总字节数
- int c = pRCAHead->requestBytes - sizeof( RCAREQUESTHEADER );
- char * buf;
- int ret;
- if( c <= 20 )
- return FALSE;
- buf = (char*)new char[c];
- if( buf == NULL )
- return TRUE;
- ret = RCARecv_EventSelectIO( s, hEventArray, buf, c );
- if( ret != c )
- {
- delete[] buf;
- return FALSE;
- }
- char * p = buf;
- DWORD strLength;
- p = buf;
- HWND hWnd = (HWND)(*p);
- p += 4;
- if( (p-buf) > c )
- goto request_end;
- char *pOperation, *pFile, *pParam, *pDirectory;
- strLength = (DWORD)*p;
- if( (DWORD)(*p) > 0 )
- pOperation = p + 4;
- else
- pOperation = NULL;
- p += (4 + strLength);
- if( (p-buf) > c )
- goto request_end;
- strLength = (DWORD)*p;
- if( (DWORD)(*p) > 0 )
- pFile = p + 4;
- else
- pFile = NULL;
- p += (4 + strLength);
- if( (p-buf) > c )
- goto request_end;
- strLength = (DWORD)*p;
- if( (DWORD)(*p) > 0 )
- pParam = p + 4;
- else
- pParam = NULL;
- p += (4 + strLength);
- if( (p-buf) > c )
- goto request_end;
- strLength = (DWORD)*p;
- if( (DWORD)(*p) > 0 )
- pDirectory = p + 4;
- else
- pDirectory = NULL;
- p += (4 + strLength);
- if( (p-buf) > c )
- goto request_end;
- int nShowCmd = (int)*p;
- ShellExecute( hWnd, pOperation, pFile, pParam, pDirectory, nShowCmd );
- request_end:
- delete[] buf;
- return TRUE;
- }