Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

[VB] - Force Newest Version


KDawg08
 Share

Recommended Posts

Send the major version, minor version and revision version (either define your own or use App.Major, App.Minor, App.Revision, or something similar)

So, in the client make a new packet or use an existing one:

> Sub Send_VersionInfo(ByVal Major As Long, ByVal Minor As Long, ByVal Revision As Long)
>   Dim Packet As String
>
>   Packet = "VERSIONINFO" & SEP_CHAR & CStr(Major) & SEP_CHAR & CStr(Minor) & SEP_CHAR & CStr(Revision) & SEP_CHAR & END_CHAR
>
>   Call SendData(Packet) ' The sub might be wrong…
> End Sub

Then use:

> Call Send_VersionInfo(app.major, app.minor, app.revision)

The place where you use it depends on your client initialisation sequence…

For the server you'll need to add a new case in the handledata module.

> Case "versioninfo"
>         If (app.major > CLng(Parse(1)) And app.minor > CLng(Parse(2)) And app.revision > CLng(Parse(3))) Then
>             Call AlertMsg("Your version is out-dated. See http://www.mywebsite.com to download a new version of the client.")
>             ' Disconnect…
>         End If

This is rough though, but you should get the idea.

Regards,
  Godlord.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...