RTD Server ?? ???? ????? ????? ??????? ??? ?????? ?????? ?? Excel

?????? ????????? ?????? ?????????
???? ???????: 284883 - ??? ???????? ???? ????? ????? ??? ???????.
????? ???? | ?? ????

?? ??? ??????

???????

??? ??????? ?????? ?????? ?? Microsoft Office Excel ?? ???? RealTimeData (RTD) ? ?? ????? ??????? ???????:
???? ?????? ????? ??????? 'servername.classname' ?? ??????. ?? ???? ?? ?? ???? Microsoft Excel ?????? ????? ????? ??????
????? ?????? RTD ??? ???? ??? ????? ????? ????? ?????? ??????? ??? ?????? ?????? ?? Excel.

?????

?? ????? ??? ??????? ??? ??? ?????? RTD EXE ActiveX ?? ?????? MultiUse ???????? ? ??? ????? ??????? ???????? ActiveX EXE ?? Visual Basic. ???? ?????? EXE ActiveX ?? MultiUse ??? ???????. ?? ???? ?????? ?????? Excel ?????? ?????? RTD. ??? ??? ????? Excel ??? ???? RTD ? Excel ???????? ????? Server RTD ServerStart ?????? ?? ?????? ??? ???? ?? ??????? ???? ?????? ?? Excel. ????? ??? ???? ?????? ?? Excel ?? ?????? ??? ?????? RTD ? ?????? ?????? ?????? ???? ?? ??????? ????? ?????? ?????. ??? ?????? ????? ???? ?? ??????? ????? ?????? ?????.

????

??????? ???????? SingleUse ?????? ActiveX EXE ???? ??? ???? ??????? RTD ?? Excel. ??? ????? ActiveX EXE ???????? ??? SingleUse ?? ??? ???? ?? Excel ?? ???? RTD ?????? ?? ??????.

??? ?? ??? ???????? DLL ActiveX ????? RTD ????? ?? EXE ActiveX. ????? DLL ActiveX ?? ??? ????? ??????? ?????? ??? ?????? ????? ??? ???? ?? Excel ?????? ???? ?????? RTD ?????? ??.

??????? ????

