zoukankan      html  css  js  c++  java
  • 隐藏Lotus Library中的代码

    转自:http://searchdomino.techtarget.com/tip/Hide-code-in-Script-Library

    Do you want protect your work? Create a button in a form, and copy the code below:

    Note: In the Script Library there are two types of code: 
    1 - not compiled (that I can see, contained in $ScriptLib field) 
    2 - compiled (that I can not see, contained in $ScriptLib_O filed)

    When I save a Script Library the content in $ScriptLib is Compiled in $ScriptLib_O field and the Lotus database use the last one.

    This tip deletes the field $ScriptLib and leaves the field $ScriptLib_O, so that the library is available to use but I can't see the code. 




    'Declarations (button) Const NOTE_CLASS_FILTER = &H0200 Declare Private Function WinNSFDbOpen Lib "nnotes" Alias "NSFDbOpen"
    ( Byval dbname As Lmbcs String, dbhandle As Long ) As Integer Declare Private Function WinNSFDbGetModifiedNoteTable Lib "nnotes"
    Alias "NSFDbGetModifiedNoteTable"( Byval dbhandle As Long, Byval
    classmask As Integer, Byval startdate As Double, endate As Double,
    returntablehandle As Long ) As Integer Declare Private Function WinIDEntries Lib "nnotes"Alias "IDEntries"(
    Byval tablehandle As Long ) As Long Declare Private Function WinIDScan Lib "nnotes" Alias "IDScan"( Byval
    tablehandle As Long, Byval firstbool As Integer, returnid As Long) As Integer Declare Private Function WinOSMemFree Lib "nnotes" Alias "OSMemFree"
    (Byval handle As Long) As Integer Declare Private Function WinNSFDbClose Lib "nnotes" Alias "NSFDbClose"
    ( Byval dbhandle As Long) As Integer Declare Private Sub WinTimeConstruct Lib "nnotes" Alias "TimeConstruct"
    ( Byval adate As Long, Byval atime As Long, datetime As Double) 'on Click Dim session As New NotesSession Dim db As NotesDatabase Dim dbhandle As Long Dim path As String Dim begindate As Double Dim enddate As Double Dim idtablehandle As Long Dim noteid As Long Dim count As Integer Dim note As Variant Set db = session.currentDatabase If db.server = "" Then path = db.filepath Else path = db.server & "!!" & db.filepath End If Call winNSFDBOpen(path, dbhandle) Call winTimeConstruct( &hFFFFFFFF, &hFFFFFFFF, begindate ) On Error Goto errSub Call winNSFDbGetModifiedNoteTable( dbhandle, NOTE_CLASS_FILTER, begindate , enddate , idtablehandle ) If winIDEntries( idtablehandle) <>0 Then If winIDScan( idtablehandle, True, noteid ) Then Do While winIDScan( idtablehandle, False, noteid ) Set note = db.getDocumentByID(Hex$( noteId)) If Not note Is Nothing Then If note.getItemValue( "$Flags")(0) Like "*[s]*"Then If note.hasItem("$ScriptLib") Then Call note.RemoveItem("$ScriptLib") Call note.save(True, False, True) End If End If End If Loop End If End If exitSub: If idtablehandle <> 0 Then Call winOsMemFree( idtablehandle) End If If dbhandle <> 0 Then Call winNSFDbClose( dbhandle) End If Exit Sub errSub: Resume exitSub
  • 相关阅读:
    IOS UIwebview 背景色调整
    文件的创建 判断是否存在文件 读取 写入
    IOS 关于ipad iphone5s崩溃 解决
    iOS tabbar 控制器基本使用
    iOS 关于流媒体 的初级认识与使用
    总结 IOS 7 内存管理
    iOS 应用首次开启 出现引导页面
    IOS UItableView 滚动到底 触发事件
    IOS 应用中从竖屏模式强制转换为横屏模式
    iOS 定位系统 知识
  • 原文地址:https://www.cnblogs.com/blackbean/p/2561230.html
Copyright © 2011-2022 走看看