Java 类com.sun.jna.ptr.ShortByReference 实例源码

项目:domino-jna    文件:MessageQueue.java   
/**
 * Retrieves a message from a message queue, provided the queue is not in a QUIT state.
 * The message will be stored in the buffer specified in the Buffer argument.<br>
 * Note: The error code {@link INotesErrorConstants#ERR_MQ_QUITTING} indicates that the
 * message queue is in the QUIT state, denoting that applications that are reading
 * the message queue should terminate. For instance, a server addin's message queue
 * will be placed in the QUIT state when a "tell &lt;addin&gt; quit" command is input at the console.

 * @param buffer buffer used to read data
 * @param waitForMessage if the specified message queue is empty, wait for a message to appear in the queue. The timeout argument specifies the amount of time to wait for a message.
 * @param timeoutMillis if waitForMessage is set to <code>true</code>, the number of milliseconds to wait for a message before timing out. Specify 0 to wait forever. If the message queue goes into a QUIT state before the Timeout expires, MQGet will return immediately.
 * @param offset the offset in the buffer where to start writing the message
 * @param length the max length of the message in the buffer
 * @return Number of bytes written to the buffer
 */
public int get(Memory buffer, boolean waitForMessage, int timeoutMillis, int offset, int length) {
    checkHandle();

    if (length > NotesConstants.MQ_MAX_MSGSIZE) {
        throw new IllegalArgumentException("Max size for the buffer is "+NotesConstants.MQ_MAX_MSGSIZE+" bytes. You specified one with "+length+" bytes.");
    }

    ShortByReference retMsgLength = new ShortByReference();

    short result = NotesNativeAPI.get().MQGet(m_queue, buffer, (short) (length & 0xffff),
            waitForMessage ? NotesConstants.MQ_WAIT_FOR_MSG : 0,
                    timeoutMillis, retMsgLength);
    NotesErrorUtils.checkResult(result);
    return retMsgLength.getValue();
}
项目:domino-jna    文件:NotesCollection.java   
/**
 * Returns the currently active collation
 * 
 * @return collation
 */
private short getCollation() {
    checkHandle();
    short result;
    ShortByReference retCollationNum = new ShortByReference();

    if (PlatformUtils.is64Bit()) {
        result = NotesNativeAPI64.get().NIFGetCollation(m_hCollection64, retCollationNum);
    }
    else {
        result = NotesNativeAPI32.get().NIFGetCollation(m_hCollection32, retCollationNum);
    }
    NotesErrorUtils.checkResult(result);
    return retCollationNum.getValue();
}
项目:domino-jna    文件:NotesNamingUtils.java   
/**
 * This function converts a distinguished name in abbreviated format to canonical format.
 * A fully distinguished name is in canonical format - it contains all possible naming components.
 * The abbreviated format of a distinguished name removes the labels from the naming components.
 * 
 * @param name name to convert
 * @param templateName name to be used when the input name is in common name format
 * @return canonical name
 */
public static String toCanonicalName(String name, String templateName) {
    if (name==null)
        return null;
    if (name.length()==0)
        return name;

    String cacheKey = name + ((templateName!=null && templateName.length()>0) ? ("|" + templateName) : "");
    String abbrName = m_nameCanonicalCache.get(cacheKey);
    if (abbrName!=null) {
        return abbrName;
    }

    Memory templateNameMem = templateName==null ? null : NotesStringUtils.toLMBCS(templateName, true); //used when abbrName is only a common name
    Memory inNameMem = NotesStringUtils.toLMBCS(name, true);
    Memory outNameMem = new Memory(NotesConstants.MAXUSERNAME);
    ShortByReference outLength = new ShortByReference();

    short result = NotesNativeAPI.get().DNCanonicalize(0, templateNameMem, inNameMem, outNameMem, NotesConstants.MAXUSERNAME, outLength);
    NotesErrorUtils.checkResult(result);

    String sOutName = NotesStringUtils.fromLMBCS(outNameMem, (int) (outLength.getValue() & 0xffff));

    m_nameCanonicalCache.put(cacheKey, sOutName);

    return sOutName;
}
项目:domino-jna    文件:NotesNamingUtils.java   
/**
 * This function converts a distinguished name in canonical format to abbreviated format.
 * A fully distinguished name is in canonical format - it contains all possible naming components.
 * The abbreviated format of a distinguished name removes the labels from the naming components.
 * 
 * @param name name to convert
 * @param templateName name to be used when the input name is in common name format
 * @return abbreviated name
 */
