General
Banner
Home | Articles | Dutch

Introduction | Visual Basic 6 | Simkits instr. | K8000

Upgrade to Windows 7 OS.

Introduction.

Because my old PC had crashed, I needed to look out for a new one in order to be able to keep my cockpit up and running. Because Windows XP isn't for sale anymore and the support for it will stop very soon. We had to start thinking about switching to Windows 7 OS.

The cockpit project exist already for a long time and in this period of time we have seen a lot of different FS version, but also different Windows OS. I started the project with Windows 95, then Windows 98, Windows XP and now Windows 7. I never had to adapt when switching to a new OS, except for this time. It wasn't very easy. Everything has to do with the old hardware and software we still use and isn't supported anymore by updates for the new W7 OS. We still work with a self expanded version of the K8000 that is connected via the good old parallel port. The first version of Simkits instruments with a CCU (Central Control Unit) and instruments made by myself who are connect to a serial port. This all is being managed by a cockpit management system written in VB6, witch also isn't a newcomer. Stepping over to W7 64bit version would have been two bridges to far. So we chose the 32bit version. In this article I will tell you more about the different problems I encountered after installing W7 and I will give you the solutions I found to overcome this problems.

Top

Visual Basic 6:

The first thing I did after connecting everything to the new PC was the installation of FS2004. This went really fast without any problem. The next step was to install Visual Basic. But here we got stuck because of a missing dll file. The installation failed and stopped. After some investigation on the internet we found a simple solution. Just make a empty file in notepad and save it. Then rename it as MSJAVA.DLL. Copy this file to the windows folder, restart and start the installation again. And indeed it worked.

But the problems where not over jet. I started the cockpit management program in VB6. All seemed to work on first sight. The motor instruments moved, the overhead motor panel worked. I made a first test flight. I started in Seattle and wanted to make a circuit around the airfield. All went well until I wanted to land again. When I wanted to lower the flaps the VB program stopped at the subroutine Flaps Down. In this subroutine there was a statement called 'Sendkeys' in it. This statement normally sends a key, or key combination to the PC. Very strange, this has always worked fine up till now and all of a sudden it isn't working anymore. After searching the internet again it seemed that W7 didn't support this VB statement anymore. I then started looking for a solution on different forums. There where different solutions to the problem but the one was even more complex then the other. Just one solution stood out with it's simplicity. Just add a new module to the program, put in 4 lines of text and that's it. The program lines are as follows.

Public Sub Sendkeys(text$, Optional wait As Boolean = False)
Set wshshell = CreateObject ("wscript.shell")
wshshell.Sendkeys text, wait
Set wshshell = Nothing
End sub

After a new test, everything worked perfect like before. How simple can live be.

Top

Simkits instruments with CCU2:

The one thing I was afraid of was this. I had read on different forums that there might be big problems running the Simkits instruments with a CCU on W7. Everybody advised to stick with XP because the drivers of the USB where not updated for W7. The USB chip in the older CCU where from a manufacturer who went bankrupt and therefore where not updated anymore. This didn't sound very reassuring. If these instruments wouldn't work anymore, this could mean the end of the project. Or I should need to reinvest a whole lot of money again to bay new ones, or make them myself.
In time I learned one thing, don't always believe what others tell you. Try it out yourself and see what happens.

I plugged in the USB cable in a USB3 port and started to load the driver. I couldn't get the CCU to connect. I checked the operating system and all looked fine, no error detected. I tried it several times without any result. I said to myself, stop wasting time, lets give it a nights rest. The next day, I thought this CCU is an old thing, why not put it in an old USB2 port. I de-installed the driver and started all over. And what did you think happened. It worked from the first time.

Now I just needed to add and calibrate all the instruments. After calibrating the whole lot after half an hour I wanted to save it. Error, Unable to save the file. At that moment I shouted some unfriendly words. But nothing do about this. This W7 with its admin rights! I still needed to get use to. Again I calibrated the whole lot but now as administrator.
After two days of blood, sweat and tears, we where able to let the flight instruments of Simkits work again. What a big relief.
It went a lot essayer then I expected. So don't always believe what people tell you, especially on forums.

Top

K8000:

The last part was the installation of my own expanded K8000 version. The biggest issue here always is connecting the parallel port. Before Windows 98 all went without a problem. The next Windows versions tried to manage the parallel them selfs and from that moment on it all went wrong. To gain the control over the parallel port again we needed a program called dlportio.dll. This enabled you to control the parralel port also via a module in VB6.

After installing the dlportio program and putting the dlportio.dll file in the systems32 folder. I tried to start the test program of the K8000 to see if there was a connection. Unfortunately nothing happened. It seemed as if he couldn't find the dlportio.sys file.
I double checked and all was installed correct. I tried to see if I could make a connect via the module but all without any result. I really didn't expect this kind of problem. On this one I struggled for quite a few days. Out of the blue came the solution. I was reading on article about people who where building robots themselves. The also program there own PIC's (Programmable IC) and upload them via the parallel port. A very clever chap reprogrammed the driver (inpout32.dll) for W7 so he would be able to get control over his parallel port. This in the 32bit and the 64 bit version. I downloaded the file and followed his instructions. After a restart I opened the K8000 test program again. What was the result? I worked, I had a connection. After this I jumped in to the air, and went down to drink on the success. You can find the file on the web page download.

Top

© Verley Jan 2007-2017