⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 itemid.java

📁 一个开源的组件
💻 JAVA
字号:
/*
 * SHITEMID.java
 *
 * Created on 13. M鋜z 2007, 16:49
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package org.xvolks.jnative.misc.basicStructures;

import org.xvolks.jnative.exceptions.NativeException;
import org.xvolks.jnative.misc.basicStructures.AbstractBasicData;
import org.xvolks.jnative.pointers.Pointer;
import org.xvolks.jnative.pointers.memory.MemoryBlockFactory;

/**
 *
 * @author osthop
 */
public class ITEMID extends AbstractBasicData<ITEMID> {
    
    /*
    typedef struct _SHITEMID {
        USHORT cb;
        BYTE abID[1];
    } SHITEMID;
     */
    public ITEMID() {
        super(null);
        try {
            createPointer();
        } catch(Exception e) {
            e.printStackTrace();
        }
    }
    
    public Pointer createPointer() throws NativeException {
        pointer = new Pointer(MemoryBlockFactory.createMemoryBlock(getSizeOf()));
        return pointer;
    }
    
    public int getSizeOf() {
        return 5;
    }
    public ITEMID getValueFromPointer() throws NativeException {
        return this;
    }
    
    public String getSpecialPath() throws NativeException {
        return ""+pointer.getAsInt(0);
    }
    
    public int getID() throws NativeException {
        return pointer.getAsByte(4);
    }
    
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -