导航

2008年9月25日

摘要: 1.头文件中要定义宏; #define UNICODE #define _UNICODE //////////////////// char buf[128]; memset(buf,0,128); strcpy(buf,"你好"); WCHAR pCName[128]; memset(pCName,0,128); MultiByteToWideChar(CP_THREAD_ACP,MB_USEGLYPHCHARS,buf,strlen(buf),pCName,128); 至于WCHAR 转换到CHAR,则用 WideCharToMultiByte ////////////////////////// 2.char转换成wchar const char *pFilePathName = "c:\\aa.dll"; int nLen = s 阅读全文

posted @ 2008-09-25 12:01 黄美华 阅读(1991) 评论(0) 推荐(1)

2008年9月16日

摘要: #include "stdafx.h" #include "ras.h" HANDLE hPort = INVALID_HANDLE_VALUE; HRASCONN hRasConn = NULL; BOOL CreatePort() { DWORD dwNumBytesWritten; BOOL fRet; BYTE Bytes[]={'A','T','+','C','G','D','C','O','N','T','=','1',',','"','I','P','"',',','"','C','M','N','E','T','"',0x0D,'A','T','D','T','*','9','9','#',0x0D}; //open the serial port hPort = CreateFile(TEXT("COM8:"),GENERIC_READ | GENERIC_WRITE,0,NULL,OPEN_EXISTING,0,NULL); if ( hPort == INVALID_HANDLE_VALUE ) { / 阅读全文

posted @ 2008-09-16 10:00 黄美华 阅读(1975) 评论(0) 推荐(0)

2008年8月17日

摘要: windows api for c# 阅读全文

posted @ 2008-08-17 15:03 黄美华 阅读(805) 评论(2) 推荐(0)

2008年8月16日

摘要: foreach the files 阅读全文

posted @ 2008-08-16 02:36 黄美华 阅读(794) 评论(2) 推荐(0)

2008年8月15日

摘要: content 阅读全文

posted @ 2008-08-15 03:01 黄美华 阅读(2099) 评论(4) 推荐(0)