• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

MSFS20 #include $vc_directories

DragonflightDesign

Resource contributor
Messages
1,369
Country
northernireland
I've finally been dragged into this rabbit hole... 😄 programming WASM. Apart from the errors in the gauges.h file, the first serious problem I ended up butting my head against is the seeming inability to access windows.h etc. to port over some of the ease-of-use functions I created for P3D. I tried adding the paths to the various SDK folders using the Additional Include Directories field and also the VC++ Directories Property Page but the more I chased the resulting 'can't find x.h file', the more errors appeared as I did add the include path to whichever Windows SDK .h file it was. Is this something to do with the WASM sandbox or something to do with the MSFS SDK simply not letting me do it? Is there any way around it? An example list of the headers that I can not access:

#include <windows.h>
#include <shlobj.h>
#include <io.h>
#include <initguid.h>
#include <tchar.h>
#include <strsafe.h>
#include <sdkddkver.h>
#include <shlobj.h>
#include <shlwapi.h>
#include <oaidl.h>
#include <atlbase.h>
 
Uh... I don't think you can access windows.h because you're running in webassembly... not WIndows. Also... you won't get any I/O support... heck, there's a long, long list of what you won't get with WASM... basically, if it uses Windows... nope!
 
Yeah. I found the 'available' standard Windows header files in the MSFS SDK\WASM\wasi-sysroot\include\ folder. What a complete piece of pigeon poop. I can't even use something as simple as the standard tolower/toupper C++ calls because they violate the banned files. And yet they have dirent.h in there - I thought that would have been banned outright!

Okay, so maybe I could write my own toupper/tolower 😄. OTOH they're probably banned the use of pointers too... :rolleyes:

At least I can be pretty sure of what I'm limited to now. Something tells me I'm really not going to enjoy this learning process (sigh). Dare I ask if you've managed to get SimConnect running inside WASM? Or is that banned too?
 
I can't blame you. At least at this point I can tell you that yes, you can get SimConnect running inside WASM. It's only taken six hours... :rotfl:

msfssc.jpg
 
Wrapping toupper in a putchar() function, works for me in WASM.

As already mentioned , Windows functions or Windows SDK is out, you're pretty much limited to the package areas.
 
Hi Ernie

That's pretty much what I was thinking. I had toupper wrapped in a UCase(string) function and tolower wrapped in an LCase(string) function. Only about three lines each but oh-so-useful at times.

-Dai
 
Back
Top