28 lines
635 B
C
Raw Normal View History

2024-12-19 23:21:45 +02:00
#include "shared.h"
int test_StopServerInstance()
2024-12-19 23:21:45 +02:00
{
typedef int (*StopServerInstanceFn)(char *);
StopServerInstanceFn StopServerInstance = (StopServerInstanceFn)load_function("StopServerInstance");
if (!StopServerInstance)
{
fprintf(stderr, "Failed to find StopServerInstance function\n");
return 0;
2024-12-19 23:21:45 +02:00
}
char *serverName = "TestServer";
int result = StopServerInstance(serverName);
if (result == 0)
{
printf("StopServerInstance: SUCCESS\n");
}
else
{
printf("StopServerInstance: FAILED (result = %d)\n", result);
return 0;
2024-12-19 23:21:45 +02:00
}
return 1;
2024-12-19 23:21:45 +02:00
}