Archived

This topic is now archived and is closed to further replies.

Guest efratomer

Vista & Simconnect

Recommended Posts

Hello,I am buidling a program that connects to Simconnect in vb.net.I have checked the program and it works great in my Windows XP PC>.When I copy it to my laptop (Vista OS) i'm getting the microsoft's error report (send \ don't send window) immediately after I execute the EXE.I wan't to add that in the XP OS the program works great! So after I got this error I made some try and error tests to see which line in-code makes it.The line that result the error:

fsx_simconnect = Nothing

this is how fsx_simconnect variable is declared:

Dim fsx_simconnect As SimConnect

any Ideas?Thanks in advance,Omer.

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

Look in your event viewer and see if you can give more info on the error.This is not the normal UAC error, but...?Did you install FSX in Program Files?Bob

Share this post


Link to post
Share on other sites

Vista 32 or 64? Perhaps you compiled the code for a specific platform?Do you see the the simconnect libraries in the side by side folder (usually c:\windows\WinSxS) - look for entries that include "microsoft.simconnect" in the folder names.Does your program load with no dependency or load errors in dependency walker (http://www.dependencywalker.com/)? That will check all references and make sure your code has all it needs to run.Hope this helps,Etienne

Share this post


Link to post
Share on other sites
Vista 32 or 64? Perhaps you compiled the code for a specific platform?
Yep, that can definitely cause problems with managed clients, make sure to change the build target to x86 only (instead of the "Any CPU" setting).
Do you see the the simconnect libraries in the side by side folder (usually c:\windows\WinSxS) - look for entries that include "microsoft.simconnect" in the folder names.
Actually, for a managed client, you would need to check both the WinSxS directory and the c:\windows\assembly directory (the Global Assembly Cache - GAC) as a managed client would need both the managed client wrapper and the native client to be available to run.Tim

Share this post


Link to post
Share on other sites
Yep, that can definitely cause problems with managed clients, make sure to change the build target to x86 only (instead of the "Any CPU" setting).Actually, for a managed client, you would need to check both the WinSxS directory and the c:\windows\assembly directory (the Global Assembly Cache - GAC) as a managed client would need both the managed client wrapper and the native client to be available to run.Tim
Hello,The flightsim simconnect file is in the assembly folder but there is nothing in the WinSxS though.. also, I am running vista 32 bit.Any more ideas?Thanks.Omer.

Share this post


Link to post
Share on other sites
The flightsim simconnect file is in the assembly folder but there is nothing in the WinSxS though.. also, I am running vista 32 bit
Sounds like you haven't installed SimConnect on that system.Pete

Share this post


Link to post
Share on other sites

I have installed FSX: Deluxe edition.. Isn't that enough for the program to work properly?And why the program crashs when there is no Simconnect installation.. how can I handle the error so there will be a nice error message that i'll create?Thanks,Omer.

Share this post


Link to post
Share on other sites
I have installed FSX: Deluxe edition.. Isn't that enough for the program to work properly?
It should be (even the non-Deluxe) -- but you said "there is nothing in the WinSxS though". If there is no SimConnect folder in WinSxS then SimConnect is not installed, so something went wrong with the FSX install. Try inserting the DVD again anfd repairing the installation.
And why the program crashs when there is no Simconnect installation.. how can I handle the error so there will be a nice error message that i'll create?
Sorry, I can't help with that as I don't know the language you are using. I think it needs a wrapper or interface module. I use C/C++.RegardsPete

Share this post


Link to post
Share on other sites
how can I handle the error so there will be a nice error message that i'll create?
Look into using a VB Try...Catch block of code around your initial call to SimConnect such that if the 'Try' to open SimConnect fails, you 'Catch' the exception and put up a message box.Using Try...Catch is explained with examples in the help for VB.Jeff

Share this post


Link to post
Share on other sites

Hello, Many thanks for your replies!First, I checked winSxS again and did found a simconnect related folder called: "x86_microsoft.flightsimulator.simconnect67c7c14424d6....." as well as the "simconnect.dll" file itself.Second, I have tried executing my program via the Dependency Walker program and got the following result on BOTH machines (XP & Vista OS):

Warning: At least one module has an unresolved import due to a missing export function in a delay-load dependent module.
Actually.. I have no idea what this warning means :( and if its related to our issue as this appear on both OS's.Starting to get frustrated.Omer.

Share this post


Link to post
Share on other sites
I have no idea what this warning means :( and if its related to our issue as this appear on both OS's.
While I am not an expert in the dependency walker, a quick Google search will show a number of possibilities i.e. see this thread on MSDN for example, or look at this Dependency Walker FAQ. These both seem to indicate that this sort of reply can be ignored as it works at a far lower level.To be honest, you seem to be looking for more and more complex reasons why things are not working rather than following simpler fault-finding techniques. Have you first demonstrated that your Vista machine is even correctly configured for SimConnect and have done so by proving that one of the default FSX SDK SimConnect apps will work when remotely connected from your Vista machine to your FSX machine (if they don't work, then yours will not either)? Have you run your app under the VB debugger on the Vista machine to see if you can get a better idea where it is failing?I'm willing to try and help further but it is very difficult when you have only supplied two lines of code, no information on how your VB project properties are configured, are asking questions in multiple forums, etc..Jeff

Share this post


Link to post
Share on other sites

Hello Jeff!I have made some tests and found that even the Managed VB Data Request sample provided in the SDK produces the same problem...I run basicExample.exe and get the vista's "Stopped responding" error message.Notice that the SDK is NOT installed on that machine and I have just copied the EXE file to it.From the above, I can conclude that the issue is not resulted by my program but that there is something missing or not configured correctly in the vista machine.Thanks in advance,Omer.

Share this post


Link to post
Share on other sites
I can conclude that the issue is not resulted by my program but that there is something missing or not configured correctly in the vista machine.
I think this goes back to what I first said in answer to you over at Pete's FSUIPC forum on SimFlight, it sounds like SimConnect is not properly installed or configured on your Vista PC.To try and resolve this, first look to re-install SimConnect from you PC with the SDK and on which you build on the Vista PC. To do this, look inside the 'SDK\Core Utilities Kit\SimConnect SDK\lib' folder for the SimConnect.msi installer. Copy this over to your Vista PC and install it. Try the SDK example apps and your app to see if it now works.If not, double-check that the SimConnect.cfg file on your Vista PC is correctly configured to talk to your FSX machine and the port and protocol match what you have in your SimConnect.xml configuration file on your FSX machine for the global scope.Jeff

Share this post


Link to post
Share on other sites

Hey Jeff,I am really confused right now.I have tried installing simconnect.msi and it just showed me the progress bar and closed, then I right clicked that file and noticed an option "remove installation" which means it was already installed. I had removed the installation and reinstalled the msi file and yet the sdk program still didn't worked and crashed as before.Furthermore, I have searched for the files you mentioned: simconnect.cfg and simconnect.xml and none of them was found in the machine.Please help,Omer.

Share this post


Link to post
Share on other sites
Furthermore, I have searched for the files you mentioned: simconnect.cfg and simconnect.xml and none of them was found in the machine.
You create them yourself -- the CFG file on the client PC (the one without FSX running), and the XML on the FSX PC. Please read the earlier parts of the SimConnect documentation from the SDK. It provides sample files for you to work with.The CFG file goes into your normal "My Documents" folder, for use by all SimConnect clients on that PC, the XML file goes into the same folder on the FSX PC as the FS9.CFG, DLL.XML and EXE.XML files.RegardsPete

Share this post


Link to post
Share on other sites

Hey,I think you guys had missunderstood me as I got 2 machines. One is with XP OS installed and one with Vista OS installed. BOTH machines have FSX. The problem is that only in the vista machine im getting a "Stopped responding" error message for my program & examples from the SDK as well!Any further ideas?Omer.

Share this post


Link to post
Share on other sites
BOTH machines have FSX.
It's a pity you didn't mention this before but that still doesn't take away from the fact that you still need a simconnect.xml on your Vista PC (along with a few others). As Pete noted, details for all of this are clearly noted in the SimConnect SDK documentation. Do you also have the SimConnect.ini, DLL.XML and EXE.XML files on your Vista PC?The locations for the various files should be something like:SimConnect.ini C:\Users\<username>\Documents\Flight Simulator X FilesSimConnect.xml, DLL.XML and EXE.XML C:\Users\<username>\AppData\Roaming\Microsoft\FSX
Any further ideas?
It still comes down to first making sure that you have SimConnect correctly installed and configured on your Vista PC. Until you can get the example SimConnect SDK apps to run on it, you'll not be able to get your own app to work.After SimConnect is properly installed and configured, if things are still not working install VB on your Vista PC and run your app under the debugger.I'd also recommend that you set up FSX.exe to run "as an administrator" if you have it installed under Progam Files. You can do this permanently by right-clicking on the FSX.exe, selecting Properties and then checking the "Run as an administrator" checkbox on the Compatibility tab.Jeff

Share this post


Link to post
Share on other sites
It's a pity you didn't mention this before but that still doesn't take away from the fact that you still need a simconnect.xml on your Vista PC
Actually, you don't, unless you are running a remote SimConnect connection to that PC.
I'd also recommend that you set up FSX.exe to run "as an administrator" if you have it installed under Progam Files. You can do this permanently by right-clicking on the FSX.exe, selecting Properties and then checking the "Run as an administrator" checkbox on the Compatibility tab.
That should not be needed unless you have add-in programs installed which need to write to FSX's own folders. The difficulties only arise because the Vista "Program Files" folder is protected from being written to -- even by programs installed there. FSUIPC's installer sets the permissions on the Modules folder it creates to get around this.Running FSX "as administrator" can get you into more problems if you use FSUIPC and have FSUIPC client applications on the same PC. They have to be at the same privilege level as FSX or the memory-sharing technique used in the FSUIPC interface won't work -- Vista prevents it.RegardsPete

Share this post


Link to post
Share on other sites
That should not be needed unless you have add-in programs installed which need to write to FSX's own folders.
Agreed, but as we have no idea what the app being developed intends to do, this is a simpler and easier suggestion than playing with Vista folder permissions, something which if incorrectly set could cause more issues than not getting a SimConnect add-on to work.Jeff

Share this post


Link to post
Share on other sites

Hello guys,I have installed VB.net in the vista machine, copied my project and opened it.I am getting couple of errors:1. Unable to find manifest signing certificate in the sertificate store.2. Name SIMCONNECT_TEXT_TYPE is not declarted (this one is showen couple of times for all the lines this appears)3. Text is not a member of Microsoft.FlightSimulator.SimConnect.SimConnectThere is obviously an issue with some references or such.Please help,Omer.

Share this post


Link to post
Share on other sites
Hello guys,I have installed VB.net in the vista machine, copied my project and opened it.I am getting couple of errors:1. Unable to find manifest signing certificate in the sertificate store.2. Name SIMCONNECT_TEXT_TYPE is not declarted (this one is showen couple of times for all the lines this appears)3. Text is not a member of Microsoft.FlightSimulator.SimConnect.SimConnectThere is obviously an issue with some references or such.Please help,Omer.
It sounds like you need to re-run the simconnect.msi setup program to ensure the assemblies you need are setup. If you installed without the .NET framework on the computer first, the .NET assembly probably wasn't setup in the GAC although the native client was setup in the side by side system. You can verify this by going to your windows folder (usually, C:\WINDOWS) and assembly folder (so, C:\WINDOWS\ASSEMBLY) and look for the mcirosoft.flightsimulator.simconnect assembly there. That will verify the .NET assembly you need is setup on the client.For good measure, also go to C:\WINDOWS\WINSXS and see if you can find a folder (or set of folders) starting with "x86_Microsoft.FlightSimulator.SimConnect". That will verify the native client is setup.Other note regarding the shared memory problems on Vista: just turn off UAC (google the various methods to do this) and end once and for all the security or permission nonsense. Security pundits will probably throw a week old wet carp at me (or two), but in most cases, life is just so much simpler without UAC. Face it, we didn't have UAC before. As to the "run as administrator" issue, you can re-instate the use of the administrator account on vista, which by defaults makes you the admin (also google). Do change the password on the account as when you do this, no password is setup at all. The catch is you first incur more risk, and it's not recommended to use the superuser accounts for everyday life. Mitigate the increased security risk by getting a good hardware firewall blocking snoops into your computer, get a decent a/v program with a subscription so you get the latest signatures and protection, and use strong passwords everywhere (so, don't use the pet's name and do secure your wifi access points with a very long password - know that the two wifi encryption methods WEP and WPA are both cracked now and 8 character passwords fall in about 15 minutes using a pair of GPUs to brute force the decoding - use 16 characters on wifi, that is a far greater risk in my view than the internet right now). Lastly, by all means use common sense with sensitive files (eg, that tax return file should not be stored without a good password and a good backup someplace other than your computer). Disabling UAC and using the administrative accounts make simming life significantly more tolerable, a the cost of reduced security that must be managed. You can certainly "hose" the system by doing things to it in administrator mode. Then again, that was the case in prior versions of the operating system, and we somehow managed to survive - or not :). Bottom line, balance convenience to security and do what is comfortable for you, in a day where ID theft and hacking is rampant. It is possible to dumb down Vista security, how much of it you must judge yourself. I just get tired of hearing "Vista doesn't let me do this or that". In most cases, it can.Etienne

Share this post


Link to post
Share on other sites

I had the same issues! However THIS fixed my problem (this is provided you have the correct simconnect installation as said above)Also I could not find where you stated which program you are using to compile the program? I assume VB Express 2008? If it is you need to follow instructions below. However if you are using Visual Studio all you need to do is change target build to x86.-------------------------------------------------------------------------------------------------------------------------------------------------------------------------When you are running a VB express 2008 on a 64 bit operating system there are times you need to compile the app as a 32bit. One example is if you need to open an access database. There is not a 64 bit version of jet. To force your app to use the 32 bit version you need to compile the app for the x86 version of the framework. Unfortunately there is no built in way to change the target cpu in VB express 2008. Your best bet is get a copy of Visual studio but if this is not an option you can change it with notepad. Make sure you back up your applications project file before you make any changes. Open up Notepad and open the YourProject.vbproj and you will find a section like this <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <DefineDebug>true</DefineDebug> <DefineTrace>true</DefineTrace> <OutputPath>bin\Debug\</OutputPath> <DocumentationFile>LinqToDataSet.xml</DocumentationFile> <NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn></PropertyGroup><PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugType>pdbonly</DebugType> <DefineDebug>false</DefineDebug> <DefineTrace>true</DefineTrace> <Optimize>true</Optimize> <OutputPath>bin\Release\</OutputPath> <DocumentationFile>LinqToDataSet.xml</DocumentationFile> <NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn></PropertyGroup> To change the target cpu add <PlatformTarget>x86</PlatformTarget> just before </PropertyGroup> in the Debug and Release sections It should look like this when done <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <DefineDebug>true</DefineDebug> <DefineTrace>true</DefineTrace> <OutputPath>bin\Debug\</OutputPath> <DocumentationFile>LinqGroupBy.xml</DocumentationFile> <NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn> <PlatformTarget>x86</PlatformTarget></PropertyGroup><PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugType>pdbonly</DebugType> <DefineDebug>false</DefineDebug> <DefineTrace>true</DefineTrace> <Optimize>true</Optimize> <OutputPath>bin\Release\</OutputPath> <DocumentationFile>LinqGroupBy.xml</DocumentationFile> <NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn> <PlatformTarget>x86</PlatformTarget></PropertyGroup>

Share this post


Link to post
Share on other sites

With VB express 2008, you can easily change to x86 compilation from the menus.Build / Configuration Manager / Active solution platform: <New...>and then select x86.However, this will need to be done with each project, so changing the default as indicated in the above post would solve that problem.+++++++++++++If the Configuration Manager doesn't appear in your VB express 2008, you may need to check:Tools / Options / Projects and Solutions / General / "Show Advanced Build Configurations"Dick

Share this post


Link to post
Share on other sites

<shameless plug>And if you can hold on for a few more months, I'll have a new managed SimConnect client library that will let you build using the Any CPU setting :-> (although I haven't specifically tested it from VB.Net lately, I assume it should work)</shameless plug>

Share this post


Link to post
Share on other sites