Здравствуйте, есть код на FreeBasic хотел бы перевести его,в PureBasic, но к сожалению не хватает знаний.Помогите пожалуйста.
Код:
#pragma msbitfields=1 #If Not __FB_OUT_DLL__ #Error "Compile as Dll (-dll) or use JellyFish Pro Editor..." #endif #Include "windows.bi" Type TickSet hWndMain As hwnd iWindowsMessage As Integer iTimeOut As Long iCountMax As Long End Type Function Ticker CDECL Alias "Ticker" (ByVal iPtr As TickSet Ptr) As Long Export Dim Reply As LRESULT, iCount As Long = 0, Parm As TickSet = *iPtr While IsWindow(Parm.hWndMain) <> 0 Reply = SendMessage (Parm.hWndMain, Parm.iWindowsMessage, iCount, 0) iCount += 1 If iCount = Parm.iCountMax Then Exit While Sleep (Parm.iTimeOut, 1) Wend Return iCount End Function Function TickerPtr CDECL Alias "TickerPtr" () As Long Export Return cast(Long, @Ticker) End Function
Заранее спасибо.
Отредактировано Arei (29.11.2011 00:18:21)