Examples of TCHAR


Examples of org.eclipse.swt.internal.win32.TCHAR

    int lpWindowName = 0;
    int hHeap = Extension.GetProcessHeap();

    if (className != null)
    {
      TCHAR buffer = new TCHAR(0, className, true);
      int byteCount = buffer.length() * TCHAR.sizeof;
      lpClassName = Extension.HeapAlloc(hHeap, Extension.HEAP_ZERO_MEMORY, byteCount);
      Extension.MoveMemory(lpClassName, buffer, byteCount);
    }
    if (windowName != null)
    {
      TCHAR buffer = new TCHAR(0, windowName, true);
      int byteCount = buffer.length() * TCHAR.sizeof;
      lpWindowName = Extension.HeapAlloc(hHeap, Extension.HEAP_ZERO_MEMORY, byteCount);
      Extension.MoveMemory(lpWindowName, buffer, byteCount);
    }

    try
View Full Code Here

Examples of org.eclipse.swt.internal.win32.TCHAR

    return Extension.FlashWindowEx(flashInfo);
  }

  public static String getClassName(int handle)
  {
    TCHAR buffer = new TCHAR(0, 128);
    Extension.GetClassName(handle, buffer, buffer.length());
    return buffer.toString(0, buffer.strlen());
  }
View Full Code Here

Examples of org.eclipse.swt.internal.win32.TCHAR

   *
   * @return window class name.
   */
  public static String getWindowClassName(int handle)
  {
    TCHAR buffer = new TCHAR(0, 128);
    Extension.GetClassName(handle, buffer, buffer.length());
    return buffer.toString(0, buffer.strlen());
  }
View Full Code Here

Examples of org.eclipse.swt.internal.win32.TCHAR

  public static String getWindowText(int handle)
  {
    int length = Extension.GetWindowTextLength(handle);
    if (length == 0) return "";
    /* Use the character encoding for the default locale */
    TCHAR buffer = new TCHAR(0, length + 1);
    Extension.GetWindowText(handle, buffer, length + 1);
    return buffer.toString(0, length);
  }
View Full Code Here

Examples of org.eclipse.swt.internal.win32.TCHAR

  public static boolean setWindowText(int handle, String text)
  {
    if (text == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
    /* Use the character encoding for the default locale */
    TCHAR buffer = new TCHAR(0, text, true);
    return Extension.SetWindowText(handle, buffer);
  }
View Full Code Here

Examples of org.eclipse.swt.internal.win32.TCHAR

  public static final native boolean InitiateShutdownW(char[] info, int time, boolean force,
      boolean reboot);

  public static boolean InitiateShutdown(String info, int time, boolean force, boolean reboot)
  {
    TCHAR lpszInfo = new TCHAR(0, info, true);
    if (IsUnicode)
    {
      return InitiateShutdownW(lpszInfo.chars, time, force, reboot);
    }
    else
View Full Code Here

Examples of org.eclipse.swt.internal.win32.TCHAR

  public static final native int ExtractAssociatedIconW(int hint, char[] info, int index);

  public static int ExtractAssociatedIcon(int hint, String iconPath, int index)
  {
    TCHAR lpszInfo = new TCHAR(0, iconPath, true);
    if (IsUnicode)
    {
      return ExtractAssociatedIconW(hint, lpszInfo.chars, index);
    }
    else
View Full Code Here

Examples of org.eclipse.swt.internal.win32.TCHAR

  public static final native byte[] InvokePI_S(byte[] arg0, int arg1, int returnSize,
      int func) throws Exception;

  public static final int /* long */LoadLibrary(String libFileName)
  {
    TCHAR lpLibFileName = new TCHAR(0, libFileName, true);
    return LoadLibrary(lpLibFileName);
  }
View Full Code Here

Examples of org.eclipse.swt.internal.win32.TCHAR

  if (extension.length () == 0) return ""; //$NON-NLS-1$
 
  if (extension.charAt (0) != '.') extension = "." + extension; //$NON-NLS-1$

  /* Use the character encoding for the default locale */
  TCHAR extensionKey = new TCHAR(0, extension, true);
  String result = getKeyValue(extensionKey);
  if (result != null) {
    // look for "<programID>\NotInsertable"
    TCHAR notInsertableKey = new TCHAR(0, result+"\\NotInsertable", true); //$NON-NLS-1$
    if (getKeyExists(notInsertableKey)) return ""; //$NON-NLS-1$
    // look for "<programID>\Insertable"
    TCHAR insertableKey = new TCHAR(0, result+"\\Insertable", true); //$NON-NLS-1$
    if (getKeyExists(insertableKey)) return result;
    // look for "<programID>\protocol\StdFileEditing\server"
    TCHAR serverKey = new TCHAR(0, result+"\\protocol\\StdFileEditing\\server", true); //$NON-NLS-1$
    if (getKeyExists(serverKey)) return result;
  }
 
  return ""; //$NON-NLS-1$
}
View Full Code Here

Examples of org.eclipse.swt.internal.win32.TCHAR

    int length = lpcbData [0] / TCHAR.sizeof;
    if (length == 0) {
      result = "";
    } else {
      /* Use the character encoding for the default locale */
      TCHAR lpData = new TCHAR (0, length);
      if (OS.RegQueryValueEx (phkResult [0], null, 0, null, lpData, lpcbData) == 0) {
        length = Math.max(0, lpData.length () - 1);
        result = lpData.toString (0, length);
      }
    }
  }
  if (phkResult [0] != 0) OS.RegCloseKey (phkResult [0]);
  return result;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.