This article is a mirror article of machine translation, please click here to jump to the original article.

View: 17615|Reply: 0

[Tips] What are the keywords __in and __in_opt in C?

[Copy link]
Posted on 10/28/2016 10:28:17 AM | | |

_in Enter the parameters
_out Output parameters
_opt The parameter is optional, i.e. it can be NULL
_ecount The element of the cache to which it points is the number in parentheses
These macros are defined as empty and just make the program easier to understand!
https://msdn.microsoft.com/en-us/library/aa383701(v=vs.85).aspx

Let's take a look at an example:



How do we translate???

[DllImport("user32.dll", EntryPoint = "GetWindowText")]
public static extern int GetWindowText(IntPtr hWnd,String lpString,int nMaxCount)





Previous:C# calls the Windows API to modify the value of the text box
Next:C# calls the Windows API to get the text box content
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com