Logo

CS.RIN.RU - Steam Underground Community

IRC: #cs.rin.ru at irc.rizon.net
It is currently Friday, 17 Apr 2015, 10:30

English | Русский




Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 7 posts ] 
Author Message

Post Post subject:    
Posted: Saturday, 21 Oct 2006, 18:37   
Super flooder Почетный графоман
User avatar
Joined: Monday, 17 Apr 2006, 03:33
Posts: 618
hm , its not working as you posted it . for me.

that how it worked for me.

Private Const STEAM_USING_FILESYSTEM As Integer = &H1
Private Const STEAM_USING_LOGGING As Integer = &H2
Private Const STEAM_USING_USERID As Integer = &H4
Private Const STEAM_USING_ACCOUNT As Integer = &H8
Private Const STEAM_USING_ALL As Integer = &HF

Private Enum eSteamError
    eSteamErrorNone = 0                                         'No Error
    eSteamErrorUnknown = 1
    eSteamErrorLibraryNotInitialized = 2
    eSteamErrorLibraryAlreadyInitialized = 3
    eSteamErrorConfig = 4
    eSteamErrorContentServerConnect = 5
    eSteamErrorBadHandle = 6
    eSteamErrorHandlesExhausted = 7
    eSteamErrorBadArg = 8
    eSteamErrorNotFound = 9
    eSteamErrorRead = 10
    eSteamErrorEOF = 11
    eSteamErrorSeek = 12
    eSteamErrorCannotWriteNonUserConfigFile = 13
    eSteamErrorCacheOpen = 14
    eSteamErrorCacheRead = 15
    eSteamErrorCacheCorrupted = 16
    eSteamErrorCacheWrite = 17
    eSteamErrorCacheSession = 18
    eSteamErrorCacheInternal = 19
    eSteamErrorCacheBadApp = 20
    eSteamErrorCacheVersion = 21
    eSteamErrorCacheBadFingerPrint = 22
    eSteamErrorNotFinishedProcessing = 23
    eSteamErrorNothingToDo = 24
    eSteamErrorCorruptEncryptedUserIDTicket = 25
    eSteamErrorSocketLibraryNotInitialized = 26
    eSteamErrorFailedToConnectToUserIDTicketValidationServer = 27
    eSteamErrorBadProtocolVersion = 28
    eSteamErrorReplayedUserIDTicketFromClient = 29
    eSteamErrorReceiveResultBufferTooSmall = 30
    eSteamErrorSendFailed = 31
    eSteamErrorReceiveFailed = 32
    eSteamErrorReplayedReplyFromUserIDTicketValidationServer = 33
    eSteamErrorBadSignatureFromUserIDTicketValidationServer = 34
    eSteamErrorValidationStalledSoAborted = 35
    eSteamErrorInvalidUserIDTicket = 36
    eSteamErrorClientLoginRateTooHigh = 37
    eSteamErrorClientWasNeverValidated = 38
    eSteamErrorInternalSendBufferTooSmall = 39
    eSteamErrorInternalReceiveBufferTooSmall = 40
    eSteamErrorUserTicketExpired = 41
    eSteamErrorCDKeyAlreadyInUseOnAnotherClient = 42
    eSteamErrorNotLoggedIn = 101
    eSteamErrorAlreadyExists = 102
    eSteamErrorAlreadySubscribed = 103
    eSteamErrorNotSubscribed = 104
    eSteamErrorAccessDenied = 105
    eSteamErrorFailedToCreateCacheFile = 106
    eSteamErrorCallStalledSoAborted = 107
    eSteamErrorEngineNotRunning = 108
    eSteamErrorEngineConnectionLost = 109
    eSteamErrorLoginFailed = 110
    eSteamErrorAccountPending = 111
    eSteamErrorCacheWasMissingRetry = 112
    eSteamErrorLocalTimeIncorrect = 113
    eSteamErrorNetwork = 200
End Enum

Private Enum EDetailedPlatformErrorType
    eNoDetailedErrorAvailable                               'No Error
    eStandardCerrno
    eWin32LastError
    eWinSockLastError
    eDetailedPlatformErrorCount
End Enum

Private Type TSteamError
    eSteamError As eSteamError                              'eSteamError code
    eDetailedErrorType As EDetailedPlatformErrorType        'Platform Error Type
    ErrCode As Long                                         'Error Code
    ErrDescription As String * 255                          'Additional Description
End Type

Private Type TSteamProgress
    intValid As Integer                                     'If 1 Percentage will be used
    intPercent As Integer                                   '0-100% (VAL)
    strProgress As String * 255                             'Additional Progress Info
End Type

'Platform API
Private Declare Function SteamStartEngine Lib "steam.dll" (ByRef SteamError As TSteamError) As Integer
Private Declare Function SteamStartup Lib "steam.dll" (ByVal intUsingMask As Integer, ByRef SteamError As TSteamError) As Integer

'Connection API
Private Declare Function SteamProcessCall Lib "steam.dll" (ByVal SteamHandle As Integer, ByRef pProgress As TSteamProgress, ByRef SteamError As TSteamError) As Integer

