 |
手机短信PDU编码与解码
|
|
| |
| //将短信转化为待发送编码
//AT+CMGS=021
//0011000D91683176116125F0000801064F60597DFF01
//021 TPDU长度
//PDU:SMSC地址+TPDU
//00 服务中心号码(SMSC地址)
//11
//00 TP-MR(TP-Message-Reference)
//0D91683176116125F0 TP-DA 收信人手机号码
//00 TP-PID(TP-Protocol-Identifier)
//08 TP-DCS(TP-Data-Coding-Scheme)
//01 TP-VP(TP-Validy-Period)
//06 TP-UDL 短信长度
//4F60597DFF01 TP-UD 你好!
//服务中心号码、收信人手机号码格式
//0D Address-Length 地址长度
//91 Type-of-Address 地址类型
// Bits 7
// 1
// Bits 6 5 4
// 0 0 0 Unknown1
// 0 0 1 International number2
// 0 1 0 National number3
// 1 1 1 Reserved for extension
// Bits 3 2 ...
|
|
| 作者:不祥 bluejoe张贴于2004-04-25 11:15:41.0,共阅读7457次,回复5次 |
|
|
 |
VC6+SOAP TOOLKIT30 开发WebService client
|
|
| |
| ...
#import "msxml4.dll"
using namespace MSXML2;
#import "C:\Program Files\Common Files\MSSoap\Binaries\MSSOAP30.DLL" exclude("IStream", "IErrorInfo", "ISequentialStream", "_LARGE_INTEGER", "_ULARGE_INTEGER","tagSTATSTG","_FILETIME")
using namespace MSSOAPLib30;
...
HRESULT hr;
CString WebUrl = "http://www.WebServicex.net/TranslateService.asmx?wsdl";
try
{
CoInitialize(NULL);
ISoapSerializerPtr Serializer;
ISoapReaderPtr Reader;
ISoapConnectorPtr SoapConnector;
//创建SoapConnector类的对象
SoapCo ...
|
|
| 作者:aGan aGan张贴于2007-08-08 10:43:36.0,共阅读1283次,回复0次 |
|
|
 |
密码
|
|
| |
| BOOL CPassword::SavePwdfile()
{
char* pFileName;
CFile f;
CFileException e;
char *p;
int *q; if(m_passWordType == 0)
pFileName = "C:\\m4pwd.pwd";
else if(m_passWordType ==1)
pFileName = "C:\\m4offpwd.pwd";
int xor[]={0xa0,0xa0,0xa0,0xa0,0xa0,
0xa0,0xa0,0xa0,0xa0,0xa0};
p = m_readpassword;
q = xor;
for (int i=0;i<PASSWORD_SIZE;i++)
*p++ ^= *q++;
//pass 函版
if(m_passWordType == 0)
pFileName = "C:\\m4pwd.pwd";
else if(m_passWordType ==1)
pFil ...
|
|
| 作者:ni nichuanzhou张贴于2007-04-03 18:58:57.0,共阅读1451次,回复0次 |
|
|
 |
判断某个URL是否有效
|
|
| |
| bool CUtil::IsReachableURL(CString sURL)
{
CInternetSession Session;
CHttpFile * pFile;
try
{
pFile = (CHttpFile *) Session.OpenURL(sURL);
}
catch (CException * e)
{
e->Delete();
pFile = NULL;
}
return (pFile != NULL);
}
|
|
| 作者:不祥 bluejoe张贴于2004-03-10 14:56:27.0,共阅读2037次,回复2次 |
|
|
 |
FTP 服务器返回信息类型归纳
|
|
| |
| 兼容ftp服务器的话,必须对上面进行枚举,目前还没有别的好办法,希望大家添加! "-rw-r--r-- 1 root other 531 Jan 29 03:26 README",
"dr-xr-xr-x 2 root other 512 Apr 8 1994 etc",
"dr-xr-xr-x 2 root 512 Apr 8 1994 etc2",
"lrwxrwxrwx 1 root other 7 Jan 25 00:17 bin -> usr/bin",
/* Some listings with uncommon date/time format: */
"-rw-r--r-- 1 root other 531 09-26 2000 README2",
"-rw-r--r-- 1 root other 531 09-26 13:45 README3",
...
|
|
| 作者:不祥 xler张贴于2004-03-30 11:46:43.0,共阅读2071次,回复0次 |
|
|
 |
域名到IP的转换
|
|
| |
| #define WIN32_LEAN_AND_MEAN
#include <winsock2.h>
#include <stdlib.h>
#include <stdio.h>
const VERSION_MAJOR = 1;
const VERSION_MINOR = 1;
void ShowUsage(void)
{
printf("usage: FINDADDR some.address.com\n");
exit(0);
}
int main(int argc,char *argv[])
{
WSADATA WSData;
LPHOSTENT lpHostEntry;
DWORD dwIPAddress;
LPSTR szIPAddress;
if(WSAStartup(MAKEWORD(VERSION_MAJOR,VERSION_MINOR),&WSData))
{
printf("Cannot find Winsock(v%d.%d or late)!\n",
...
|
|
| 作者:不祥 jerry张贴于2004-03-10 18:07:13.0,共阅读3156次,回复0次 |
|
|
|