C#????C++??д??DLL???????????????????
???????????? ???????[ 2013/12/23 9:54:47 ] ????????
struct UIM_BOOK_STRUCT
{
int UimIndex;
char szName[15];
char szPhone[21];
};
int ReadUimAllBook(UIM_BOOK_STRUCT lpUimBookItem[]??int nMaxArraySize);
|
????C#????
[StructLayout(LayoutKind.Sequential?? CharSet = CharSet.Ansi)]//???????????????
public struct UIM_BOOK_STRUCT
{
public int UimIndex;
[MarshalAs(UnmanagedType.ByValTStr?? SizeConst= 15)]
public string szName;
[MarshalAs(UnmanagedType.ByValTStr?? SizeConst= 21)]
public string szPhone;
};
[DllImport( "CdmaCard.dll"??EntryPoint="ReadUimAllBook")]
public static extern int ReadUimAllBook([Out] UIM_BOOK_STRUCT [] lpUimBookItem??int nMaxArraySize);
UIM_BOOK_STRUCT[] p = new UIM_BOOK_STRUCT[20];
int ret = ReadUimAllBook(p??p.Length);
|
????6. ???????
???????????£????μ???????
????(1) long ???????C++????4????????????C#????8????????;
????(2) ?????????????ò????;
?????????????????window????
[System.Security.SuppressUnmanagedCodeSecurity] // We won't use this maliciously
[DllImport("User32.dll"?? CharSet=CharSet.Auto)]
public static extern bool ScreenToClient(IntPtr hWnd?? ref System.Drawing.Point rect);
[System.Security.SuppressUnmanagedCodeSecurity] // We won't use this maliciously
[DllImport("User32.dll"?? CharSet=CharSet.Auto)]
public static extern bool GetWindowRect(IntPtr hWnd?? out System.Drawing.Rectangle rect);
[System.Security.SuppressUnmanagedCodeSecurity] // We won't use this maliciously
[DllImport("User32.dll"?? CharSet=CharSet.Auto)]
public static extern bool UnregisterClass([MarshalAs(UnmanagedType.LPTStr)] string className?? IntPtr instanceHandle);
|
???????????????????????漰???????????????????SPASVOС??(021-61079698-8054)?????????????????????????
??????
???????C#?е?StringC# Socket???????????????????C#?????????????????????????C#???????C#????????????Log4net??????δ????C#?????????????C#?????????????????C#???????????????C#????????????????C#7 ?е?Tuple??????C#??TypeScript - GeneratorC# ?????????細(xì)??????????C#?е???н???C#??MySQL?????????μ??Ч?????д??C#????C++??dll???C#??VS2010????е??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11????????
?????????App Bug???????????????????????Jmeter?????????QC??????APP????????????????app?????е????????jenkins+testng+ant+webdriver??????????????JMeter????HTTP???????Selenium 2.0 WebDriver ??????