提交 2b44f64b 编写于 作者: B Bill Hally 提交者: Don Syme

Add support for UnmanagedType.LPUTF8Str (#4360)

上级 e1e4cce9
......@@ -1130,6 +1130,7 @@ type ILNativeType =
| LPSTR
| LPWSTR
| LPTSTR
| LPUTF8STR
| ByValStr
| TBSTR
| LPSTRUCT
......
......@@ -757,6 +757,7 @@ type ILNativeType =
| LPSTR
| LPWSTR
| LPTSTR
| LPUTF8STR
| ByValStr
| TBSTR
| LPSTRUCT
......
......@@ -838,6 +838,7 @@ let nt_ARRAY = 0x2Auy
let nt_LPSTRUCT = 0x2Buy
let nt_CUSTOMMARSHALER = 0x2Cuy
let nt_ERROR = 0x2Duy
let nt_LPUTF8STR = 0x30uy
let nt_MAX = 0x50uy
// From c:/clrenv.i386/Crt/Inc/i386/hs.h
......@@ -894,6 +895,7 @@ let ILNativeTypeMap =
nt_LPSTR , ILNativeType.LPSTR
nt_LPWSTR , ILNativeType.LPWSTR
nt_LPTSTR, ILNativeType.LPTSTR
nt_LPUTF8STR, ILNativeType.LPUTF8STR
nt_IUNKNOWN , (* COM interop *) ILNativeType.IUnknown
nt_IDISPATCH , (* COM interop *) ILNativeType.IDispatch
nt_BYVALSTR , ILNativeType.ByValStr
......
......@@ -4933,7 +4933,8 @@ and GenMarshal cenv attribs =
error(Error(FSComp.SR.ilCustomMarshallersCannotBeUsedInFSharp(),m))
(* ILNativeType.Custom of bytes * string * string * bytes (* GUID,nativeTypeName,custMarshallerName,cookieString *) *)
//ILNativeType.Error
| 0x2D -> ILNativeType.Error
| 0x2D -> ILNativeType.Error
| 0x30 -> ILNativeType.LPUTF8STR
| _ -> ILNativeType.Empty
Some(decodeUnmanagedType unmanagedType), otherAttribs
| Some (Attrib(_,_,_,_,_,_,m)) ->
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册