Join the 80,000 other DTN customers who enjoy the fastest, most reliable data available. There is no better value than DTN!

(Move your cursor to this area to pause scrolling)




"With HUGE volume on AAPL and RIMM for 2 days, everyone in a trading room was whining about freezes, crashes and lag with *******, RealTick, TS and Cyber. InvestorRT with IQFeed was rock solid. I mean SOLID!" - Comment from Public IRC Chat
"DTN has never given me problems. It is incredibly stable. In fact I've occasionally lost the data feed from Interactive Brokers, but still been able to trade because I'm getting good data from DTN." - Comment from Leighton
"I've never had DTN go out on me since switching. ******* would go down a couple times every month when I was using them." - Comment from Bryce in AL.
"I was with ******* for 4 years at $230 a month, this is a huge savings for me, GOD BLESS YOU PEOPLE," - Comment from T.S. via Email
"IQFeed version 4 is a real screamer compared to anything else I have seen." - Comment from Tom
"Thanks for following up with me. You guys do a great job in tech support." - Comment from Phelps
"IQ feed works very well, does not have all of the normal interruptions I have grown used to on *******" - Comment from Mark
"I am keeping IQFeed, much better reliabilty than *******. I may refer a few other people in the office to switch as well." - Comment from Don
"Its working FABULOUSLY for me!! Holy cow...there has been so much I've been missing lately, and with this feed and Linnsoft software...I'm in the game now." - Comment from Chris R.
"I had always used ******* but for the past 2 weeks have been trying DTN IQFeed. Customer support has been extraordinary. They call just to make sure your problem hasn't recurred." - Comment from Public Forum
Home  Search  Register  Login  Blogs Recent Posts

Information on Various DTN Products:
DTN IQFeed | DTN ProphetX | DTN Ag | NxCore
Follow DTN_IQFeed on Twitter
DTN.IQ/IQFeed on Twitter
DTN News and Analysis on Twitter
»Forums Index »IQFeed Developer »IQFeed Developer Support »We don't need RegisterClientApp anymore
Author Topic: We don't need RegisterClientApp anymore (3 messages, Page 1 of 1)

CBrauer
-Interested User-
Posts: 32
Joined: Aug 18, 2004


Posted: Feb 13, 2010 06:11 PM          Msg. 1 of 3
In the last email announcing the new release it said that IQ32.dll was depreciated and would eventually be removed. I thought to myself "If that's so, how do we do RegisterClientApp?" The answer is we don't. It is not needed anymore.

Here is a console application built with Visual Studio 2008. It is in C#:

using System;
using System.IO;
using System.Net.Sockets;

namespace Fundamentals {
class Fundamentals {
StreamReader streamReader;
NetworkStream IQStream;
TcpClient socket;

private void Run() {
Int32 portNumber = 5009;
try {
socket = new TcpClient("localhost", portNumber);
Console.WriteLine("socket has been initialized.");
} catch (Exception ex) {
Console.WriteLine("Error: " + ex.Message);
return;
}

DownloadFundamentals("IBM");
Console.WriteLine("Done.");
}

private void DownloadFundamentals(string sSymbol) {
try {
IQStream = socket.GetStream();
streamReader = new StreamReader(IQStream);

string quoteString = "w" + sSymbol + "\n\r";
byte[] outputBuffer = System.Text.Encoding.ASCII.GetBytes(quoteString);
socket.GetStream().Write(outputBuffer, 0, outputBuffer.Length);
socket.GetStream().Flush();

string data = streamReader.ReadLine();
while (data.IndexOf("!ENDMSG!") < 0) {
if (data.Length > 0) {
if (data.IndexOf("..SYNTAX_ERROR..") < 0) {
if (data[0] == 'F') {
Console.WriteLine("Data: " + data);
return;
}
} else {
Console.WriteLine("Error: " + data);
}
}
data = streamReader.ReadLine();
}
return;
} catch (IOException ex) {
Console.WriteLine("DownloadFundamentals error: " + ex.Message);
}
return;
}

static void Main(string[] args) {
Fundamentals go = new Fundamentals();
go.Run();
Console.ReadKey();
}
}
}

I hope this helps.

Charles

Charles Brauer
CBrauer@CypressPoint.com

DTN_Steve_S
-DTN Guru-
Posts: 2034
Joined: Nov 21, 2005


Posted: Feb 15, 2010 10:45 AM          Msg. 2 of 3
Hello Charles, you are correct that with the current version of IQFeed, as long as the feed is already running, it is not absolutely required to call RegisterClientApp anymore. However, as I'm sure you are aware, the code posted above will not launch the feed. Furthermore, the feed must be initialized with a productID and version number (by any of the current methods) upon initial launch before it will allow any connections for data retrieval.

We also recommend that before any client connects to the feed, that you first register with the feed (even if it is already running and not absolutely required). Doing so will reduce the likelyhood that your app will break with future versions of the feed.

CBrauer
-Interested User-
Posts: 32
Joined: Aug 18, 2004


Posted: Feb 15, 2010 11:20 AM          Msg. 3 of 3
I'm aware that my example code does not launch the feed. I do that elsewhere. You said that IQ32.dll is depreciated. In the past I did:

[DllImport("C:\\Program Files\\DTN\\IQFeed\\IQ32.dll")]
public static extern int RegisterClientApp(
IntPtr hClient,
string szProductName,
string szProductKey,
string szProductVersion);

and I used RegisterClientApp. As I mentioned before, if IQ32.dll is no longer available (in future releases), and if you say that we still need to do RegisterClientApp, then how do we do that.

Some sample code would be greatly appreciated.

Thanks

Charles

Charles Brauer
CBrauer@CypressPoint.com
 

 

Time: Tue January 16, 2018 1:27 AM CFBB v1.2.0 15 ms.
© AderSoftware 2002-2003