Jump to content

Can't initiate ESET PROTECT API when using Windows library. Linux library working well. (ESET PROTECT 10.1 On-Prem)


Recommended Posts

Hi, 

Thanks for providing the API libraries of the ESET PROTECT and We use the API to do automation by Python. Our environment is ESET PROTECT On-Prem Version 10.1 (10.1.1291.0). However, we now encountered an issue that the Windows DLL of the API library cannot be initiated correctly.

The whole background is we are using Python to load the API libraries for the automation. Our code works well when using the Linux libraries, following the instructions of https://help.eset.com/protect_install/10.1/api/index.html to get the ".so" files loaded for the API initiate and request. All of them work perfectly.

Files
The ServerApi.dll file (as well as Protobuf.dll and Network.dll) is localed in your ESET PROTECT Server installation directory, by default:

C:\Program Files\ESET\RemoteAdministrator\Server
For Linux, the ServerApi.so file (as well as Protobuf.so and Network.so) is located here:

/opt/eset/RemoteAdministrator/Server

The below code we are using to load the Windows DLL, when the DLL is loaded successfully after we put an additional DLL file to the loading path (ProtobufNetworkMessages.dll) which is not mentioned on the website.


But when initiating the library, it still returns the value 2 not like the Linux library to returns a successful 0, and the login attempts failed due to the library was not correctly initiated.

After some investigation, we thought the error code could be the "ERA_UNSATISFIED_DEPENDENCY", but we don't know what we are missing. We tried to find out all the dependencies for the libraries and put them in the current script working location but nothing changed. The error 2 shows still.

lib = CDLL("ServerApi.dll")

# Define function types
era_init_lib = CFUNCTYPE(c_int)
era_deinit_lib = CFUNCTYPE(None)

# Get function pointers
init_lib = era_init_lib(CFUNCTYPE(c_int)(lib.era_init_lib))
deinit_lib = era_deinit_lib(CFUNCTYPE(c_int)(lib.era_deinit_lib))

# Initialize library
res = init_lib()

## result of the initialization 
# res = 2 (ERA_UNSATISFIED_DEPENDENCY 2)

Could anyone help us fix this issue and make the Windows DLL API library initiation successful?

Edited by PROTECTAPIUser
Link to comment
Share on other sites

  • PROTECTAPIUser changed the title to Can't initiate ESET PROTECT API when using Windows library. Linux library working well. (ESET PROTECT 10.1 On-Prem)
Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...