Jump to content
The simFlight Network Forums
DLuis

64-bit software and wideFS

Recommended Posts

Hello,

I want to make a 64-bit software (from scratch), so I tried the connection with WideFS that I've downloaded the from schiratti.com and I made this simple test:

Opened the WideClient.exe, then UIPChello.exe and I get the message "Maybe running on WideClient, but FS not running on Server, or wrong FSUIPC". Since FSUIPC was not running, I believe that UIPChello.exe connected correctly to the WideFS.

But when I made the same test with UIPChello64.exe, I get the message "Cannot link to FSUIPC or WideClient".

Well, since WideFS is a 32-bit, i believe that is not possible to connect 64-bit compiled software to WideFS. If so, can someone tell me how? If not, is there a 64-bit WideFS or will be?

 

 

Share this post


Link to post
Share on other sites
7 minutes ago, DLuis said:

Well, since WideFS is a 32-bit, i believe that is not possible to connect 64-bit compiled software to WideFS.

This is probably just the structure in the 64-bit version of the LIB file. FSUIPC5 was changed to recognise both structure definitions -- they are not the same because of the presence of a pointer. The pointer isn't used by FSUIPC, but by the code in the user program designed ot parcel out the received data into the program's locations. Of course 64-bit pointers are larger than 32-bit ones ...

I'll have a look at making WideClient recognise both structure types. But it won't be today I'm afraid. Maybe tomorrow but more likely over the weekend. I think you are the first person to come across this. Obviously most folks are using 32-bit.

Incidentally, I think that FSUIPC4 (32-bit only) wouldn't work with 64-bit apps either, for exactly the same reason. I'm not sure I want to change that, but I might take a look.

Meanwhile, if your need is urgent you can program around it, using relative addressing instead of a full 64-bit pointer. The source for the LIB fuctions is supplied.

Pete

 

 

Share this post


Link to post
Share on other sites

Wow, what a quick response.

I don't have any kind of hurry, besides, just to know that within days the WideFS maybe is compatible with 64-bit software is amazing.

I could program in 32-bit, but since I'm going to start from scratch, why not in 64-bit, since in these days most of the software are.

Once again, thank you for the quick response.

Share this post


Link to post
Share on other sites

I've made the relevant changes so that a 64-bit app can connect to the current (32-bit) WideClient. 

If you want re-build your application ready, download

UIPC64 SDK C Version 2

There's a revised FSUIPCuser64.lib, and its source included, as well as a recompiled UIPCHello64.exe using the revised LIB.  No other parts and changed.

You won't be ble to test your compiled result yet, because I need to also make changes to WideClient. It's actually a much bigger job than I thought. I have to replace the pointers in the blocks being exchanged by table entry numbers, and build up a local table of addresses so these can be filled back in before returning data to the application.

The alternative to this would be a huge number of changes to the WideServer part of FSUIPC's 4 and 5, which I am not willing to do as the process would be very error prone. I don't want to risk its stability.

Pete

 

Share this post


Link to post
Share on other sites

Okay. I think I have it sorted. Tested with my 32-bit applications and UIPCHello64.  I have no more extensive 64-bit FSUIPC clients, so I would be grateful for your feedback, but I know the mechanisms I'm using work okay.

To test, as well as compiling your program with the updated 64-bit LIB in the ZIP I linked in my last email, use this version of WideClient (which will remain on restricted release until fully proven).

WideClient7110.zip

This should allow 64-bit applications to interface via WideFS to FSUIPC5, FSUIPC4, and even FSUIPC3 (with the existing WideServer.DLL installed). The interface is designed to match the old 32-bit one, with the 64-bit pointers reinserted on the readback, from a table, hence the full compatibility. Of course the application's own pointers aren't used by WideFS, they are just part of the parcels so the LIB functions know where to store the data when it is returned. Parcels are batched hence the need to closely associate the pointers with each requested data item.

Pete

 

Share this post


Link to post
Share on other sites

Hi Pete,

What a great news, really very happy to see this effort.

I already compiled my software with the new source code (can't use the lib because I'm using Code Blocks with GCC x64 compiler) and WOW, my 64-bit now connects like a charm and read/write offsets with the provided WideClient 7110. 

With this change, I believe that more people will start to program native 64-bit software.

 

 

Now I believe that a have a code problem. I'm calling FSUIPC_Read 12 times (total of  20 bytes) before calling the FSUIPC_Process.

In the "server side", everything works great, but in the "client side", not really. How many calls of FSUIPC_Read or total of bytes (DWORD size) can I make before the FSUIPC_Process in the 32-bit WideFS?

 

 

Share this post


Link to post
Share on other sites
3 hours ago, DLuis said:

Now I believe that a have a code problem. I'm calling FSUIPC_Read 12 times (total of  20 bytes) before calling the FSUIPC_Process.

In the "server side", everything works great, but in the "client side", not really. How many calls of FSUIPC_Read or total of bytes (DWORD size) can I make before the FSUIPC_Process in the 32-bit WideFS?

