Jump to content
The simFlight Network Forums

flying-fish

Members
  • Content Count

    5
  • Joined

  • Last visited

Community Reputation

0 Neutral

About flying-fish

  • Rank
    Newbie
  • Birthday 01/01/1970

Contact Methods

  • Website URL
    http://
  • ICQ
    177074000

Profile Information

  • Location
    Tübingen (Germany)
  1. I have opened a new Project in C but I still have the Linker Error ... I have inserted the IPCuser.c ans IPCuser.h into my source folder, and have inserted the IPCuser.c instead of the FSUIPC_User.lib into my project. Now I have only one Error Message: [Linker Error] Unresolved external '_main' referenced from C:\PROGRAMME\BORLAND\CBUILDER5\LIB\C0X32.OBJ
  2. I have learned programing in school. One problem is, that i get the Error Message "[Linker Error]' FSUIPC_USER.LIB' contains invalid 0MF record, type 0x21 (possibly C0FF)" when I'm trying to compile the example program: #include #include #include "FSUIPC_User.h" char *pszErrors[] = { "Okay", "Attempt to Open when already Open", "Cannot link to FSUIPC or WideClient", "Failed to Register common message with Windows", "Failed to create Atom for mapping filename", "Failed to create a file mapping object", "Failed to open a view to the file map", "Incorrect version of FSUIPC, or not FSUIPC", "Sim is not version requested", "Call cannot execute, link not Open", "Call cannot execute: no requests accumulated", "IPC timed out all retries", "IPC sendmessage failed all retries", "IPC request contains bad data", "Maybe running on WideClient, but FS not running on Server, or wrong FSUIPC", "Read or Write request cannot be added, memory for Process is full", }; int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR szCmdLine, int iCmdShow) { DWORD dwResult; if (FSUIPC_Open(SIM_ANY, &dwResult)) { char chMsg[128], chTimeMsg[64]; char chTime[3]; BOOL fTimeOk = TRUE; static char *pFS[] = { "FS98", "FS2000", "CFS2", "CFS1", "Fly!", "FS2002", "FS2004" }; // Change made 060603 // Okay, we're linked, and already the FSUIPC_Open has had an initial // exchange with FSUIPC to get its version number and to differentiate // between FS's. // Now to auto-Register with FSUIPC, to save the user of an Unregistered FSUIPC // having to Register UIPCHello for us: static char chOurKey[] = "IKB3BI67TCHE"; // As obtained from Pete Dowson if (FSUIPC_Write(0x8001, 12, chOurKey, &dwResult)) FSUIPC_Process(&dwResult); // Process the request(s) // I've not checked the reslut of the above -- if it didn't register us, // and FSUIPC isn't fully user-Registered, the next request will not // return the FS lock time // As an example of retrieving data, well also get the FS clock time too: if (!FSUIPC_Read(0x238, 3, chTime, &dwResult) || // If we wanted other reads/writes at the same time, we could put them here !FSUIPC_Process(&dwResult)) // Process the request(s) fTimeOk = FALSE; // Now display all the knowledge we've accrued: if (fTimeOk) wsprintf(chTimeMsg, "Request for time ok: FS clock = %02d:%02d:%02d", chTime[0], chTime[1], chTime[2]); else wsprintf(chTimeMsg, "Request for time failed: %s", pszErrors[dwResult]); wsprintf(chMsg, "Sim is %s, FSUIPC Version = %c.%c%c%c%c\r%s", (FSUIPC_FS_Version && (FSUIPC_FS_Version <= 7)) ? pFS[FSUIPC_FS_Version - 1] : "Unknown FS", // Change made 060603 '0' + (0x0f & (FSUIPC_Version >> 28)), '0' + (0x0f & (FSUIPC_Version >> 24)), '0' + (0x0f & (FSUIPC_Version >> 20)), '0' + (0x0f & (FSUIPC_Version >> 16)), (FSUIPC_Version & 0xffff) ? 'a' + (FSUIPC_Version & 0xff) - 1 : ' ', chTimeMsg); MessageBox (NULL, chMsg, "UIPChello: Link established to FSUIPC", 0) ; } else MessageBox (NULL, pszErrors[dwResult], "UIPChello: Failed to open link to FSUIPC", 0) ; FSUIPC_Close(); // Closing when it wasn't open is okay, so this is safe here return 0 ; } An the other problem is, that I dont understand how I can get the values, when the datatype of the functions like "FSUIPC_Read()" is BOOL?
  3. Thanks for the prompt answer. I know how to program, but I don't understand how I can get the value, from for example the speed, into a variable of my own c++ program. Unfortunately I don't understand the examples. Regards, Freddy
  4. Hello, i want to get some values (the speed, the altitude, etc.) out of the Microsoft Flightsimulator into an own C++ program. I have been told, that I will have to use "FSUIPC". Now I have a little problem: I have downloaded the FSUIPC_SDK, but I still dont know how I can get the values like the speed or altitude oft the plane into my program. I have read the instructions in the FSUIPC_SDK but I have not found a sollution. It would be very nice, if someone could help me. Thanks for your help. Freddy
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.