public static String toAbbreviatedName(String name, String templateName) {
    if (name==null)
        return null;
    if (name.length()==0)
        return name;

    String cacheKey = name + ((templateName!=null && templateName.length()>0) ? ("|" + templateName) : "");
    String abbrName = m_nameAbbrCache.get(cacheKey);
    if (abbrName!=null) {
        return abbrName;
    }

    Memory templateNameMem = templateName==null || templateName.length()==0 ? null : NotesStringUtils.toLMBCS(templateName, true); //used when abbrName is only a common name
    Memory inNameMem = NotesStringUtils.toLMBCS(name, true);
    Memory outNameMem = new Memory(NotesConstants.MAXUSERNAME);
    ShortByReference outLength = new ShortByReference();

    short result = NotesNativeAPI.get().DNAbbreviate(0, templateNameMem, inNameMem, outNameMem, NotesConstants.MAXUSERNAME, outLength);
    NotesErrorUtils.checkResult(result);

    String sOutName = NotesStringUtils.fromLMBCS(outNameMem, (int) (outLength.getValue() & 0xffff));

    m_nameAbbrCache.put(cacheKey, sOutName);

    return sOutName;
}
项目:domino-jna    文件:INotesNativeAPI64.java   
public short ListAllocate(
short ListEntries,
short TextSize,
int fPrefixDataType,
LongByReference rethList,
Memory retpList,
ShortByReference retListSize);
项目:domino-jna    文件:INotesNativeAPI64.java   
public short NSFItemInfo(
long note_handle,
Memory item_name,
short  name_len,
NotesBlockIdStruct retbhItem,
ShortByReference retDataType,
NotesBlockIdStruct retbhValue,
IntByReference retValueLength);
项目:domino-jna    文件:INotesNativeAPI64.java   
public short NSFItemInfoNext(
long  note_handle,
NotesBlockIdStruct.ByValue NextItem,
Memory item_name,
short  name_len,
NotesBlockIdStruct retbhItem,
ShortByReference retDataType,
NotesBlockIdStruct retbhValue,
IntByReference retValueLength);
项目:domino-jna    文件:INotesNativeAPI64.java   
public short NSFItemInfoPrev(
long  note_handle,
NotesBlockIdStruct.ByValue  CurrItem,
Memory item_name,
short  name_len,
NotesBlockIdStruct item_blockid_ptr,
ShortByReference value_type_ptr,
NotesBlockIdStruct value_blockid_ptr,
IntByReference value_len_ptr);
项目:domino-jna    文件:INotesNativeAPI64.java   
public short NSFDbGetNoteInfoExt(
long  hDB,
int  NoteID,
NotesOriginatorIdStruct retNoteOID,
NotesTimeDateStruct retModified,
ShortByReference retNoteClass,
NotesTimeDateStruct retAddedToFile,
ShortByReference retResponseCount,
IntByReference retParentNoteID);
项目:domino-jna    文件:NotesNativeAPI64.java   
public native short NSFComputeEvaluate(
long  hCompute,
long hNote,
LongByReference rethResult,
ShortByReference retResultLength,
IntByReference retNoteMatchesFormula,
IntByReference retNoteShouldBeDeleted,
IntByReference retNoteModified);
项目:domino-jna    文件:INotesNativeAPI64.java   
public short NSFDbGetObjectSize(
long hDB,
int ObjectID,
short ObjectType,
IntByReference retSize,
ShortByReference retClass,
ShortByReference retPrivileges);
项目:domino-jna    文件:INotesNativeAPI64.java   
public short NIFReadEntriesExt(long hCollection,
NotesCollectionPositionStruct CollectionPos,
         short SkipNavigator, int SkipCount,
         short ReturnNavigator, int ReturnCount, int ReturnMask,
         NotesTimeDateStruct DiffTime, long DiffIDTable, int ColumnNumber, int Flags,
         LongByReference rethBuffer, ShortByReference retBufferLength,
         IntByReference retNumEntriesSkipped, IntByReference retNumEntriesReturned,
         ShortByReference retSignalFlags, NotesTimeDateStruct retDiffTime,
         NotesTimeDateStruct retModifiedTime, IntByReference retSequence);
