摘要: netapi32.lib#include ;typedef struct _ASTAT_ { ADAPTER_STATUS adapt; NAME_BUFFER NameBuff[30];}ASTAT, *PASTAT; void GetNetCardMac(int lana_num, char *pszOut){ NCB ncb; UCHAR uRetCode; ASTAT Adapter; memset(&ncb, 0, sizeof(ncb)); ncb.ncb_command = NCBRESET; nc... 阅读全文
posted @ 2013-08-06 13:56 呵呵·· 阅读(309) 评论(0) 推荐(0) 编辑
摘要: void CFunc::GbkToUtf8(CString &strGBK){ int len = MultiByteToWideChar(CP_ACP, 0, (LPCTSTR)strGBK, -1, NULL, 0); unsigned short *wszUtf8 = new unsigned short[len + 1]; memset(wszUtf8, 0, len * 2 + 2); MultiByteToWideChar(CP_ACP, 0, (LPCTSTR)strGBK, -1, wszUtf8, len); len = WideCharToMu... 阅读全文
posted @ 2013-08-06 10:14 呵呵·· 阅读(559) 评论(0) 推荐(0) 编辑
摘要: //创建一个容器 CEmbWordCntrItem * pItem = NULL; CEmbWordDoc * pDoc = GetDocument(); pItem = new CEmbWordCntrItem(pDoc); CLSID clsid = {0}; //创建Automation服务器 CLSIDFromProgID(L"Word.Document", &clsid); pItem->CreateNewItem(clsid); //显示 pItem->DoVerb(OLEIVERB_SHOW, this); CRect rcClient; 阅读全文
posted @ 2013-08-06 08:49 呵呵·· 阅读(212) 评论(0) 推荐(0) 编辑