api_2_1

 1 #include <windows.h>
2 #include <stdio.h>
3
4 int WINAPI WinMain( HINSTANCE hInstance,
5 HINSTANCE hPrevInstance,
6 LPSTR lpCmdLine,
7 int nShowCmd )
8 {
9 LPSTR szString = "Windows data type, string.";
10 CHAR lpString[120];
11 DWORD dwMax = 0xFFFFFFFF;
12 DWORD dwOne = 0x01;
13 INT iMax = 0xFFFFFFFF;
14 INT iOne = 0x01;
15
16 MessageBox(NULL, szString, "LPSTR", MB_OK);
17 CopyMemory(lpString, szString, lstrlen(lpString)+1);
18 MessageBox(NULL, lpString, "CHAR[]", MB_OK);
19
20 if(dwMax>dwOne) {
21 MessageBox(NULL, "DWORD类型的数据 0xFFFFFFFF > 0x1", "DWORD", MB_OK);
22 }
23
24 if (iMax<iOne) {
25 MessageBox(NULL, "INT类型的数据 0xFFFFFFFF < 0x1", "INT", MB_OK);
26 }
27
28 return 0;
29 }
posted @ 2011-09-17 21:23  airzack  阅读(115)  评论(0)    收藏  举报