loop in dll / return set value

M

Michael Sgier

Hi
c++ is still very new to me so some questions:

---Declaration:
XPLMDataRef gPlaneV = NULL;

---in the main start function:

gPlaneV = XPLMFindDataRef("sim/graphics/view/view_type");

XPLMRegisterFlightLoopCallback( /*What is this function doing?*/
setView(), /* Callback */
1.0, /* Interval */
NULL); /* refcon not used. */

return 1; /* why?

---than outside the main function:

setView()
{
planeV = XPLMGetDatai(gPlaneV);
if (planeV != 1026)
XPLMSetDatai(gPlaneV, 1026);
return gPlaneV;
}


This documentation I can use:
http://www.xsquawkbox.net/xpsdk/phpwiki/index.php?XPLMDataAccess


I only want to loop the dll application and set the dataref:
"sim/graphics/view/view_type" to 1026.
It compiles but debugging stops at the end of the main function. So how
can i test the main loop and watch if gPlaneV is set?
return gPlaneV is correct? Sorry but coming from VB.NET i lack some
knowledges in c++.
Thanks indeed Michael
 
R

red floyd

This documentation I can use:http://www.xsquawkbox.net/xpsdk/phpwiki/index.php?XPLMDataAccess

I only want to loop the dll application and set the dataref:
"sim/graphics/view/view_type" to 1026.


And why do you expect a newsgroup dedicate to the C++ *LANGUAGE* to
know about your specific library. Why don't you ask on a forum
dedicated to your library? How the heck are we supposed to know what
XPLMDoSomethingOrOther does? It's not part of the language.
 
M

Michael Sgier

because it's about basic c++ stuff. A quick look into the link should do
the job for a programmer.
 
S

Sherm Pendley

Michael Sgier said:
because it's about basic c++ stuff.

The call you're talking about is not part of C++, it's part of whatever
library or API you happen to be using.
A quick look into the link should
do the job for a programmer.

A programmer should know the difference between languages and libraries
too, and why it's inappropriate to discuss library issues in a group
that's chartered to discuss the language.

And *any* usenet user, programmer or not, should know how to correctly
quote the post to which he's replying.

sherm--
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top