Skip navigation.

Log in | Sign up

photo of Дмитрий Войтышин

LotusDomiNotes | ЛотусДомиНотес

Записки программиста Lotus Notes/Domino

Posts tagged with "download"

Работа со сканером напрямую из Lotus Notes

,

Работа со сканером напрямую из Lotus Notes c помощью бесплатной библиотеки EZTW32.DLL

Помещаем библиотеку в директорию приложений Lotus (по умолчанию c:\Lotus\Notes)

Создаем агента или кнопку.

Декларируем функции из библиотеки
Dim hDib As Long 
Dim hPal As Long
Dim nPixTypes As Long
REM Used by several calls to get handle to current window
Dim hWND As Long
Declare Function [B]TWAIN_AcquireNative[/B] Lib_
"EZTW32.DLL" (Byval hWndApp%, Byval wPixTypes%) As Integer
Declare Function [B]TWAIN_AcquireToClipboard[/B] Lib_
 "EZTW32.DLL" (Byval hwndApp%, Byval wPixTypes%) As Integer
Declare Function [B]TWAIN_AcquireToFilename[/B] Lib_
 "EZTW32.DLL" (Byval hwndApp%, Byval bmpFileName$) As Integer
Declare Function TWAIN_SelectImageSource Lib "EZTW32.DLL" (Byval hwndApp%) As Integer
Declare Function TWAIN_IsAvailable Lib "EZTW32.DLL" () As Integer
Declare Function TWAIN_EasyVersion Lib "EZTW32.DLL" () As Integer
Declare Function TWAIN_State Lib "EZTW32.DLL" () As Integer
Declare Function TWAIN_WriteNativeToFilename Lib_
 "EZTW32.DLL" (Byval hBitmap%, Byval bmpFileName$) As Integer
Declare Function TWAIN_DibDepth Lib "EZTW32.DLL" (Byval hdib%) As Integer
Declare Function TWAIN_DibWidth Lib "EZTW32.DLL" (Byval hdib%) As Integer
Declare Function TWAIN_DibHeight Lib "EZTW32.DLL" (Byval hdib%) As Integer
Declare Function TWAIN_DibNumColors Lib "EZTW32.DLL" (Byval hdib%) As Integer


Вариант 1: Сканирование образа в текущий документ
Sub Initialize
' Сканирует документ в буфер обмена и помещает из буфера в поле Body
Call TWAIN_AcquireToClipboard(0,0)
Dim workspace As New NotesUIWorkspace
Dim uidoc As NotesUIDocument
Set uidoc = workspace.CurrentDocument
Call uidoc.GotoField( "Body" )
Call uidoc.Paste
End Sub


Вариант 2: Сканирование образа и отправка по почте с присоедененным файлом
Sub Initialize
' Сканирует документ и отправляет по почте на указанный адрес
' адрес получателя
SendTo$="**@****.***.ua"
' имя сканируемого файла
FileName$="c:\scandoc.bmp"

Dim db As New NotesDatabase( "", "" )
Dim memo As NotesDocument
Dim rt As NotesRichTextItem
Dim o As NotesEmbeddedObject

Call TWAIN_AcquireToFilename(0,FileName$)

Call db.OpenMail
Set memo= New NotesDocument( db )
memo.Form="Memo"
memo.SendTo = SendTo$
memo.Subject = "новый отсканированный документ"
Set rt = New NotesRichTextItem( memo, "Body" )
Set o = rt.EmbedObject ( EMBED_ATTACHMENT, "", FileName$)
Call memo.Send( False )

End Sub

Библиотека и представленные примеры находятся в архиве.
ScanEZTWLotusNotes.zip 31Kb

Для использования в своем коде заимпортируйте или скопируйте код из текстовых файлов.

Утилита установки Replica ID для существующей базы : ANTRID

,

antrid_210.zip 2.183Mb

В оригинале была на сайте ИБМ http://www-1.ibm.com/support/support_doc/sims/s0034/file/2B4F20A6637EC737852567F90050E044-antrid_210.zip

Reference ID: 852567F90050E044
Number : 21223
Modified on: 2000/09/05
Product Information Product Area : Domino Designer; Notes
Product : Domino Designer 5.x; Notes Client 4.6x; Notes Client 4.5x
Topic : Tool/Utilities

Overview of Resource
Lotus ANTRID is a utility for System Administrators designed to assist them in manipulating the Replica ID of a Lotus Notes database. A new replica ID can be generated for a database, or the replica ID from one database can be copied into another database.

These functions are particularly useful when a database has been created as a new copy of another database, when it should have been created as a replica, or vice versa.

Lotus ANTRID was developed using the Lotus HiTest API. The utility is designed to run from a 32-bit Windows environment.

Antid version 2.10 has added functionality which allows one to select multiple databases and templates for modification of their Replica ID.

NOTE: The ANTRID utility has not been through any formal QE process and should be considered a beta release.

Instruction on How to Use
The installed product is run by executing the Antrid.exe.

Antrid 2.03 and later versions do not require the Notes program directory to be in the path. Earlier versions of the utility did require this, and if the Notes program was not in the Path, the following error occurred when running the ANTRID utility:

Run-time error '48': File not found: nthtapi.dll

Instructions to Install:

Unzip attached file Antrid_210.zip
Run the included Setup.exe

NOTE: During the install process the files noted below are installed onto the operating system if they are not already present. If they are present, the files are only overwritten with later versions. Prior to installing the utility it is advisable to make backup copies of any of the following files that exist on the system:





Download Opera, the fastest and most secure browser
January 2010
M T W T F S S
December 2009February 2010
1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31