October 28th, 2003, 8:06 pm
Hey All,I have a question that can't be answered by WAPI or the API Dev Group because the respond that they do not support .net.So, I have been working with writing a .net bloomberg data server which uses remoting to distribute blp data to our office (yes we have the data distribution license).the deal here is that I want my VB.NET app to do a BlpData.Subscribe and have Blp Hit back to a function everytime data gets updated.The problem, is that although everything *seems* to be coded correctly, my Blp_Data function (Or the status one) never get called.NE Suggestions?Here's The Code:<pre type="man I wish you guys had a [PRE] fake html tag so that my code would remain indented and easy to view.... well, thats just too bad>Public Class BpsConsole Private Shared WithEvents Blp As New BLP_DATA_CTRLLib.BlpData <STAThread()> _ Shared Sub Main() Try ' RemotingConfiguration.Configure("BPService.config") ' Console.WriteLine("BPService is initialized and running. Hit enter to stop and exit.") Console.WriteLine("Subscribing") Blp.ActivateRealtime = True Blp.Subscribe("IBM Equity", 1, "PX_LAST") Blp.Flush() Console.WriteLine("Did subscribe") Console.ReadLine() Catch ex As Exception Console.WriteLine("Exception while starting BPS. Error Message: " + ex.Message) Console.WriteLine("Stack Trace: " + ex.StackTrace) Console.WriteLine("BPService initialization failed. Hit enter to exit.") Console.ReadLine() End Try End Sub Shared Sub Blp_Data(ByRef Security As Object, ByRef cookie As Integer, ByRef Fields As Object, ByRef Data As Object, ByRef status As Integer) Handles Blp.Data Console.WriteLine("[Blp_Data]") End Sub Private Shared Sub Blp_Status(ByRef Status As Integer, ByRef SubStatus As Integer, ByRef StatusDescription As Object) Handles Blp.Status Console.WriteLine("[Blp_Status]") End SubEnd Class[/PRE]