在vc++编程中,会发现微软的很多API里面都用到了位运算,比如这个函数:CreateWindowExA( __in DWORD dwExStyle, __in_opt LPCSTR lpClassName, __in_opt LPCSTR lpWindowName, _...
分类:
编程语言 时间:
2014-07-16 23:13:20
阅读次数:
299
BOOL bAdminPrivilege = FALSE; TCHAR strUserName[80+1];DWORD nUserNameLength = 80;GetUserName(strUserName,&nUserNameLength);AfxMessageBox(strUserNa...
分类:
其他好文 时间:
2014-07-16 21:52:00
阅读次数:
160
CHotKeyCtrl控件获取热键数据注册热键响应热键事件一、CHotKeyCtrl控件void SetHotKey( WORD wVirtualKeyCode, WORD wModifiers );二、获取热键数据DWORD GetHotKey( ) const;void GetHotKey( W...
分类:
其他好文 时间:
2014-07-16 19:30:44
阅读次数:
273
直接上代码:#include //必要的头文件,使用Windows API函数
#include
int index = 0;
int tickets = 100;//票数
HANDLE hMutex; //使用全局的互斥对象来保证对同一资源的互斥访问与操作这里是tickets
//线程处理函数原型,形式可从MSDN中拷贝
//线程1 的入口函数
DWORD WINAPI Fun1Proc...
分类:
编程语言 时间:
2014-07-08 17:12:03
阅读次数:
239
void GetApplicationVersion(char * strVersion){ TCHAR szFullPath[MAX_PATH]; DWORD dwVerInfoSize = 0; DWORD dwVerHnd; VS_FIXEDFILEINFO * ...
分类:
其他好文 时间:
2014-07-08 00:35:17
阅读次数:
278
1.UPX壳我们先来看一下数据是怎么被解压出来的,首先刚进入外壳时,就有这么几句代码:/*462A40*/ pushad/*462A41*/ mov esi,43F000/*462A46*/ lea edi,dword ptr ds:[esi+FFFC2000]/*462A4C*/ mov dwor...
分类:
其他好文 时间:
2014-07-06 20:06:24
阅读次数:
249
HRESULT D3DXCreateTexture( __in LPDIRECT3DDEVICE9 pDevice, __in UINT Width, __in UINT Height, __in UINT MipLevels, __in DWORD...
分类:
其他好文 时间:
2014-07-05 22:41:07
阅读次数:
390
1 #include "stdio.h" 2 #include "windows.h" 3 4 int main() 5 { 6 char sText[20] = { "多字节字符串!OK!" }; 7 DWORD dwNum = MultiByteToWideChar(CP_A...
分类:
编程语言 时间:
2014-07-01 21:25:57
阅读次数:
336
??
有心栽花花不开,无心插柳柳成排。
今天要说的这个wifi on\off是在软件层面控制无线网卡的开和关。
问题听起来简单,调查起来复杂,但解决起来却也简单。关键函数便是Native wifi api中的WlanSetInterface。其实这个API功能也是非
常强大的,我只用到其中控制wifi radio state的功能。官网文档在此。
函数原型:
DWORD WINAPI ...
分类:
编程语言 时间:
2014-07-01 15:21:29
阅读次数:
324
打开注册表,找到HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Command Processor下
项“CompletionChar”(REG_DWORD类型),默认值为40(16进制),现将该项的值改为9(16进制)。
然后打开一个cmd试下。就OK了...