#include “windows.h”
#include “tchar.h”
WCHAR a[]=L”123″;
int WINAPI MyFonc(HINSTANCE hInstance,HINSTANCE hPrevInstance,LPSTR lpCmdLine,int nCmdShow)
{
 WCHAR b[]=L”456″;
 HMODULE hmodule=LoadLibrary(L”user32.dll”);
 FARPROC addr=GetProcAddress(hmodule,”MessageBoxW”);
 __asm
 {
  push 0
  mov eax,offset a//全局用offset
  push eax
  lea eax,b//局部用lea
  push eax
  push 0
  call addr
 }
 return 0;
}

阅读全文

, ,