WScilex.c File Reference

#include <Windows.h>
#include "../../../../../../libs/DetectFramework2/DetectFramework.h"
#include "../../../../../../libs/GetWindowsVersion/GetWindowsVersion.h"

Include dependency graph for WScilex.c:

Go to the source code of this file.

Typedefs

typedef int(*) MYPROC (HINSTANCE, HINSTANCE, LPSTR szCmdLine, int iCmdShow)

Functions

int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR szCmdLine, int iCmdShow)


Typedef Documentation

typedef int(*) MYPROC(HINSTANCE, HINSTANCE,LPSTR szCmdLine, int iCmdShow)

Definition at line 8 of file WScilex.c.


Function Documentation

int WINAPI WinMain ( HINSTANCE  hInstance,
HINSTANCE  hPrevInstance,
LPSTR  szCmdLine,
int  iCmdShow 
)

Definition at line 10 of file WScilex.c.

References DetectFrameWorkNET2(), FALSE, GetWindowsVersion(), hinstLib, NULL, OS_WIN32_WINDOWS_2000, TRUE, and Windows_Main().

00011 {
00012         HINSTANCE hinstLib; 
00013         MYPROC Windows_Main; 
00014         BOOL fFreeResult, fRunTimeLinkSuccess = FALSE; 
00015 
00016         if (!DetectFrameWorkNET2())
00017         {
00018                 MessageBox(NULL,"The .NET Framework 2.0 is not installed","Warning",MB_ICONWARNING);
00019                 return -1;
00020         }
00021 
00022         if (GetWindowsVersion()<OS_WIN32_WINDOWS_2000)
00023         {
00024                 MessageBox(NULL,"Scilab requires Windows 2000 or more.","Warning",MB_ICONWARNING);
00025                 return -1;
00026         }
00027 
00028         hinstLib = LoadLibrary(TEXT("Libscilab"));      
00029         if (hinstLib != NULL) 
00030         { 
00031                 Windows_Main = (MYPROC) GetProcAddress(hinstLib, TEXT("Windows_Main")); 
00032 
00033                 if (NULL != Windows_Main) 
00034                 {
00035                         fRunTimeLinkSuccess = TRUE;
00036                         (Windows_Main)(hInstance,hPrevInstance,szCmdLine, iCmdShow);
00037                 }
00038                 fFreeResult = FreeLibrary(hinstLib); 
00039         } 
00040 
00041         if (! fRunTimeLinkSuccess) 
00042         {
00043                 MessageBox(NULL,"Wscilex.exe : Libscilab.dll not found !","Warning",MB_ICONERROR); 
00044                 exit(1);
00045         }
00046         else exit(0);
00047 
00048     return 0;
00049 }

Here is the call graph for this function:


Generated on Sun Mar 4 16:00:27 2007 for Scilab [trunk] by  doxygen 1.5.1