/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package de.nplusc.izc.tools.WinToolz;

import com.sun.jna.Pointer;
import com.sun.jna.Structure;
import com.sun.jna.WString;
import com.sun.jna.platform.win32.WinDef;
import com.sun.jna.platform.win32.WinNT;
import com.sun.jna.platform.win32.WinReg;
import java.util.Arrays;
import java.util.List;

/**
 *
 * @author LH
 */
    public class SHELLEXECUTEINFO extends Structure
    {
        /*
  DWORD     cbSize;
  ULONG     fMask;
  HWND      hwnd;
  LPCTSTR   lpVerb;
  LPCTSTR   lpFile;
  LPCTSTR   lpParameters;
  LPCTSTR   lpDirectory;
  int       nShow;
  HINSTANCE hInstApp;
  LPVOID    lpIDList;
  LPCTSTR   lpClass;
  HKEY      hkeyClass;
  DWORD     dwHotKey;
  union {
    HANDLE hIcon;
    HANDLE hMonitor;
  } DUMMYUNIONNAME;
  HANDLE    hProcess;
         */

        public int cbSize = size();
        public int fMask;
        public WinDef.HWND hwnd;
        public WString lpVerb;
        public WString lpFile;
        public WString lpParameters;
        public WString lpDirectory;
        public int nShow;
        public WinDef.HINSTANCE hInstApp;
        public Pointer lpIDList;
        public WString lpClass;
        public WinReg.HKEY hKeyClass;
        public int dwHotKey;

        /*
         * Actually:
         * union {
         *  HANDLE hIcon;
         *  HANDLE hMonitor;
         * } DUMMYUNIONNAME;
         */
        public WinNT.HANDLE hMonitor;
        public WinNT.HANDLE hProcess;
        
        
        @Override
        protected List getFieldOrder() {
        return Arrays.asList(new String[] { "cbSize", "fMask", "hwnd",
        "lpVerb","lpFile","lpParameters","lpDirectory","nShow","hInstApp",
        "lpIDList","lpClass","hKeyClass","dwHotKey","hMonitor","hProcess"});
        
        }
    }