'Handle API
Private Declare Function SteamLogin Lib "steam.dll" (ByVal strUser As String, ByVal strPass As String, ByVal intSecure As Integer, ByRef SteamError As TSteamError) As Integer

Private Function ToBool(intNum As Integer) As Boolean
    If intNum = 1 Then ToBool = True
End Function

Private Function StartEngine() As Boolean
    Dim TError As TSteamError
   
    StartEngine = ToBool(SteamStartEngine(TError))
    If StartEngine = False Then
        MsgBox "Error (" & TError.eSteamError & "): " & TError.ErrDescription, vbOKOnly, "Steam Error: SteamStartEngine"
    End If
End Function

Private Function Startup() As Boolean
    Dim TError As TSteamError
   
    Startup = ToBool(SteamStartup(STEAM_USING_FILESYSTEM Or STEAM_USING_LOGGING Or STEAM_USING_USERID Or STEAM_USING_ACCOUNT, TError))
    If Startup = False Then
        MsgBox "Error (" & TError.eSteamError & "): " & TError.ErrDescription, vbOKOnly, "Steam Error: SteamStartup"
    End If
End Function

Private Function Login(strUser As String, strPass As String) As Boolean
    Dim TError As TSteamError
    Dim TProgress As TSteamProgress
    Dim intHandle As Integer
   
    intHandle = SteamLogin(strUser, strPass, 1, TError)
    Do While (SteamProcessCall(intHandle, TProgress, TError) = 0)
        DoEvents
    Loop
   
    If TError.eSteamError = eSteamErrorNone Then
        Login = True
    Else
        If Login = False Then MsgBox "Error (" & TError.eSteamError & "): " & TError.ErrDescription, vbOKOnly, "Steam Error: SteamLogin"
    End If
End Function



Top
 Profile  

Post Post subject:    
Posted: Saturday, 21 Oct 2006, 20:31   
Super flooder Почетный графоман
User avatar
Joined: Monday, 17 Apr 2006, 03:33
Posts: 618
i know , you can simply use this to startup the engine.

PrivateDeclare Function StartEngine Lib "Steam.dll" Alias "SteamStartEngine" () As Long
PrivateDeclare Function Startup Lib "Steam.dll" Alias "SteamStartup" (ByRef a1 As Long) As Long

Private Sub Startme_Click()
    Dim EngineH As Long
    Dim StartH As Long
    EngineH = StartEngine
    If EngineH = "0" Then
        'Unable to Start SteamEngine
        MsgBox "Unable to Start SteamEngine", vbOKOnly, "Error"
    Else
        StartH = Startup(EngineH)
        If StartH = "0" Then
            MsgBox "SteamStartup() failed: Steam Service cant Startup."
        Else
            MsgBox "SteamStartup() Returned 1: Steam service Startup complet."
        End If
    End If
End Sub


Top
 Profile  

Post Post subject:    
Posted: Sunday, 22 Oct 2006, 03:49   
User Редкий гость
Joined: Saturday, 22 Oct 2005, 21:48
Posts: 49
can u post the vb file b/c i am having troble compilng it :)


Top
 Profile  

Post Post subject:    
Posted: Sunday, 22 Oct 2006, 04:04   
Super flooder Почетный графоман
User avatar
Joined: Monday, 17 Apr 2006, 03:33
Posts: 618
fix it yourself.


Top
 Profile  

Post Post subject:    
Posted: Sunday, 22 Oct 2006, 07:33   
Administrator
User avatar
Joined: Tuesday, 15 Nov 2005, 19:09
Posts: 9592
Location: here
d4op wrote:
fix it yourself.


What a good and helpful suggestion.

sonic_8400, I think this is not meant to be compiled yet.

_________________
.


Top
 Profile  

Post Post subject:    
Posted: Sunday, 22 Oct 2006, 15:34   
Advanced forumer Завсегдатай
Joined: Monday, 24 Jul 2006, 14:42
Posts: 202
Location: .-^-.
G3N3R4T10N wrote:
you have to place that in a module. for the beginners here Public Function can be only referenced in a Module not in a Form. You have to put that in a module and call it outside like a Form or class to get it work. Read my posts above what u have todo first


thanks for the info ,
LOL i was trying to save it as a vb script file.
will try again to get this stuff to work as im curious.

_________________
Image
http://www.youtube.com/watch?v=5V65dtKOk2Y
Segata Sanshiro 'Play...until your fingers break!'


Top
 Profile  

Post Post subject:    
Posted: Sunday, 22 Oct 2006, 23:16   
User Редкий гость
Joined: Saturday, 22 Oct 2005, 21:48
Posts: 49
thnx G3N3R4T10N
i was put it as a form lol
now i get it has to be a module that help. :oops:


Top
 Profile  
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 7 posts ] 


Who is online

Users browsing this forum: No registered users and 6 guests


Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum




Powered by phpBB® Forum Software © phpBB Group