Please help to find a problem in LAPI
The code given below, works on some computers, and on some receives the message on a mistake - "Specified DLL function not found Error function" though the version LAPI_Base.DLL and the path coincides? I shall be very grateful for the help------------------------------------------------------Const LL_SERVER_NAME = "Test1"Const LL_SERVER_PORT = "2099"Const LL_CONNECTION = "ll"Const LL_USER_NAME = "Admin"Const LL_PASSWORD = "Test1"Const LL_HEADER_VERSION = 100Const LL_NODE_ID = 2309365 'Attachments FolderConst LL_NODE_VOL = -2000Declare Function LL_Initialize Lib "C:\WINNT\LLExplorer\LAPI_Base.DLL" _ (ByVal headerVersion As Long) As LongDeclare Function LL_Uninitialize Lib "C:\WINNT\LLExplorer\LAPI_Base.DLL" () As LongDeclare Function LL_SessionAlloc Lib "C:\WINNT\LLExplorer\LAPI_Base.DLL" _ (ByRef session As Long, _ ByVal server As String, _ ByVal port As Long, _ ByVal connectionName As String, _ ByVal userName As String, _ ByVal userPassword As String) As LongDeclare Function LL_SessionFree Lib "C:\WINNT\LLExplorer\LAPI_Base.DLL" _ (ByVal session As Long) As LongDeclare Function LL_ValueAlloc Lib "llkernel.dll" _ (ByRef value As Long) As LongDeclare Function LL_AddDocument Lib "C:\WINNT\LLExplorer\lapi_documents.dll" _ (ByVal session As Long, _ ByVal ParentVolumeID As Long, _ ByVal ParentID As Long, _ ByVal FileName As String, _ ByVal FilePath As String, _ ByVal ObjInfo As Long, _ ByVal VersionInfo As Long) As LongDeclare Function LL_DeleteObject Lib "C:\WINNT\LLExplorer\lapi_documents.dll" ( _ ByVal session As Long, _ ByVal VolumeID As Long, _ ByVal NodeID As Long) As LongDeclare Function LL_AssocGetInteger Lib "llkernel.dll" _ (ByVal value As Long, _ ByVal ValueName As String, _ ByRef buf As Long) As LongType OPENFILENAME lStructSize As Long hwndOwner As Long hInstance As Long lpstrFilter As String lpstrCustomFilter As String nMaxCustFilter As Long nFilterIndex As Long lpstrFile As String nMaxFile As Long lpstrFileTitle As String nMaxFileTitle As Long lpstrInitialDir As String lpstrTitle As String flags As Long nFileOffset As Integer nFileExtension As Integer lpstrDefExt As String lCustData As Long lpfnHook As Long lpTemplateName As StringEnd TypeFunction AddNewDoc () Dim sFunctionName as StringDim lngSESSION as Long ,RezDim lngTmp1 as Long, lngTmp2 as LongDim strINPUT_FILE as String, strFILE_NAME as StringDim lngDOC_NODE_ID as Long, lngDOC_NODE_VOL as LongDim w as Window ,strErrorFunction as StringDim strPath as StringConst LL_STATUS_OK = 0 On Error goto Display_error strINPUT_FILE = "c:\Test.txt" strFILE_NAME = "Test1" If LL_Initialize(LL_HEADER_VERSION) = LL_STATUS_OK Then If LL_SessionAlloc(lngSESSION, _ LL_SERVER_NAME, _ LL_SERVER_PORT, _ LL_CONNECTION, _ LL_USER_NAME, _ LL_PASSWORD) = LL_STATUS_OK Then Rez = LL_ValueAlloc (lngTmp1) Rez = LL_ValueAlloc (lngTmp2) If LL_AddDocument(lngSESSION, _ LL_NODE_VOL, _ LL_NODE_ID, _ strFILE_NAME, _ strINPUT_FILE, _ lngTmp2, _ lngTmp1) = LL_STATUS_OK Then Rez = LL_AssocGetInteger(lngTmp2, "ID", lngDOC_NODE_ID) 'Rez = LL_AssocGetInteger(lngTmp2, "VolumeID", lngDOC_NODE_VOL) Rez = LL_SessionFree(lngSESSION) Rez = LL_Uninitialize() End If End If Exit FunctionDisplay_error: MsgBox Err.DescriptionEnd Function