src/jdk.jpackage/windows/native/msiwrapper/Resources.h
branchJDK-8200758-branch
changeset 57909 c7de06ed4b54
parent 57413 45c74e654794
equal deleted inserted replaced
57908:9a005146bc1c 57909:c7de06ed4b54
    39  *      }
    39  *      }
    40  */
    40  */
    41 
    41 
    42 class Resource {
    42 class Resource {
    43 public:
    43 public:
    44     // name and type can be specified by string id, by integer id (RT_* constants or MAKEINTRESOURCE)
    44     // name and type can be specified by string id,
    45     Resource(LPCWSTR name, LPCWSTR type, HINSTANCE module = SysInfo::getCurrentModuleHandle());
    45     // by integer id (RT_* constants or MAKEINTRESOURCE)
    46     Resource(UINT id, LPCWSTR type, HINSTANCE module = SysInfo::getCurrentModuleHandle());
    46     Resource(LPCWSTR name, LPCWSTR type,
       
    47             HINSTANCE module = SysInfo::getCurrentModuleHandle());
       
    48     Resource(UINT id, LPCWSTR type,
       
    49             HINSTANCE module = SysInfo::getCurrentModuleHandle());
    47 
    50 
    48     bool available() const;
    51     bool available() const;
    49 
    52 
    50     // all this methods throw exception if the resource is not available
    53     // all this methods throw exception if the resource is not available
    51     unsigned size() const;
    54     unsigned size() const;
    59     // returns the resource as byte array
    62     // returns the resource as byte array
    60     ByteArray binary() const;
    63     ByteArray binary() const;
    61 
    64 
    62 private:
    65 private:
    63     std::wstring nameStr;
    66     std::wstring nameStr;
    64     LPCWSTR namePtr;    // can be integer (MAKEINTRESOURCE) value or point to nameStr.c_str()
    67     LPCWSTR namePtr;    // can be integer value or point to nameStr.c_str()
    65     std::wstring typeStr;
    68     std::wstring typeStr;
    66     LPCWSTR typePtr;    // can be integer (MAKEINTRESOURCE) value or point to nameStr.c_str()
    69     LPCWSTR typePtr;    // can be integer value or point to nameStr.c_str()
    67     HINSTANCE instance;
    70     HINSTANCE instance;
    68 
    71 
    69     void init(LPCWSTR name, LPCWSTR type, HINSTANCE module);
    72     void init(LPCWSTR name, LPCWSTR type, HINSTANCE module);
    70 
    73 
    71     // generates error message
    74     // generates error message