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)




"Very impressed with the quality of your feed - ******* is a real donkey in comparison." - Comment from A.C. via Email
"I noticed that ******* quotes locked up shortly after the interest rate announcement yesterday while yours stayed stable." - Comment from Ron in Utah
"Everything is working great with the API. I love it." - Comment from Calvin
"I am a hedge fund manager here. It’s funny, I have a Bloomberg terminal and a Bridge feed, but I still like having my DTN feed!" - Comment from Feras
"This is an excellent value, the system is generous (allowing for 500 stocks) and stable (and really is tick-by-tick), and the support is fantastic." - Comment from Shirin via Email
"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
"You are either overstaffed or people just don't have problems with your feed because customer support always answers the phone quickly." - Comment from Jay via Email
"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.
"If you want customer service that answers the phone, your best bet is IQFeed. I cannot stop praising them or their technical support. They are always there for you, and they are quick. I have used ****** too but the best value is IQFeed." - Comment from Public Forum
"Just a quick one to say I'm very impressed so far :) The documentation for developers is excellent and I've quickly managed to get an app written to do historical downloads. The system is very robust and pretty quick considering the extent of data that's available. The support guys have been very helpful too, in combination with the forums it's been plain sailing so far!" - Comment from Adam
Home  Search  Register  Login  Recent Posts

Information on DTN's Industries:
DTN Oil & Gas | DTN Trading | DTN Agriculture | DTN Weather
Follow DTNMarkets on Twitter
DTN.IQ/IQFeed on Twitter
DTN News and Analysis on Twitter
»Forums Index »Archive (2017 and earlier) »IQFeed Developer Support »No callback after RegisterClientApp in console_stream (VC++) example
Author Topic: No callback after RegisterClientApp in console_stream (VC++) example (4 messages, Page 1 of 1)

Dennis
-Interested User-
Posts: 19
Joined: Oct 8, 2004


Posted: Oct 8, 2004 10:30 AM          Msg. 1 of 4
I cannot get the while(!goodToGo) loop to release in the VC++ console_stream example.
Early testing indicates that the callback, which is intended to set goodToGo, never occurs.
Has anyone else experienced this problem?

Test program (C++) and output follows:
----------------------------------------

// callback_test.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"

bool goodToGo = false;

void __stdcall callback(int x, int y) // Receives information from iqfeed.
{
cout << "callback from IQFeed...\n"; // Test Trace
goodToGo = (x==0 && y==0);

if (x && y) {
cout << "IQFeed delivered close message\n" << endl;
RemoveClientApp(NULL);
exit(0);
}
}


int main(int argc, char* argv[])
{
cout << "main..\n"; // Test Trace

SetCallbackFunction(callback); // set the callback function to get info from IQFeed
cout << "callback function set..\n"; // Test Trace

RegisterClientApp(NULL, "IQFEED_DEMO", "1.0", "1.0"); // start iq feed
cout << "registered client...\n"; // Test Trace

while (!goodToGo) { // wait for the callback
cout << "waiting for callback...\n"; // Test Trace
Sleep(100);
}

cout << "goodToGo...\n"; // Test Trace
return 0;
}
-----------------------------------------------------------------------------------------

Console Output:
---------------
main..
callback function set..
registered client...
waiting for callback...
waiting for callback...
waiting for callback...
waiting for callback...
waiting for callback...
waiting for callback...
waiting for callback...
waiting for callback...
waiting for callback...
waiting for callback...
waiting for callback...
waiting for callback...
waiting for callback...
waiting for callback...
waiting for callback...
waiting for callback...
waiting for callback...
waiting for callback...
waiting for callback...
waiting for callback...
waiting for callback...
(ad infinitum)
-------------------------------------------------------------------------------------------

Using IQFeed Files:
-------------------
IQ32.h 5 KB 1/29/2003 1:55PM
IQ32.lib 8 KB 3/15/2004 11:00AM
IQ32.dll 96KB 7/26/2004 5:23PM

Note: I have compiled the console_stream example and the test program in both the Visual C++ and Visual .NET (C++) environments with the same result.

Dennis
-Interested User-
Posts: 19
Joined: Oct 8, 2004


Posted: Oct 8, 2004 12:14 PM          Msg. 2 of 4
Since my original posting, I reconfigured my environment and I now have a working instance of my test example (output below). I will try to isolate the particular change or changes that made the difference, and I will post under this thread.

Output from test program (after changes):
-------------------------------------------------
main..
callback function set..
registered client...
waiting for callback...
waiting for callback...
waiting for callback...
waiting for callback...
waiting for callback...
waiting for callback...
waiting for callback...
waiting for callback...
waiting for callback...
waiting for callback...
waiting for callback...
waiting for callback...
waiting for callback...
waiting for callback...
waiting for callback...
waiting for callback...
waiting for callback...
waiting for callback...
waiting for callback...
waiting for callback...
waiting for callback...
callback from IQFeed...
goodToGo...
Press any key to continue

Dennis
-Interested User-
Posts: 19
Joined: Oct 8, 2004


Posted: Oct 9, 2004 01:36 PM          Msg. 3 of 4
The "No Callback" problem relates to how IQConnect.exe and IQ32.dll are accessed during runtime. It is possible to position these modules (in folders relative to your exe) in such a way as to cause the "No Callback" problem and mask an exception that IQConnect would otherwise display.

More to come...(busy weekend).
Dennis

Dennis
-Interested User-
Posts: 19
Joined: Oct 8, 2004


Posted: Oct 9, 2004 03:48 PM          Msg. 4 of 4
You can recreate the "No Callback" with the following steps:
1. Remove from you PATH, the IQFeed directory (the installed location of IQConnnect.exe and IQ32.dll).
2. Copy IQ32.dll to your working directory (location of console_stream.exe or executable of above example).
3. Run console_stream.exe or executable of above example.

The "why would anyone do this" and/or "why this causes a problem" requires a lengthly post; which I will be glad to supply if someone is interested.

Otherwise, "...onward through the fog".
Dennis
 

 

Time: Fri May 3, 2024 3:19 PM CFBB v1.2.0 11 ms.
© AderSoftware 2002-2003