[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.c++

loop in dll / return set value

Michael Sgier

11/25/2008 4:22:00 PM

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?XPLM...


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
4 Answers

red floyd

11/25/2008 5:10:00 PM

0

On Nov 25, 8:21 am, Michael Sgier <sg...@nospam.com> wrote:
[I'm too lazy to google for it or find the right forum redacted]
>
> This documentation I can use:http://www.xsquawkbox.net/xpsdk/phpwiki/index.php?XPLM...
>
> 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.


Michael Sgier

11/26/2008 8:43:00 AM

0

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


Sherm Pendley

11/26/2008 9:08:00 AM

0

Michael Sgier <sgier@nospam.com> writes:

> 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--

--
My blog: http://shermspace.bl...
Cocoa programming in Perl: http://camelbones.sourc...

Michael Sgier

11/26/2008 11:57:00 AM

0

Very helpful indeed..........