Declare Private Function W32_NSFDbOpen Lib "nnotes" Alias "NSFDbOpen" (Byval PathName As Lmbcs String, hDB As Long) As Integer
Declare Private Function W32_DesignRefresh Lib "nnotes" Alias "DesignRefresh" (Byval ServerName As Lmbcs String, Byval hDB As Long, Byval dwFlags As Long, Byval abortCheck As Integer, Byval messageProc As Integer) As Integer
Declare Private Function W32_NSFDbClose Lib "nnotes" Alias "NSFDbClose" (Byval hDB As Long) As Integer
Sub RefreshDesign(destPath As String)
Dim rc As Integer, hDb As Long
Call AddLog("Оновлення на сервері: " & destPath & " ...")
rc = W32_NSFDbOpen(destPath, hDb) ' Open the db in the API and get a handle to the open db
If rc <> 0 Then
Call AddLog("Не удаётся открыть БД - Error Code " & Cstr(rc))
Else
rc = W32_DesignRefresh("", hDb, 0, 0, 0)
If rc <> 0 Then
Call AddLog("Не удалось обновить БД - Error Code " & Cstr(rc))
End If
Call W32_NSFDbClose(hDb)
End If
End Sub