Package com.sun.jna

Examples of com.sun.jna.WString


  }
 
  /** 获取最近一次失败操作的错误描述 */
  public String getLastErrorDesc()
  {
    WString desc = HPSocket.SDK.HP_Client_GetLastErrorDesc(socketObj);
    return desc != null ? desc.toString() : null;
  }
View Full Code Here


  /**
  * 启动通信组件
  */
  public boolean start(String pszBindAddress, boolean bAsyncConnect)
  {
    WString pwszBindAddress = pszBindAddress != null ? new WString(pszBindAddress) : null;
    return HPSocket.SDK.HP_Agent_Start(socketObj, pwszBindAddress, bAsyncConnect);
  }
View Full Code Here

  /**
  * 连接服务器
  */
  public boolean connect(String pszRemoteAddress, short usPort, NativeLongByReference pdwConnID)
  {
    WString pwszRemoteAddress = pszRemoteAddress != null ? new WString(pszRemoteAddress) : null;
    return HPSocket.SDK.HP_Agent_Connect(socketObj, pwszRemoteAddress, usPort, pdwConnID);
  }
View Full Code Here

  }
 
  /** 获取最近一次失败操作的错误描述 */
  public String getLastErrorDesc()
  {
    WString desc = HPSocket.SDK.HP_Agent_GetLastErrorDesc(socketObj);
    return desc != null ? desc.toString() : null;
  }
View Full Code Here

    {
        if (!hasShell32) return;
        try
        {
            final long errorCode =
                SetCurrentProcessExplicitAppUserModelID(new WString(appId))
                    .longValue();
            if (errorCode != 0)
                LOG.error("Unable to set appUserModelID. Error code " +
                    errorCode);
        }
View Full Code Here

                    if (value == null)
                        return null;
                    if (value instanceof String[]) {
                        return new StringArray((String[])value, true);
                    }
                    return new WString(value.toString());
                }
                public Object fromNative(Object value, FromNativeContext context) {
                    if (value == null)
                        return null;
                    return value.toString();
View Full Code Here

    do {
      repeat = false;
      memory = new Memory(nLength);
      IntByReference lpnSize = new IntByReference();
      boolean succeded = Advapi32.INSTANCE.GetFileSecurity(new WString(
          fileName), infoType, memory, nLength, lpnSize);

      if (!succeded) {
        int lastError = Kernel32.INSTANCE.GetLastError();
        memory.clear();
View Full Code Here

TOP

Related Classes of com.sun.jna.WString

Copyright © 2018 www.massapicom. 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.