简体   繁体   中英

Mapping C/C++ Data Type In C++/CLI

I have to start the development of the C++/CLI Wrapper around Existing Static C Library. I Encountered number of enums, typedefs, and structs in the C Library. Since I am new to C++/CLI I wanted to know what data type can used in C++/CLI.

typedef struct _GC_DEVICE {
    TCHAR *ptszDevicePath;

    /// The human-readable name of the device.
    /// This member is never NULL.
    TCHAR *ptszFriendlyName;

    //Device Type
    GC_DEVICE_TYPE DeviceType;

    /// USB related information about the camera.
    GC_USB_DEVICE_INFO USBDevInfo;

} GC_DEVICE,*PGC_DEVICE;

enum GC_DEVICE_TYPE {
    GC_USB_DEVICE,
    GC_IP_DEVICE,
    GC_DEPTH_SENSING_DEVICE,
};

typedef struct _GC_USB_DEVICE_INFO {
    /// The vendor ID.
    WORD    wVendor;
    /// The product ID.
    WORD    wProduct;
    /// The product revision number.
    WORD    wRelease;
} GC_USB_DEVICE_INFO, *PGC_USB_DEVICE_INFO;

Can Any Body Help Me Converting these declaration in C++/CLI?

ref class GCDeviceWrapper
{
public:
    // operations with the GC_DEVICE instance

private:
    GC_DEVICE device_;
};

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM