Function to see if user needs Glu32.dll
| 678 | |
| 679 | // Function to see if user needs Glu32.dll |
| 680 | bool ProcessGlu32DLL(void) { |
| 681 | // First, see if Glu32.xyz is even in the directory |
| 682 | if (_access("Glu32.xyz", 0) == -1) |
| 683 | return FALSE; |
| 684 | |
| 685 | // Second, see if user's system already has access to a Glu32.dll |
| 686 | HINSTANCE dll_handle; |
| 687 | dll_handle = LoadLibrary("Glu32.dll"); |
| 688 | if (dll_handle != NULL) { |
| 689 | FreeLibrary(dll_handle); |
| 690 | DeleteFile("Glu32.xyz"); |
| 691 | return FALSE; |
| 692 | } |
| 693 | |
| 694 | // Ok, user doesn't have it, so rename ours |
| 695 | rename("Glu32.xyz", "Glu32.dll"); |
| 696 | return TRUE; |
| 697 | } |
| 698 | |
| 699 | // Checks to see if a new version text file exists (such a file should |
| 700 | // only be created if the user does a manual patch update). If one is |