项目:domino-jna    文件:INotesNativeAPI64.java   
public long NIFFindByKeyExtended3 (long hCollection,
Memory keyBuffer, int findFlags,
int returnFlags,
NotesCollectionPositionStruct retIndexPos,
IntByReference retNumMatches, ShortByReference retSignalFlags,
LongByReference rethBuffer, IntByReference retSequence,
NotesCallbacks.NIFFindByKeyProc NIFFindByKeyCallback, NIFFindByKeyContextStruct Ctx);
项目:domino-jna    文件:NotesNativeAPI64.java   
public native short ACLLookupAccess(
long hACL,
Pointer pNamesList,
ShortByReference retAccessLevel,
Memory retPrivileges,
ShortByReference retAccessFlags,
LongByReference rethPrivNames);
项目:domino-jna    文件:INotesNativeAPI64.java   
public short NSFFormulaCompile(
Memory FormulaName,
short FormulaNameLength,
Memory FormulaText,
short  FormulaTextLength,
LongByReference rethFormula,
ShortByReference retFormulaLength,
ShortByReference retCompileError,
ShortByReference retCompileErrorLine,
ShortByReference retCompileErrorColumn,
ShortByReference retCompileErrorOffset,
ShortByReference retCompileErrorLength);
项目:domino-jna    文件:INotesNativeAPI64.java   
public short NSFComputeEvaluate(
long  hCompute,
long hNote,
LongByReference rethResult,
ShortByReference retResultLength,
IntByReference retNoteMatchesFormula,
IntByReference retNoteShouldBeDeleted,
IntByReference retNoteModified);
项目:domino-jna    文件:INotesNativeAPI64.java   
public short ECLUserTrustSigner ( long hCESCtx, 
short ECLType,
short bSessionOnly,
short wCapabilities,
short wCapabilities2,
ShortByReference retwCurrentCapabilities,
ShortByReference retwCurrentCapabilities2);
项目:domino-jna    文件:INotesNativeAPI64.java   
public short ACLLookupAccess(
long hACL,
Pointer pNamesList,
ShortByReference retAccessLevel,
Memory retPrivileges,
ShortByReference retAccessFlags,
LongByReference rethPrivNames);
项目:domino-jna    文件:NotesNativeAPI32.java   
public native short ListAllocate(
short ListEntries,
short TextSize,
int fPrefixDataType,
IntByReference rethList,
Memory retpList,
ShortByReference retListSize);
项目:domino-jna    文件:NotesNativeAPI32.java   
public native short ListAddEntry(
int hList,
int fPrefixDataType,
ShortByReference pListSize,
short EntryNumber,
Memory Text,
short TextSize);
项目:domino-jna    文件:NotesNativeAPI32.java   
public native short NSFItemInfo(
int  note_handle,
Memory item_name,
short name_len,
NotesBlockIdStruct retbhItem,
ShortByReference retDataType,
NotesBlockIdStruct retbhValue,
IntByReference retValueLength);
项目:domino-jna    文件:NotesNativeAPI32.java   
public native short NSFItemInfoNext(
int  note_handle,
NotesBlockIdStruct.ByValue NextItem,
Memory item_name,
short name_len,
NotesBlockIdStruct retbhItem,
ShortByReference retDataType,
NotesBlockIdStruct retbhValue,
IntByReference retValueLength);
项目:domino-jna    文件:NotesNativeAPI32.java   
public native short NSFItemInfoPrev(
int  note_handle,
NotesBlockIdStruct.ByValue  CurrItem,
Memory item_name,
short  name_len,
NotesBlockIdStruct item_blockid_ptr,
ShortByReference value_type_ptr,
NotesBlockIdStruct value_blockid_ptr,
IntByReference value_len_ptr);
项目:domino-jna    文件:NotesNativeAPI32.java   
public native void NSFItemQueryEx(
int  note_handle,
NotesBlockIdStruct.ByValue item_bid,
Memory item_name,
short  return_buf_len,
ShortByReference name_len_ptr,
ShortByReference item_flags_ptr,
ShortByReference value_datatype_ptr,
NotesBlockIdStruct value_bid_ptr,
IntByReference value_len_ptr,
ByteByReference retSeqByte,
ByteByReference retDupItemID);
项目:domino-jna    文件:NotesNativeAPI32.java   
public native short NSFDbGetNoteInfoExt(
int  hDB,
int  NoteID,
NotesOriginatorIdStruct retNoteOID,
NotesTimeDateStruct retModified,
ShortByReference retNoteClass,
NotesTimeDateStruct retAddedToFile,
ShortByReference retResponseCount,
IntByReference retParentNoteID);
项目:domino-jna    文件:NotesNativeAPI32.java   
public native short NSFDbGetObjectSize(
int hDB,
int ObjectID,
short ObjectType,
IntByReference retSize,
ShortByReference retClass,
ShortByReference retPrivileges);
项目:domino-jna    文件:NotesNativeAPI32.java   
public native short NIFReadEntriesExt(int hCollection,
NotesCollectionPositionStruct CollectionPos,
short SkipNavigator, int SkipCount,
short ReturnNavigator, int ReturnCount, int ReturnMask,
NotesTimeDateStruct DiffTime, int DiffIDTable, int ColumnNumber, int Flags,
IntByReference rethBuffer, ShortByReference retBufferLength,
IntByReference retNumEntriesSkipped, IntByReference retNumEntriesReturned,
ShortByReference retSignalFlags, NotesTimeDateStruct retDiffTime,
NotesTimeDateStruct retModifiedTime, IntByReference retSequence);
项目:domino-jna    文件:NotesNativeAPI32.java   
public native short NIFFindByKeyExtended2 (int hCollection, Memory keyBuffer,
int findFlags,
int returnFlags,
NotesCollectionPositionStruct retIndexPos,
IntByReference retNumMatches,
ShortByReference retSignalFlags,
IntByReference rethBuffer,
IntByReference retSequence);
项目:domino-jna    文件:NotesNativeAPI32.java   
public native short NIFFindByKeyExtended3 (int hCollection,
Memory keyBuffer, int findFlags,
int returnFlags,
NotesCollectionPositionStruct retIndexPos,
IntByReference retNumMatches, ShortByReference retSignalFlags,
IntByReference rethBuffer, IntByReference retSequence,
NotesCallbacks.NIFFindByKeyProc NIFFindByKeyCallback, NIFFindByKeyContextStruct Ctx);
项目:domino-jna    文件:NotesNativeAPI32.java   
public native short NSFFormulaCompile(
Memory FormulaName,
short FormulaNameLength,
Memory FormulaText,
short  FormulaTextLength,
IntByReference rethFormula,
ShortByReference retFormulaLength,
ShortByReference retCompileError,
ShortByReference retCompileErrorLine,
ShortByReference retCompileErrorColumn,
ShortByReference retCompileErrorOffset,
ShortByReference retCompileErrorLength);
项目:domino-jna    文件:NotesNativeAPI32.java   
public native short NSFComputeEvaluate(
int  hCompute,
int hNote,
IntByReference rethResult,
ShortByReference retResultLength,
IntByReference retNoteMatchesFormula,
IntByReference retNoteShouldBeDeleted,
IntByReference retNoteModified);
项目:domino-jna    文件:NotesNativeAPI32.java   
public native short ECLUserTrustSigner ( int hCESCtx, 
short ECLType,
short bSessionOnly,
short wCapabilities,
short wCapabilities2,
ShortByReference retwCurrentCapabilities,
ShortByReference retwCurrentCapabilities2);
项目:domino-jna    文件:NotesNativeAPI32.java   
public native short ACLLookupAccess(
int hACL,
Pointer pNamesList,
ShortByReference retAccessLevel,
Memory retPrivileges,
ShortByReference retAccessFlags,
IntByReference rethPrivNames);
项目:domino-jna    文件:NotesNativeAPI64.java   
public native short NSFFormulaCompile(
Memory FormulaName,
short FormulaNameLength,
Memory FormulaText,
short  FormulaTextLength,
LongByReference rethFormula,
ShortByReference retFormulaLength,
ShortByReference retCompileError,
ShortByReference retCompileErrorLine,
ShortByReference retCompileErrorColumn,
ShortByReference retCompileErrorOffset,
ShortByReference retCompileErrorLength);
项目:domino-jna    文件:INotesNativeAPI32.java   
public short ListAllocate(
short ListEntries,
short TextSize,
int fPrefixDataType,
IntByReference rethList,
Memory retpList,
ShortByReference retListSize);
项目:domino-jna    文件:INotesNativeAPI32.java   
public short ListAddEntry(
int hList,
int fPrefixDataType,
ShortByReference pListSize,
short EntryNumber,
Memory Text,
short TextSize);
项目:domino-jna    文件:INotesNativeAPI32.java   
public short NSFItemInfo(
int  note_handle,
Memory item_name,
short name_len,
NotesBlockIdStruct retbhItem,
ShortByReference retDataType,
NotesBlockIdStruct retbhValue,
IntByReference retValueLength);
项目:domino-jna    文件:INotesNativeAPI32.java   
public short NSFItemInfoNext(
int  note_handle,
NotesBlockIdStruct.ByValue NextItem,
Memory item_name,
short name_len,
NotesBlockIdStruct retbhItem,
ShortByReference retDataType,
NotesBlockIdStruct retbhValue,
IntByReference retValueLength);
项目:domino-jna    文件:INotesNativeAPI32.java   
public short NSFItemInfoPrev(
int  note_handle,
NotesBlockIdStruct.ByValue  CurrItem,
Memory item_name,
short  name_len,
NotesBlockIdStruct item_blockid_ptr,
ShortByReference value_type_ptr,
NotesBlockIdStruct value_blockid_ptr,
IntByReference value_len_ptr);
项目:domino-jna    文件:INotesNativeAPI32.java   
public void NSFItemQueryEx(
int  note_handle,
NotesBlockIdStruct.ByValue item_bid,
Memory item_name,
short  return_buf_len,
ShortByReference name_len_ptr,
ShortByReference item_flags_ptr,
ShortByReference value_datatype_ptr,
NotesBlockIdStruct value_bid_ptr,
IntByReference value_len_ptr,
ByteByReference retSeqByte,
ByteByReference retDupItemID);