﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>C++博客-canaan-随笔分类-读书笔记</title><link>http://www.cppblog.com/chinapeter2008/category/11021.html</link><description>c++爱好者</description><language>zh-cn</language><lastBuildDate>Sat, 23 Jul 2016 10:43:36 GMT</lastBuildDate><pubDate>Sat, 23 Jul 2016 10:43:36 GMT</pubDate><ttl>60</ttl><item><title>c#与c++类型转换（c#调用c++动态库DLL类型问题）</title><link>http://www.cppblog.com/chinapeter2008/archive/2016/07/22/214029.html</link><dc:creator>canaan</dc:creator><author>canaan</author><pubDate>Fri, 22 Jul 2016 06:36:00 GMT</pubDate><guid>http://www.cppblog.com/chinapeter2008/archive/2016/07/22/214029.html</guid><wfw:comment>http://www.cppblog.com/chinapeter2008/comments/214029.html</wfw:comment><comments>http://www.cppblog.com/chinapeter2008/archive/2016/07/22/214029.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/chinapeter2008/comments/commentRss/214029.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/chinapeter2008/services/trackbacks/214029.html</trackback:ping><description><![CDATA[<div>c#与C++类型转换，网摘2011-12-08 8:33//c++:HANDLE(void&nbsp;&nbsp; *)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ----&nbsp;&nbsp;&nbsp; c#:System.IntPtr&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />//c++:Byte(unsigned&nbsp;&nbsp; char)&nbsp;&nbsp;&nbsp;&nbsp; ----&nbsp;&nbsp;&nbsp; c#:System.Byte&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />//c++:SHORT(short)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ----&nbsp;&nbsp;&nbsp; c#:System.Int16&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />//c++:WORD(unsigned&nbsp;&nbsp; short)&nbsp;&nbsp;&nbsp; ----&nbsp;&nbsp;&nbsp; c#:System.UInt16&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />&nbsp;//c++:INT(int)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ----&nbsp;&nbsp;&nbsp; c#:System.Int16&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />//c++:INT(int)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ----&nbsp;&nbsp;&nbsp; c#:System.Int32&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />//c++:UINT(unsigned&nbsp;&nbsp; int)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ----&nbsp;&nbsp;&nbsp; c#:System.UInt16&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />//c++:UINT(unsigned&nbsp;&nbsp; int)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ----&nbsp;&nbsp;&nbsp; c#:System.UInt32&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />//c++:LONG(long)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ----&nbsp;&nbsp;&nbsp; c#:System.Int32&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />//c++:ULONG(unsigned&nbsp;&nbsp; long)&nbsp;&nbsp;&nbsp; ----&nbsp;&nbsp;&nbsp; c#:System.UInt32&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />//c++:DWORD(unsigned&nbsp;&nbsp; long)&nbsp;&nbsp;&nbsp; ----&nbsp;&nbsp;&nbsp; c#:System.UInt32&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />//c++:DECIMAL&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ----&nbsp;&nbsp;&nbsp; c#:System.Decimal&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />//c++:BOOL(long)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ----&nbsp;&nbsp;&nbsp; c#:System.Boolean&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />//c++:CHAR(char)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ----&nbsp;&nbsp;&nbsp; c#:System.Char&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />//c++:LPSTR(char&nbsp;&nbsp; *)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ----&nbsp;&nbsp;&nbsp; c#:System.String&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />//c++:LPWSTR(wchar_t&nbsp;&nbsp; *)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ----&nbsp;&nbsp;&nbsp; c#:System.String&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />//c++:LPCSTR(const&nbsp;&nbsp; char&nbsp;&nbsp; *)&nbsp; ----&nbsp;&nbsp;&nbsp; c#:System.String&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />//c++:LPCWSTR(const&nbsp;&nbsp; wchar_t&nbsp;&nbsp; *)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ----&nbsp;&nbsp;&nbsp; c#:System.String&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />//c++:PCAHR(char&nbsp;&nbsp; *)&nbsp;&nbsp; ----&nbsp;&nbsp;&nbsp; c#:System.String&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />//c++:BSTR&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ----&nbsp;&nbsp;&nbsp; c#:System.String&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />//c++:FLOAT(float)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ----&nbsp;&nbsp;&nbsp; c#:System.Single&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />//c++:DOUBLE(double)&nbsp;&nbsp;&nbsp; ----&nbsp;&nbsp;&nbsp; c#:System.Double&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />//c++:VARIANT&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ----&nbsp;&nbsp;&nbsp; c#:System.Object&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />//c++:PBYTE(byte&nbsp;&nbsp; *)&nbsp;&nbsp; ----&nbsp;&nbsp;&nbsp; c#:System.Byte[]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />//c++:BSTR&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ----&nbsp;&nbsp;&nbsp; c#:StringBuilder&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />//c++:LPCTSTR&nbsp;&nbsp; ----&nbsp;&nbsp;&nbsp; c#:StringBuilder&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />//c++:LPCTSTR&nbsp;&nbsp; ----&nbsp;&nbsp;&nbsp; c#:string&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />//c++:LPTSTR&nbsp;&nbsp;&nbsp; ----&nbsp;&nbsp;&nbsp; c#:[MarshalAs(UnmanagedType.LPTStr)] string&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />//c++:LPTSTR 输出变量名&nbsp;&nbsp;&nbsp; ----&nbsp;&nbsp;&nbsp; c#:StringBuilder 输出变量名&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />//c++:LPCWSTR&nbsp;&nbsp; ----&nbsp;&nbsp;&nbsp; c#:IntPtr&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />//c++:BOOL&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ----&nbsp;&nbsp;&nbsp; c#:bool&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />//c++:HMODULE&nbsp;&nbsp; ----&nbsp;&nbsp;&nbsp; c#:IntPtr&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />//c++:HINSTANCE ----&nbsp;&nbsp;&nbsp; c#:IntPtr&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />//c++:结构体&nbsp;&nbsp;&nbsp; ----&nbsp;&nbsp;&nbsp; c#:public struct 结构体{};&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />//c++:结构体 **变量名&nbsp;&nbsp; ----&nbsp;&nbsp;&nbsp; c#:out 变量名&nbsp; <br />//C#中提前申明一个结构体实例化后的变量名&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />//c++:结构体 &amp;变量名&nbsp;&nbsp;&nbsp; ----&nbsp;&nbsp;&nbsp; c#:ref 结构体变量名&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />//c++:WORD&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ----&nbsp;&nbsp;&nbsp; c#:ushort&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />//c++:DWORD&nbsp;&nbsp;&nbsp;&nbsp; ----&nbsp;&nbsp;&nbsp; c#:uint&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />//c++:DWORD&nbsp;&nbsp;&nbsp;&nbsp; ----&nbsp;&nbsp;&nbsp; c#:int&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />//c++:UCHAR&nbsp;&nbsp;&nbsp;&nbsp; ----&nbsp;&nbsp;&nbsp; c#:int&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />//c++:UCHAR&nbsp;&nbsp;&nbsp;&nbsp; ----&nbsp;&nbsp;&nbsp; c#:byte&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />//c++:UCHAR*&nbsp;&nbsp;&nbsp; ----&nbsp;&nbsp;&nbsp; c#:string&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />//c++:UCHAR*&nbsp;&nbsp;&nbsp; ----&nbsp;&nbsp;&nbsp; c#:IntPtr&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />//c++:GUID&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ----&nbsp;&nbsp;&nbsp; c#:Guid&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />//c++:Handle&nbsp;&nbsp;&nbsp; ----&nbsp;&nbsp;&nbsp; c#:IntPtr&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />//c++:HWND&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ----&nbsp;&nbsp;&nbsp; c#:IntPtr&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />//c++:DWORD&nbsp;&nbsp;&nbsp;&nbsp; ----&nbsp;&nbsp;&nbsp; c#:int&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />//c++:COLORREF&nbsp; ----&nbsp;&nbsp;&nbsp; c#:uint&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />//c++:unsigned char&nbsp;&nbsp;&nbsp;&nbsp; ----&nbsp;&nbsp;&nbsp; c#:byte&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />//c++:unsigned char *&nbsp;&nbsp; ----&nbsp;&nbsp;&nbsp; c#:ref byte&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />//c++:unsigned char *&nbsp;&nbsp; ----&nbsp;&nbsp;&nbsp; c#:[MarshalAs(UnmanagedType.LPArray)] byte[]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />//c++:unsigned char *&nbsp;&nbsp; ----&nbsp;&nbsp;&nbsp; c#:[MarshalAs(UnmanagedType.LPArray)] Intptr&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />//c++:unsigned char &amp;&nbsp;&nbsp; ----&nbsp;&nbsp;&nbsp; c#:ref byte&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />//c++:unsigned char 变量名&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ----&nbsp;&nbsp;&nbsp; c#:byte 变量名&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />//c++:unsigned short 变量名&nbsp;&nbsp;&nbsp;&nbsp; ----&nbsp;&nbsp;&nbsp; c#:ushort 变量名&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />//c++:unsigned int 变量名&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ----&nbsp;&nbsp;&nbsp; c#:uint 变量名&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />//c++:unsigned long 变量名&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ----&nbsp;&nbsp;&nbsp; c#:ulong 变量名&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />//c++:char 变量名&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ----&nbsp;&nbsp;&nbsp; c#:byte 变量名&nbsp; <br />//C++中一个字符用一个字节表示,C#中一个字符用两个字节表示&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />//c++:char 数组名[数组大小]&nbsp;&nbsp;&nbsp;&nbsp; ----&nbsp;&nbsp;&nbsp; c#:MarshalAs(UnmanagedType.ByValTStr, SizeConst = 数组大小)]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />public string 数组名; ushort&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />//c++:char *&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ----&nbsp;&nbsp;&nbsp; c#:string&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </div><div></div><div>//传入参数&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />//c++:char *&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ----&nbsp;&nbsp;&nbsp; c#:StringBuilder<br />//传出参数&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />//c++:char *变量名&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ----&nbsp;&nbsp;&nbsp; c#:ref string 变量名&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </div><div></div><div>//c++:char *输入变量名&nbsp; ----&nbsp;&nbsp;&nbsp; c#:string 输入变量名&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />//c++:char *输出变量名&nbsp; ----&nbsp;&nbsp;&nbsp; c#:[MarshalAs(UnmanagedType.LPStr)] StringBuilder 输出变量名&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />//c++:char **&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ----&nbsp;&nbsp;&nbsp; c#:string&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />//c++:char **变量名&nbsp;&nbsp;&nbsp;&nbsp; ----&nbsp;&nbsp;&nbsp; c#:ref string 变量名&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />//c++:const char *&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ----&nbsp;&nbsp;&nbsp; c#:string&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />//c++:char[]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ----&nbsp;&nbsp;&nbsp; c#:string&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />//c++:char 变量名[数组大小]&nbsp;&nbsp;&nbsp;&nbsp; ----&nbsp;&nbsp;&nbsp; c#:[MarshalAs(UnmanagedType.ByValTStr,SizeConst=数组大小)] public string 变量名;&nbsp;&nbsp;&nbsp; </div><div></div><div>//c++:struct 结构体名 *变量名&nbsp;&nbsp; ----&nbsp;&nbsp;&nbsp; c#:ref 结构体名变量名&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </div><div></div><div>//c++:委托 变量名&nbsp;&nbsp; ----&nbsp;&nbsp;&nbsp; c#:委托变量名&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />//c++:int&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ----&nbsp;&nbsp;&nbsp; c#:int&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />//c++:int&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ----&nbsp;&nbsp;&nbsp; c#:ref int&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />//c++:int &amp;&nbsp;&nbsp;&nbsp;&nbsp; ----&nbsp;&nbsp;&nbsp; c#:ref int&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />//c++:int *&nbsp;&nbsp;&nbsp;&nbsp; ----&nbsp;&nbsp;&nbsp; c#:ref int&nbsp;&nbsp;&nbsp;&nbsp; <br />//C#中调用前需定义int 变量名 = 0;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />//c++:*int&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ----&nbsp;&nbsp;&nbsp; c#:IntPtr&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />//c++:int32 PIPTR *&nbsp;&nbsp;&nbsp;&nbsp; ----&nbsp;&nbsp;&nbsp; c#:int32[]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />//c++:float PIPTR *&nbsp;&nbsp;&nbsp;&nbsp; ----&nbsp;&nbsp;&nbsp; c#:float[]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />//c++:double** 数组名&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ----&nbsp;&nbsp;&nbsp; c#:ref double 数组名&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />//c++:double*[] 数组名&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ----&nbsp;&nbsp;&nbsp; c#:ref double 数组名&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />//c++:long&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ----&nbsp;&nbsp;&nbsp; c#:int&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />//c++:ulong&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ----&nbsp;&nbsp;&nbsp; c#:int&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />//c++:UINT8 *&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ----&nbsp;&nbsp;&nbsp; c#:ref byte&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />//C#中调用前需定义byte 变量名 = new byte();&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />//c++:handle&nbsp;&nbsp;&nbsp; ----&nbsp;&nbsp;&nbsp; c#:IntPtr&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />//c++:hwnd&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ----&nbsp;&nbsp;&nbsp; c#:IntPtr&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />//c++:void *&nbsp;&nbsp;&nbsp; ----&nbsp;&nbsp;&nbsp; c#:IntPtr&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />//c++:void * user_obj_param&nbsp;&nbsp;&nbsp; ----&nbsp;&nbsp;&nbsp; c#:IntPtr user_obj_param&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />//c++:void * 对象名称&nbsp;&nbsp;&nbsp; ----&nbsp;&nbsp;&nbsp; c#:([MarshalAs(UnmanagedType.AsAny)]Object 对象名称&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />//c++:char, INT8, SBYTE, CHAR&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ----&nbsp;&nbsp;&nbsp; c#:System.SByte&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />//c++:short, short int, INT16, SHORT&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ----&nbsp;&nbsp;&nbsp; c#:System.Int16&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />//c++:int, long, long int, INT32, LONG32, BOOL , INT&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ----&nbsp;&nbsp;&nbsp; c#:System.Int32&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />//c++:__int64, INT64, LONGLONG&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ----&nbsp;&nbsp;&nbsp; c#:System.Int64&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />//c++:unsigned char, UINT8, UCHAR , BYTE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ----&nbsp;&nbsp;&nbsp; c#:System.Byte&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />//c++:unsigned short, UINT16, USHORT, WORD, ATOM, WCHAR , __wchar_t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ----&nbsp;&nbsp;&nbsp; c#:System.UInt16&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </div><div></div><div>//c++:unsigned, unsigned int, UINT32, ULONG32, DWORD32, ULONG, DWORD, UINT&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ----&nbsp;&nbsp;&nbsp; c#:System.UInt32&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </div><div></div><div>//c++:unsigned __int64, UINT64, DWORDLONG, ULONGLONG&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ----&nbsp;&nbsp;&nbsp; c#:System.UInt64&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </div><div></div><div>//c++:float, FLOAT&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ----&nbsp;&nbsp;&nbsp; c#:System.Single&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </div><div></div><div>//c++:double, long double, DOUBLE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ----&nbsp;&nbsp;&nbsp; c#:System.Double&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </div><div></div><div>//Win32 Types&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ----&nbsp; CLR Type&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />//Struct需要在C#里重新定义一个Struct&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />//CallBack回调函数需要封装在一个委托里，delegate static extern int FunCallBack(string str);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />//unsigned char** ppImage替换成IntPtr ppImage&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />//int&amp; nWidth替换成ref int nWidth&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />//int*, int&amp;, 则都可用 ref int 对应&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />//双针指类型参数，可以用 ref IntPtr&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />//函数指针使用c++: typedef double (*fun_type1)(double); 对应 c#:public delegate double&nbsp; fun_type1(double);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />//char* 的操作c++: char*; 对应 c#:StringBuilder;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />//c#中使用指针:在需要使用指针的地方 加 unsafe&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </div><div></div><div>//unsigned&nbsp;&nbsp; char对应public&nbsp;&nbsp; byte&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </div><div></div><div></div><strong></strong><img src ="http://www.cppblog.com/chinapeter2008/aggbug/214029.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/chinapeter2008/" target="_blank">canaan</a> 2016-07-22 14:36 <a href="http://www.cppblog.com/chinapeter2008/archive/2016/07/22/214029.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>编译器编译原理四部曲</title><link>http://www.cppblog.com/chinapeter2008/archive/2012/05/24/176011.html</link><dc:creator>canaan</dc:creator><author>canaan</author><pubDate>Thu, 24 May 2012 06:10:00 GMT</pubDate><guid>http://www.cppblog.com/chinapeter2008/archive/2012/05/24/176011.html</guid><wfw:comment>http://www.cppblog.com/chinapeter2008/comments/176011.html</wfw:comment><comments>http://www.cppblog.com/chinapeter2008/archive/2012/05/24/176011.html#Feedback</comments><slash:comments>2</slash:comments><wfw:commentRss>http://www.cppblog.com/chinapeter2008/comments/commentRss/176011.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/chinapeter2008/services/trackbacks/176011.html</trackback:ping><description><![CDATA[例子：<br /><br />环境：linux<br />编译器：gcc<br />源码：hello.c<br /><br /><div style="background-color:#eeeeee;font-size:13px;border:1px solid #CCCCCC;padding-right: 5px;padding-bottom: 4px;padding-left: 4px;padding-top: 4px;width: 98%;word-break:break-all"><!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />--><span style="color: #008080; ">1</span>&nbsp;<span style="color: #000000; ">#include&nbsp;</span><span style="color: #000000; ">&lt;</span><span style="color: #000000; ">stdio.h</span><span style="color: #000000; ">&gt;</span><span style="color: #000000; "><br /></span><span style="color: #008080; ">2</span>&nbsp;<span style="color: #000000; "><br /></span><span style="color: #008080; ">3</span>&nbsp;<span style="color: #000000; "></span><span style="color: #0000FF; ">int</span><span style="color: #000000; ">&nbsp;main()<br /></span><span style="color: #008080; ">4</span>&nbsp;<span style="color: #000000; ">{<br /></span><span style="color: #008080; ">5</span>&nbsp;<span style="color: #000000; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;printf(</span><span style="color: #000000; ">"</span><span style="color: #000000; ">hello,&nbsp;world\n</span><span style="color: #000000; ">"</span><span style="color: #000000; ">);<br /></span><span style="color: #008080; ">6</span>&nbsp;<span style="color: #000000; ">}</span></div><br /><br />:~$ gcc -o hello hello.c<br /><br />1、 源码文件<span style="color: #0000ff;">hello.c</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 通过预处理器-&gt;修改过的源码文件<span style="color: #0000ff;">hello.i </span><br />2、 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">hello.i</span> &nbsp; 通过编译器-&gt;汇编代码<span style="color: #0000ff;">hello.s </span><br />3、 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; <span style="color: #0000ff;">hello.s</span> &nbsp; 通过汇编器-&gt;浮动文件<span style="color: #0000ff;">hello.o </span><br />4、 &nbsp;&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">hello.o+printf.o</span>&nbsp;&nbsp; 通过连接器-&gt;可执行文件<span style="color: #0000ff;">hello。</span><br /><br /><br /><br />1、<strong>预处理阶段</strong>&nbsp;&nbsp;&nbsp; 预处理器(cpp)根据#后面的指令修改源代码。例：<span style="color: #0000ff;">hello.c</span>中的#include &lt;stdio.h&gt; 命令告诉预处理器把系统头文件stdio.h插入到程序中生产另外一个C程序，一般后缀名为.i。<br /><br />2、<strong>编译阶段</strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 编译器(cc1)把<span style="color: #0000ff;">hello.i</span>文件转化成汇编代码<span style="color: #0000ff;">hello.s</span>文件。<br /><br />3、<strong>汇编阶段</strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 汇编器（as）把<span style="color: #0000ff;">hello.s</span>转化成机器语言指令浮动文件程序<span style="color: #0000ff;">hello.o。</span><br /><br />4、<strong>连接阶段</strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; hello程序调用了标准C库printf函数。连接器(ld)把<span style="color: #0000ff;">printf.o和hello.o</span>连接成<span style="color: #0000ff;">hello</span>可执行文件。<img src ="http://www.cppblog.com/chinapeter2008/aggbug/176011.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/chinapeter2008/" target="_blank">canaan</a> 2012-05-24 14:10 <a href="http://www.cppblog.com/chinapeter2008/archive/2012/05/24/176011.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>防范API被下断点（以MessageBoxA为例）</title><link>http://www.cppblog.com/chinapeter2008/archive/2012/02/04/164959.html</link><dc:creator>canaan</dc:creator><author>canaan</author><pubDate>Sat, 04 Feb 2012 14:40:00 GMT</pubDate><guid>http://www.cppblog.com/chinapeter2008/archive/2012/02/04/164959.html</guid><wfw:comment>http://www.cppblog.com/chinapeter2008/comments/164959.html</wfw:comment><comments>http://www.cppblog.com/chinapeter2008/archive/2012/02/04/164959.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/chinapeter2008/comments/commentRss/164959.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/chinapeter2008/services/trackbacks/164959.html</trackback:ping><description><![CDATA[<div>INT 3断点，其机器码是CCh，也常称为CC指令。<br /><br />对MessageBoxA函数进行的断点检测：<br />FARPROC Uaddr;<br />BYTE Mark = 0;<br />(FARPROC&amp;) Uaddr = GetprocAddress ( LoadLibrary("user32.dll"), "MessageBoxA");<br />Mark = *((BYTE*)Uaddr);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //取MessageBoxA函数第一字节<br />if(Mark == 0xCC)<br />&nbsp; return TRUE;</div><img src ="http://www.cppblog.com/chinapeter2008/aggbug/164959.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/chinapeter2008/" target="_blank">canaan</a> 2012-02-04 22:40 <a href="http://www.cppblog.com/chinapeter2008/archive/2012/02/04/164959.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>汇编命令学习</title><link>http://www.cppblog.com/chinapeter2008/archive/2012/02/04/164952.html</link><dc:creator>canaan</dc:creator><author>canaan</author><pubDate>Sat, 04 Feb 2012 11:53:00 GMT</pubDate><guid>http://www.cppblog.com/chinapeter2008/archive/2012/02/04/164952.html</guid><wfw:comment>http://www.cppblog.com/chinapeter2008/comments/164952.html</wfw:comment><comments>http://www.cppblog.com/chinapeter2008/archive/2012/02/04/164952.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/chinapeter2008/comments/commentRss/164952.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/chinapeter2008/services/trackbacks/164952.html</trackback:ping><description><![CDATA[<div><strong style="color: #000080">test al,al</strong>&nbsp;&nbsp; 测试al是否为0，如果al为0标志位ZF=1。<br /><strong style="color: #000080">xor al,al</strong><strong>&nbsp;&nbsp; </strong><span style="color: #000000">al清零。</span></div><img src ="http://www.cppblog.com/chinapeter2008/aggbug/164952.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/chinapeter2008/" target="_blank">canaan</a> 2012-02-04 19:53 <a href="http://www.cppblog.com/chinapeter2008/archive/2012/02/04/164952.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>格式化MessageBox里的文字</title><link>http://www.cppblog.com/chinapeter2008/archive/2011/08/03/152346.html</link><dc:creator>canaan</dc:creator><author>canaan</author><pubDate>Wed, 03 Aug 2011 05:13:00 GMT</pubDate><guid>http://www.cppblog.com/chinapeter2008/archive/2011/08/03/152346.html</guid><wfw:comment>http://www.cppblog.com/chinapeter2008/comments/152346.html</wfw:comment><comments>http://www.cppblog.com/chinapeter2008/archive/2011/08/03/152346.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.cppblog.com/chinapeter2008/comments/commentRss/152346.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/chinapeter2008/services/trackbacks/152346.html</trackback:ping><description><![CDATA[<div>int CDECL MessageBoxPrintf(TCHAR *szCaption, TCHAR *szFormat,...)<br />{<br />&nbsp;&nbsp; &nbsp;TCHAR szBuffer[1024];<br />&nbsp;&nbsp; &nbsp;va_list pArgList;<br /><br />&nbsp;&nbsp; &nbsp;va_start(pArgList, szFormat);<br />&nbsp;&nbsp; &nbsp;_vsntprintf(szBuffer, sizeof(szBuffer)/sizeof(TCHAR), szFormat, pArgList);<br />&nbsp;&nbsp; &nbsp;va_end(pArgList);<br />&nbsp;&nbsp; &nbsp;return MessageBox(NULL, szBuffer, szCaption, 0);<br />}<br /></div><img src ="http://www.cppblog.com/chinapeter2008/aggbug/152346.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/chinapeter2008/" target="_blank">canaan</a> 2011-08-03 13:13 <a href="http://www.cppblog.com/chinapeter2008/archive/2011/08/03/152346.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Windows程序进入点</title><link>http://www.cppblog.com/chinapeter2008/archive/2011/08/02/152309.html</link><dc:creator>canaan</dc:creator><author>canaan</author><pubDate>Tue, 02 Aug 2011 13:28:00 GMT</pubDate><guid>http://www.cppblog.com/chinapeter2008/archive/2011/08/02/152309.html</guid><wfw:comment>http://www.cppblog.com/chinapeter2008/comments/152309.html</wfw:comment><comments>http://www.cppblog.com/chinapeter2008/archive/2011/08/02/152309.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/chinapeter2008/comments/commentRss/152309.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/chinapeter2008/services/trackbacks/152309.html</trackback:ping><description><![CDATA[int<br />WINAPI<br />WinMain(<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;HINSTANCE hInstance,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//执行实体代号<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;HINSTANCE hPrevInstance,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//判断自身的其他执行实体是否正在运行（32位元Windows版本，该概念已被抛弃。该参数值总是为NULL 0）<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;LPSTR lpCmdLine,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //用于执行程序的命令列<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;int nShowCmd&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //程序最初显示方式<br />);<br /><br />此函数在WINBASE.H中有声明<br />WinMain函数声明为返回一个int值。WINAPI标识符在WINDEF.H定义 #defina WINAPI __stdcall<br /><br /><br /><br />WINDEF.H&nbsp;&nbsp;&nbsp; 基本型态定义<br />WINNT.H&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 支持Unicode的型态定义<br />WINBASE.H&nbsp; Kernel函数<br />WINUSER.H&nbsp; 用户接口函数<br />WINGDI.H&nbsp;&nbsp;&nbsp;&nbsp; 图形设备接口函数<img src ="http://www.cppblog.com/chinapeter2008/aggbug/152309.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/chinapeter2008/" target="_blank">canaan</a> 2011-08-02 21:28 <a href="http://www.cppblog.com/chinapeter2008/archive/2011/08/02/152309.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>C++基本要素谈 (c++ Primer 4th)</title><link>http://www.cppblog.com/chinapeter2008/archive/2009/06/28/88682.html</link><dc:creator>canaan</dc:creator><author>canaan</author><pubDate>Sun, 28 Jun 2009 01:58:00 GMT</pubDate><guid>http://www.cppblog.com/chinapeter2008/archive/2009/06/28/88682.html</guid><wfw:comment>http://www.cppblog.com/chinapeter2008/comments/88682.html</wfw:comment><comments>http://www.cppblog.com/chinapeter2008/archive/2009/06/28/88682.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/chinapeter2008/comments/commentRss/88682.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/chinapeter2008/services/trackbacks/88682.html</trackback:ping><description><![CDATA[内置类型&nbsp;&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 由c++语言定义的。例如 整型int<br><br>库类型<br>类类型<br>变量<br>表达式<br>语句<br>函数 
<img src ="http://www.cppblog.com/chinapeter2008/aggbug/88682.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/chinapeter2008/" target="_blank">canaan</a> 2009-06-28 09:58 <a href="http://www.cppblog.com/chinapeter2008/archive/2009/06/28/88682.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>