It isn't really limited except by the maximum size of the shared memory area, which is something like 32,768 byres I think. That needs to contain header data as well a read data space, so with 64-bit requests that's an overhead of about 24 bytes per request. So about 1200 single byte requests or less for larger ones. And it is FAR more efficient to batch them per Process call than to split them up unnecessarily.

What is going wrong? Bear in mind that Is supplied these things for your tests, as I don't really have anything sunstantail to test my changes eith here and won'y have time to write a new test program for several days. If you have a program I can use to debug my code, I'd be grateful to receive it.

Pete

 

Share this post


Link to post
Share on other sites

Hi Pete

I've finished my program and it's a privilege to share with you.

There are two version. V1 is the one that only works in the "server side". V2 works in server and client with WideFS. The source code that is reference to FSUIPC is also in the attachments and a "how it works" explanation.

The difference between V1 and V2 are the number of FSUIPC_Process calls. 

https://1drv.ms/f/s!Aso3Tkv5pPmGar6mvGQRhMsvQY4

Thanks a lot for the attention.

Share this post


Link to post
Share on other sites
6 hours ago, DLuis said:

I've finished my program and it's a privilege to share with you.

There are two version. V1 is the one that only works in the "server side". V2 works in server and client with WideFS. The source code that is reference to FSUIPC is also in the attachments and a "how it works" explanation.

The difference between V1 and V2 are the number of FSUIPC_Process calls. 

Okay.

Does V2 only have one Read per Process, but V1 two or more?

The number of Process calls won't come into it at all. Do you really mean the number of reads before a process call? Because that is more of a test. WideClient has to replace each one by a 32-bit version, which is 4 bytes shorter, before sending, then back to 64-bit on its return with the data. That means shifting bytes up and down. I've probably got an error in that code someplace.

Pete

 

Share this post


Link to post
Share on other sites

I've found the error and I think it is working well now, but I couldn't use your programs to test as you seem to have password protected the ZIPs.

I'll upload a revised WideClient.EXE shortly for you to try yourself. If you still have a problem I'll need the password(s).

Pete

 

Share this post


Link to post
Share on other sites

Okay. Please try WideClient7120.zip

Let me know how you get on. Note that if you use ButtonScreen this version will "flicker" (actually minimize and restore) when it first connects. This seems to be needed these days to get all the buttons painted correctly.

Pete

 

Share this post


Link to post
Share on other sites

Hi Pete,

 I send you the password in a private message right after my post.

Tomorrow I will test with the new wideclient and let you know how many FSUIPC_Reads are possible before the FSUIPC_Process.

So far, only one, the reason why V2 works.

 

Share this post


Link to post
Share on other sites
1 hour ago, DLuis said:

 I send you the password in a private message right after my post.

A "private message"? Where did you send it to?

1 hour ago, DLuis said:

Tomorrow I will test with the new wideclient and let you know how many FSUIPC_Reads are possible before the FSUIPC_Process.

If it is more than 1 it is working! Are you going to try to fill the memory defined for them, a 1,000 requests or so? (32kb total space)? I don't see the point of that.

I already have programs with do many hundreds of reads at a time (FSInterrogate is one).  I just didn't have a 64-bit one. I have adapted UIPCHello64 to do several reads and that works fine with this version, so I'm reasonably confident.

BTW, I changed WideClient again, to try to deal with a button screen draw problem, so it would be better if you used the current one tomorrow -- WideClient7130.zip

Pete

 

Share this post


Link to post
Share on other sites

Hi Pete,

I'm really sorry, the private message stay in the drafts.

Meanwhile, I've tested with the WideClient7130, but the result is the same. It just work if I made one FSUIPC_Process for each FSUIPC_Read.

I've compiled a 64-bit program (no password protected...) with all the reads that a make in my software,  11 FSUIPC_Read in a total of 18 Bytes.

It display the returned values once. In the server side, work great, but not with WideClient.

Try to test and tell me if works with you, because can be something wrong with my setup.

WideFS Test.zip

Share this post


Link to post
Share on other sites
2 hours ago, DLuis said:

Meanwhile, I've tested with the WideClient7130, but the result is the same. It just work if I made one FSUIPC_Process for each FSUIPC_Read

I'll test it here. It works okay with all my own tests.

Pete

 

 

Share this post


Link to post
Share on other sites

Hi,

I've tested my software and the "wideFS Test.exe" with the WideClient7140 and guest what??? IT WORKS, WOW, EVERYTHING WORKS NOW :D

So, what can I say, you are the one that invented one of the "must have" Add-ons and still keeps this project alive and running. AMAZING.

Maybe is just me that don't like to see a "process.exe * 32" in the Taskbar Manager, but you make it possible, a 64-bit talking with a 32-bits and it's working like a charm. 

I'm going to still test my software and if I find something, will let you know.

All that I can say now is a big thank you Pete,  from now on It's possible to have 64-bit compiled software working with FSUIPC and WideFS.

Share this post


Link to post
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

×

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.