|
|
马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
问下各位,这段代码是我在VC++2005写的,在VC编译器中编译通过并且运行正常,但在MinGw编译器中编译有问题,想问下MinGw的内联汇编是不是与VC编译器不同
代码的能力是循环弹出5次MessageBox
- #include <windows.h>
- #include "Skin/SkinH.h"
- #pragma comment(lib,"Skin/SkinH.lib")
- static char a[]="提示";
- static char b[]="威少修改";
- int WINAPI WinMain( __in HINSTANCE hInstance, __in_opt HINSTANCE hPrevInstance, __in_opt LPSTR lpCmdLine, __in int nShowCmd )
- {
- __asm
- {
- call DWORD ptr ds:[SkinH_Attach]//加载皮肤
- push 50 //设置透明参数
- call DWORD PTR ds:[SkinH_SetAero]//加载透明API
- mov edi, 5 //设置循环次数
- ase:
- push 40h //设置MessageBoxA的按钮与图标
- push offset a //引用文本
- push offset b
- push 0
- call DWORD ptr ds:[MessageBoxA]
- sub edi,1
- cmp edi,0
- jnz ase
- xor eax,eax
- }
- return 0;
- }
复制代码
|
|