I cause function With ++ from library DLL
public class Test { public native long Connect (); static{ System.loadLibrary("spsdksw"); } public static void main(String[] args) { // TODO Auto-generated method stub Test t = new Test (); System.out.println(t.Connect()); } } but the compiler produces an error:
Exception in thread "main" java.lang.UnsatisfiedLinkError: Test.Connect()J at Test.GetLibVersion(Native Method) at Test.main(Test.java:13)
What could be the reason ?
Page from the library description.
Connect method of the ISpRecordClientW interface
Establishes a connection with a recording program.
Syntax
[Delphi] function Connect(Flags: Integer; const Username: WideString; const Password: WideString): Integer; [C++] long Connect(long Flags, BSTR Username, BSTR Password); Description
The method establishes a connection with the recording program. You need to call it before it becomes possible to call other methods of the interface. To disconnect and free occupied resources, call the Disconnect method.
Options
Flags Currently not used and must contain 0. Username Username. Currently not used and must contain an empty string. Password User password. Currently not used and must contain an empty string. Return value
If the method is successful and the connection is established, then the return value is SPR_S_OK. If the connection has already been made, then the return value is SPR_S_FALSE.
If the connection fails, the method returns an error code:
SPR_E_CLIENTSOCKETOPEN SPR_E_SPRECORDPRGNOTFOUND SPR_E_ACCESS_DENIED SPR_E_CONNECT_LIMIT SPR_E_SOCKETOPEN SPR_E_LIBVERSION SPR_E_USERNAMEORPASSWORD Remarks
In order for the connection to be established, select the Settings item in the main menu of the administration shell, select the Program tab in the General tab, select the Program tab in the General tab and select the Allow connection of the notification library check box.
Allowed no more than 1024 simultaneous connections including connections interface ISpRecordChannelClientW.