edox677 Posted June 3, 2013 Report Posted June 3, 2013 Hi there, I'd like to read out the position and the attitude with FSUIPC. I already read through the SDK examples. I am also kind of new in programing big projects. What I use is a C/C++ code with VS2010. I made several attemps to get the UIPCHello example compiled but VS says that there is is Linker error LNK unresolved ... to external symbol "_imp_wsprintfA" in "_FSUIPC_Open" in file IPCuser.obj. Is this a major linking error or a VS2010 related error. I set under "Project Properties" additional dependencies to FSUIPC_User.lib and I also use the VS2010 version of FSUIPC_User.lib Is there a tutorial to set up a visual project for fsuipc? Thanks in advance
Pete Dowson Posted June 3, 2013 Report Posted June 3, 2013 What I use is a C/C++ code with VS2010. I made several attemps to get the UIPCHello example compiled but VS says that there is is Linker error LNK unresolved ... to external symbol "_imp_wsprintfA" in "_FSUIPC_Open" in file IPCuser.obj. Odd when wsprintf is a standard Windows API function, defined in the standard WinUser.h header. Seems you omitted to specify a needed library file? I just tried building it with VS2010, allowing VS2010 to convert my old VS2003 project file into the new VS2010 format and it compiled and linked okay. In the Command Line entry in Properties-Linker it lists all these libs which I didn't actually specify but which it seems to include in any case for a Win32 project: Maybe you've not selected a Windows 32-bit project type? "kernel32.lib" "user32.lib" "gdi32.lib" "winspool.lib" "comdlg32.lib" "advapi32.lib" "shell32.lib" "ole32.lib" "oleaut32.lib" "uuid.lib" Is there a tutorial to set up a visual project for fsuipc? Only the Microsoft documentation ro set up a normal Win32 project. I'm really not well up on all the little incompatibilities Microsoft builds in between its assorted releases. All development systems are different in their own ways. I still have to use VS2003 to build FSUIPC3 even though i use VS2010 to build FSUIPC4. And for many of the other FSX-related DLLs I use VS2005! I found sticking to the original versions of VS far easier than trying to figure out their arcane settings. Regards Pete
edox677 Posted June 3, 2013 Author Report Posted June 3, 2013 actually I wanted to set up a usal c/c++ project not as win 32 api. so i find it quite confusing that there is a example as winapi given. it's very challinging for beginners in programing to figure out all the interactions between c, c++ and winapi specific settings, libs and includes. I still can not get a small fsuipc program running. Are there any useful tutorials?
Pete Dowson Posted June 3, 2013 Report Posted June 3, 2013 actually I wanted to set up a usal c/c++ project not as win 32 api. What is a "usual C/C++ project" if it isn't a 32 bit Windows program? Sorry, you've lost me. so i find it quite confusing that there is a example as winapi given.it's very challinging for beginners in programing to figure out all the interactions between c, c++ and winapi specific settings, libs and includes. The Microsoft development systems are challenging to everybody, I assure you. I have been a programmer now for nearly 50 years and I gave up on figuring out most of the confusing options in MS VS. I still can not get a small fsuipc program running. Are there any useful tutorials? You have all the source, for UIPCHello and even for the library. in fact it was another user who recompiled the library for VS2010, not I. If you cannot build a small C/C++ program with the sources of what you need, I think you need to refer back to basic C programming? If it's only Microsoft's systems which are defeating you, join the club. Only Microsoft Help may help. If I were you I'd start by considering why you aren't wanting to build a Win32 program. What other sort of program would you think be able to interface to FS, which is itself a Win32 program? Regards Pete
edox677 Posted July 11, 2013 Author Report Posted July 11, 2013 Hi Pete. After several weeks of work everything works just fine. Now I wanted to pick up the localizer and glideslipe needle (0x0C48 and 0x0C49) . Anyhow I cannot say if the needle is left or right. The figures a changing with the displacement from the centerline. here is my current code double FS9Interface::readLocalizer() { DWORD dwResult; _int32 loc; if (FSUIPC_Read(0x0C48, 4, &loc, &dwResult)) { FSUIPC_Process(&dwResult); cout << loc << endl; cout << loc/(65536.0 * 65536.0 * 65536.0 * 65536.0) << endl; return loc; } return 0; } no matter what size and datatype I use, the outcome does not seem to make sense. Am I doing something wrong?
mgh Posted July 11, 2013 Report Posted July 11, 2013 0ffset 0x0c48 is a single byte not an integer. Its values range from -127 for left and +127 for right.
edox677 Posted July 12, 2013 Author Report Posted July 12, 2013 0ffset 0x0c48 is a single byte not an integer. Its values range from -127 for left and +127 for right. thx, I found it out late last night by my self using char instead of int and 1 byte I wasn't quiet aware of the datatypes
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