• 非托管类型转换为托管类型对照表


     https://msdn.microsoft.com/zh-cn/library/sd10k43k(v=vs.110).aspx

    Wtypes.h 中的非托管类型

    非托管 C 语言类型

    托管类名称

    描述

    句柄

    void*

    [ T:System.IntPtr ]

    在 32 位 Windows 操作系统上为 32 位、在 64 位 Windows 操作系统上为 64 位。

    BYTE

    unsigned char

    [ T:System.Byte ]

    8 位

    SHORT

    short

    [ T:System.Int16 ]

    16 位

    WORD

    unsigned short

    [ T:System.UInt16 ]

    16 位

    INT

    int

    [ T:System.Int32 ]

    32 位

    UINT

    unsigned int

    [ T:System.UInt32 ]

    32 位

    LONG

    long

    [ T:System.Int32 ]

    32 位

    BOOL

    long

    System.Int32

    32 位

    DWORD

    unsigned long

    [ T:System.UInt32 ]

    32 位

    ULONG

    unsigned long

    [ T:System.UInt32 ]

    32 位

    CHAR

    char

    [ T:System.Char ]

    使用 ANSI 修饰。

    WCHAR

    wchar_t

    [ T:System.Char ]

    使用 Unicode 修饰。

    LPSTR

    char*

    System:: String 或 System.Text:: StringBuilder

    使用 ANSI 修饰。

    LPCSTR

    Const char*

    System:: String 或 System.Text:: StringBuilder

    使用 ANSI 修饰。

    LPWSTR

    wchar_t*

    System:: String 或 System.Text:: StringBuilder

    使用 Unicode 修饰。

    LPCWSTR

    Const wchar_t*

    System:: String 或 System.Text:: StringBuilder

    使用 Unicode 修饰。

    FLOAT

    Float

    [ T:System.Single ]

    32 位

    DOUBLE

    Double

    [ T:System.Double ]

    64 位

  • 相关阅读:
    SpringBoot04-web
    springboot03-日志功能
    SpringBoot02-自动配置原理
    SpringBoot02
    SpringBoot01
    八大排序算法
    SpringSecurity04
    SpringSecurity03
    SpringSecurity02
    SpringSecurity01
  • 原文地址:https://www.cnblogs.com/answercard/p/5040714.html
Copyright © 2020-2023  润新知