Any ideas what the problem could be?
Code: Select all
Prototype Prototype_ServerStart(nPort, *sRootDir, *RouterFunction, *FreeFunction, *ErrorFunction)
Prototype Prototype_ServerStop()
Global ServerStart.Prototype_ServerStart
Global ServerStop.Prototype_ServerStop
Global sLibName.s = "appserver.so"
CompilerSelect #PB_Compiler_OS
CompilerCase #PB_OS_Windows
sLibName = "appserver.dll"
CompilerEndSelect
Global server_lib = OpenLibrary(#PB_Any, sLibName)
If server_lib
ServerStart = GetFunction(server_lib, "ServerStart")
ServerStop = GetFunction(server_lib, "ServerStop")
Else
MessageRequester("Error", "Failed to load library", 0)
End
EndIf