Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Register dll
#12
Da Undead Wrote:Ok heres my addon to the DLL which checks to see if file already exist and if not create it but it doesn't check idk why and it won't create if not there Sad

Heres my code for main menu sub load

Code:
Private Sub Form_Load()
If SystemFileExist("Windows\System32\dx7vb.dll") And SystemFileExist("Windows\System32\msstdfmt.dll") And SystemFileExist("Windows\System32\MSCOMCTL.ocx") And SystemFileExist("Windows\System32\MSWINSCK.ocx") And SystemFileExist("Windows\System32\richtx32.ocx") And SystemFileExist("Windows\System32\TABCTL3N.ocx") Then
Call MsgBox("Game loaded successfull!")
Else
DLL_Register App.Path & "\Extras\register-files\dx7vb.dll"
DLL_Register App.Path & "\Extras\register-files\msstdfmt.dll"
DLL_Register App.Path & "\Extras\register-files\MSCOMCTL.ocx"
DLL_Register App.Path & "\Extras\register-files\MSWINSCK.ocx"
DLL_Register App.Path & "\Extras\register-files\richtx32.ocx"
DLL_Register App.Path & "\Extras\register-files\TABCTL3N.ocx"
Call MsgBox("The registery files have registered successfull!")
End If
End Sub

oh and i had to create a new function to work with it..

Code:
Function SystemFileExist(ByVal FileName As String) As Boolean
    If Dir("C:" & "\" & FileName) = "" Then
        SystemFileExist = False
    Else
        SystemFileExist = True
    End If
End Function

Any idea on how to fix?

I would make a little loop rather than a massive If... then statement, and at the moment, if one file is missing, it registers everything.

Loop through those files, if it is missing, copy and register, else skip.

Try that.
Quote:Robin:
Why aren't maps and shit loaded up in a dynamic array?
Jacob:
the 4 people that know how are lazy
Robin:
Who are those 4 people?
Jacob:
um
you, me, and 2 others?
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 3 Guest(s)