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
  • 相关阅读:
    PHP面试:实现动态获取函数参数的方法
    PHP面试:什么是类的多态性,请写出一个例子
    php相关操作
    客户端app支付宝登录接口
    商品分类设计
    Git连接远程服务器
    iptables/mysql设置指定主机访问指定端口
    CMake安装grpc生成gRPCTargets.cmake文件
    Linux下Springboot解决`APR based Apache Tomcat Native library`提示
    java双重检测或枚举类实现线程安全单例(懒汉模式)
  • 原文地址:https://www.cnblogs.com/blackbean/p/2561230.html
Copyright © 2011-2022 走看看