????? ????? ????? ???????

  1. ?? Visual Basic? EXE ActiveX ????? ????? ???????.
  2. ?? ??????? ??????? ???? "?????".
  3. ??? ????? ?????? Microsoft Excel 2002 ?? ???? ??? ?????.
  4. ?? ??????? ??????? ???? ??? ????? ?????1.
  5. ????? "??? ???????" ??? "RTDExe" ?? ???? ??? ?????.
  6. ?? ?????? ??????? ??? ??? ?????? ??????? Class1 "????".
  7. ?? ?????? ???????? ???????? ??????? ??? ??? ?????? ???????.
    Option Explicit
    
    Implements IRtdServer  'Interface allows Excel to contact this RealTimeData server.
    
    Dim nCounter As Long
    
    Private Function IRtdServer_ConnectData(ByVal TopicID As Long, Strings() As Variant, _
       GetNewValues As Boolean) As Variant
        IRtdServer_ConnectData = nCounter
    End Function
    
    Private Sub IRtdServer_DisconnectData(ByVal TopicID As Long)
        nCounter = 0
    End Sub
    
    Private Function IRtdServer_Heartbeat() As Long
        'Do nothing.
    End Function
    
    Private Function IRtdServer_RefreshData(TopicCount As Long) As Variant()
        Dim aUpdates(0 To 1, 0 To 0) As Variant
        nCounter = nCounter + 1
        aUpdates(0, 0) = 0   'For this sample, we only refresh topic id = 0
        aUpdates(1, 0) = nCounter
        TopicCount = 1
        IRtdServer_RefreshData = aUpdates
    End Function
    
    Private Function IRtdServer_ServerStart(ByVal CallbackObject As Excel.IRTDUpdateEvent) As Long
        nCounter = 0
        Set oCallBack = CallbackObject
        g_TimerID = SetTimer(0, 0, TIMER_INTERVAL, AddressOf TimerCallback)
        If g_TimerID > 0 Then IRtdServer_ServerStart = 1       'Any value <1 indicates failure.
    End Function
    
    Private Sub IRtdServer_ServerTerminate()
        KillTimer 0, g_TimerID
    End Sub
    					
  8. ?? ??????? ??????? ??? ????? ?????? ???????.
  9. ?? ?????? ???????? ???????? ??????? ??? ???? ????? ?????.
    Public Declare Function SetTimer Lib "user32" (ByVal hWnd As Long, ByVal nIDEvent As Long, _
       ByVal uElapse As Long, ByVal lpTimerFunc As Long) As Long
    Public Declare Function KillTimer Lib "user32" (ByVal hWnd As Long, ByVal nIDEvent As Long) As Long
    
    Public Const TIMER_INTERVAL = 5000
    Public oCallBack As Excel.IRTDUpdateEvent
    Public g_TimerID As Long
    
    Public Sub TimerCallback(ByVal hWnd As Long, ByVal uMsg As Long, ByVal idEvent As Long, _
       ByVal dwTime As Long)
        oCallBack.UpdateNotify
    End Sub
    					
  10. ?? ??????? ???? ???? ??? ???? RTDExe.exe ????? ??????.
  11. ?? Excel? ?? ?????? ???? ????.
  12. ?? ?????? A1? ???? ?????? ???????:
    =RTD("RTDExe.Example",,"X")
    ???? ?????? ?????? 0.
  13. ??? ??? ?????? ?????? ??????? A1 ???? ??? ?? ??? ????? ?????? Excel ???????.
  14. ??? ????? ???? ??? ?? Excel ?? ?? ?????? ???? ????.
  15. ?? ?????? A1? ???? ?????? ???????:
    =RTD("RTDExe.Example",,"X")
    ???? ?????? ?????? 0.
  16. ????? ????? ?????? ?? A1 ?????? ?????? ?? Excel. ??? ?? ?????? ?? A1 ?????? ?????. ??? ????? ?????? ?????? ?????? (15 ????? ?? ?????????) ? ?????? ????? ?? Excel ???? ????? ????? ???????:
    ???? ?????? ????? ??????? 'rtdexe.example' ?? ??????. ?? ???? ?? ?? ???? Microsoft Excel ?????? ????? ????? ??????
    ??? ???? ??? ? ????? ?????? ??????? ?????? ????? ?? Excel ??????? ??????? ?? ??????. ??? ???? ??? ????? ????? ?????? ?????? ?????? ?? Excel ?? ???? ??? ??????? ??? ?????? ??? ?????? ?????? ???? ?????.
?????? ??????? ???? ?? ????? ??? ????? ????? ??? ??????? ?? Visual Basic ????? ????? Instancing ??? ???? ??? SingleUse ??? ?? ?? ?????? ????? ???? RTD.

?????

????? ?? ?????????? ???? ??? ??? ??????? ?????? ?????? ?? "????? ??????? ?? Microsoft:
285339????? ????? ???? RealTimeData ?? Excel

???????

???? ???????: 284883 - ????? ??? ??????: 27/???? ??????/1428 - ??????: 3.2
????? ???
  • Microsoft Office Excel 2007
  • Microsoft Office Excel 2003
  • Microsoft Excel 2002 Standard Edition
  • Microsoft Visual Basic 6.0 Professional Edition
????? ??????: 
kbmt kberrmsg kbpending kbprb KB284883 KbMtar
????? ????
???: ??? ????? ??? ?????? ???????? ?????? ????? ???? ????? ?????????? ????? ?? ????????? ?????? ????. ???? ???? ?????????? ???? ?? ???????? ???????? ?????? ????????? ????? ????????? ???????? ????? ???????? ?????? ?? ?????? ??? ?? ???????? ???????? ?? ????? ??????? ?????? ??? ??????? ?????? ??. ?????? ?? ???? ??? ??????? ???????? ????? ?? ???? ????? ?????? ??? ????? ??? ????? ??????? ?? ????? ?? ?????? ??? ??? ??????? ??????? ?? ????? ????? ????? ????? ?????. ?? ????? ???? ?????????? ??????? ??? ????? ?? ??????? ?? ????? ?????? ?? ??? ????? ?? ????? ??????? ?? ???????? ?? ??? ???????. ???? ???? ?????????? ???????? ??? ????? ?????? ??????? ??????
???? ??? ????? ??????? ?????? ??????????284883

????? ???????

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com