// Sample1.wdl
// uses Sample1.DLL, you must compile Sample1.dpr first
plugindir = "."; // where to find the dll, this is current directory
include ; // gives us access to the ShowMsg_Var function defined in DLL_Debug
dllfunction FindDirectX(); // use this function, defined in DLL_Library
dllfunction OpenWebPage(URLStr); // use this function, defined in DLL_Library
text DirectX
{
pos_x = 400;
pos_y = 200;
flags = center_x;
string = "You have DirectX 9, Hit ESC to quit";
strings = 1;
}
var video_screen = 2; // default to window mode
var video_mode = 7; // default to 800x600
var video_depth = 32; // default to 32 bit depth
function main()
{
if FindDirectX() < 9
{
ShowMsg_Var("DirectX 9 is required to run this program","",mtError,mbOk);
sys_exit("");
}
if ShowMsg_Var("Are you connected to the Internet?","",mtConfirmation,mbYes+mbNo) == mrYes
{
if OpenWebPage("http://www.coniserver.net/ubbthreads/ubbthreads.php") {
ShowMsg_Var("could not access web site","",mtError,mbOk);
sys_exit("");
}
}
else
{
ShowMsg_Var("Try running the program when you are connected to the Internet","",mtInformation,mbOk);
}
DirectX.visible = On;
while key_esc == 0
{
wait(1);
}
}