Jump to content
The simFlight Network Forums

FSUIPC vs. Delphi 2010 - the solution!


rzoltan

Recommended Posts

Just a quick solution for you, who using - or trying to use - Delphi 2010 or newer for developing some clever tools for FSUIPC.

After compiling your program, and trying to connect to fsuipc, it doesn't connect. The error message is "IPC request contains bad data". It almost drove me crazy, I did not find any solution on the internet, so I had to figure it out by myself. I'm not expert in Delphi, just a hobbyist, so please forgive it if I made a horrible programming error.

- In the FPCUser.pas, find the following lines:

Function FSUIPC_Open(dwFSReq : DWORD; var dwResult : DWORD) : Boolean;
var
  szName  : AnsiString;

- Change the AnsiString to String:

Function FSUIPC_Open(dwFSReq : DWORD; var dwResult : DWORD) : Boolean;
var
  szName  : String;

That's all. Now you can connect, everything will work, except one thing: you will not able to parse the version number of FSUIPC.

Sorry for my bad english.

Happy programming!

Link to comment
Share on other sites

  • 1 year later...

Just a quick solution for you, who using - or trying to use - Delphi 2010 or newer for developing some clever tools for FSUIPC.

After compiling your program, and trying to connect to fsuipc, it doesn't connect. The error message is "IPC request contains bad data". It almost drove me crazy, I did not find any solution on the internet, so I had to figure it out by myself. I'm not expert in Delphi, just a hobbyist, so please forgive it if I made a horrible programming error.

- In the FPCUser.pas, find the following lines:

Function FSUIPC_Open(dwFSReq : DWORD; var dwResult : DWORD) : Boolean;
var
szName : AnsiString;

- Change the AnsiString to String:

Function FSUIPC_Open(dwFSReq : DWORD; var dwResult : DWORD) : Boolean;
var
szName : String;

That's all. Now you can connect, everything will work, except one thing: you will not able to parse the version number of FSUIPC.

Sorry for my bad english.

Happy programming!

I have same error in vs 2010.

I used VC++ MFC source file..

FSUIPC.h and FSUIPC.cpp

But Error was occured while compiling In FSUIPC.cpp

Error reason is 3rd parameter "UIPCMAIN" String.

So, I tried to correct this error as complier's comment.(C Type casting required..)

Compling was successed.

But, My Solution didn't connect FS.

Error Message is "Can not link with FS or WideFS???"

I did debug my solution.

As a result, window handle was not detected..

How do I do???

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • 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.