Mirkos Posted January 9, 2006 Report Posted January 9, 2006 Hi, does anyone know how to write "text with green background messages" on the flight simulator screen from a C-programmed module? i need help.....please answer!! thanks mirkos
Pete Dowson Posted January 9, 2006 Report Posted January 9, 2006 Hi, does anyone know how to write "text with green background messages" on the flight simulator screen from a C-programmed module? You can do it via FSUIPC -- see the FSUIPC SDK, offsets 32FA and 3380. Regards, Pete
Mirkos Posted January 9, 2006 Author Report Posted January 9, 2006 THANK YOU VERY MUCH PETE!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Regards, Mirko
Mirkos Posted January 9, 2006 Author Report Posted January 9, 2006 i would use this code in C but i dont now how use the FSUIPC_Write(DWORD dwOffset, DWORD dwSize, void *pSrce, DWORD *pdwResult); how can i use the "void *pSrce"? Please someone gives me an example..... regards Mirko :D
Pete Dowson Posted January 9, 2006 Report Posted January 9, 2006 FSUIPC_Write(DWORD dwOffset, DWORD dwSize, void *pSrce, DWORD *pdwResult); how can i use the "void *pSrce"? It's the pointer to the data you want to write. It is defined as a "void pointer" so that you can use any data type -- a string pointer for a string of characters, or whatever. Are you just learning C? Programming things to interface to FS is not a good starting project if you are just beginning. Regards, Pete
Mirkos Posted January 10, 2006 Author Report Posted January 10, 2006 Are you just learning C? No, i'm not new to C but i've never saw a void pointer, only void methods!!!!. Thank you for the answer!!! Mirko
Stoney3K Posted January 17, 2006 Report Posted January 17, 2006 Are you just learning C? No, i'm not new to C but i've never saw a void pointer, only void methods!!!!. Thank you for the answer!!! Mirko Just pull up your Kerninghan & Ritchie... should be in there. A void * is a pointer that could be made to point to ANY data type. Meaning the same variable coud be made to point to a character first (e.g. string), next to an int and even later to some struct containing data. But not simultaneously of course. You probably shouldn't declare some variable as a void * unles you really don't know what's going to end up in it in the first place. It's a common way of transferring blocks of data of any type (e.g. "raw bits") from one place to another. Later in the code will be decided what data it actually is (or, if you're writing a dumb copy, for example, you don't want to care about the data type and output a void * as well). The reason you see voids in front of a function a lot is because you don't want every function to return a value. In the case of a void function it will return a variable of no data type, e.g. no return value. You can make a function void * to let it return a raw memory address. Just to let you know: Pointers are pretty messy, and don't fiddle with them too much or you'll cause defintite memory leaks or hard crashes. C doesn't have a way of checking whether an application stays within its own memory space (C++, however, does have a mechanism and raises an EAccessViolation if you 'step out of bounds'.)
Mirkos Posted January 17, 2006 Author Report Posted January 17, 2006 thank you for your answer!!!! :D :D :D :D :D :D :D :D :D :D
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now