Jump to content

You're browsing the 2004-2023 VATSIM Forums archive. All content is preserved in a read-only fashion.
For the latest forum posts, please visit https://forum.vatsim.net.

Need to find something? Use the Google search below.

EuroScope plugin: OpenURL


Merik Nanish 1184142
 Share

Recommended Posts

Merik Nanish 1184142
Posted
Posted (edited)

One of the nice features of VRC is the ".openurl" command. Using that, we have been able to have fancy commands in the alias file; for example, in VRC you can type ".openurl http://www.airnav.com/airport/KJFK" and it will automatically opens the AirNav page about JFK airport. Even better, you can add a ".airnav" command to your alias file which looks like ".airnav http://www.airnav.com/airport/$1" and then all you have to get the AirNav page for an airport is to type ".airnav XXXX" where XXXX is the ICAO identifier of that airport. Ain't that awesome?

 

The problem is that EuroScope doesn't have that functionality. Well not anymore! Someone (who might be typing these words) got sick of this, so he spent a few minutes and built a new plugin for EuroScope, called OpenURL!

 

You can download the DLL file from here: https://www.dropbox.com/s/t6izbpn6wlipaii/OpenURLPlugIn.dll (updated on 14 May 2015)

 

If you get the "failed to load plugin dll" error, install the Microsoft Visual Studio 2013 C++ DLLs from here: http://www.microsoft.com/en-us/download/details.aspx?id=40784 (or just download this DLL and save it in the plugin directory: https://www.dropbox.com/s/3b0ut5q1xf1n3kj/msvcr120.dll )

 

If you use EuroScope, you probably know how to load plugins. Just load this and, voila, now the .airnav command can work for you too!

Edited by Guest

NYARTCC Facility Engineer and Instructor

 

255qao8.png

Link to comment
Share on other sites

Svilen Vassilev
Posted
Posted

Very nice and useful, Merik! Thanks a lot!

C1/P2 | vaccbih.info

Link to comment
Share on other sites

  • 2 weeks later...
Janet Kino 1284502
Posted
Posted

Error message from Euroscope: "Failed to Load Plugin dll" along with location of dll file.

 

Windows 7 64 bit system and EuroScope 3.1d

Link to comment
Share on other sites

David Zhong
Posted
Posted

Where is Euroscope.exe located and where is the dll located?

 

Is Euroscope.exe being run as administrator?

 

Do you have User Access Control (UAC) enabled (it will be unless you or someone else has turned it off)?

David Zhong

Link to comment
Share on other sites

Janet Kino 1284502
Posted
Posted

Euroscope is located in F:\Program Files (x86)\EuroScope

 

All of my Euroscope plugins are in D:\Users\Janet\Docomeents\EuroScope\ES_Profiles\Settings\Plug Ins but I have also tried putting your dll in a subdirectory of F:\Program Files (x86)\EuroScope where the samples that come with Euroscope are installed.

 

I have tried loading your plugin both running Euroscope as Administrator and without it.

 

So far no luck.

Link to comment
Share on other sites

David Zhong
Posted
Posted

Merik, which version of the Visual C++ libraries did you build with?

David Zhong

Link to comment
Share on other sites

Janet Kino 1284502
Posted
Posted

Using Depends.exe I walked the dependencies of the plugin, and after searching my disks, I can see that I'm missing several of the dll's it needs. Looks like it needs to have several dll's redistributed with it or something like that.

Link to comment
Share on other sites

David Zhong
Posted
Posted

What are the dlls? Generally the problem is that there are some Microsoft C++ redistributables that the dev needs to tell everyone to get. If you tell me the names, I can help you find the appropriate ones.

David Zhong

Link to comment
Share on other sites

Bradley Grafelman
Posted
Posted
What are the dlls? Generally the problem is that there are some Microsoft C++ redistributables that the dev needs to tell everyone to get.
... or the developer just needs to make it easier on his target audience and recompile the program against the C++ runtime library that is more likely to be installed already.

 

For the OpenURLPlugIn.dll, it was linked against MSVCR120.DLL. This suggests that it depends on the Visual C++ Redistributable Packages for Visual Studio 2013.

 

EDIT: Also thought I'd throw this out there... quite often, if you get a problem related to not having the correct C++ runtime library installed, you can verify this is the root cause by opening Event Viewer and looking under Windows Logs --> Application (on Windows 7) for "SideBySide" errors. You'll likely see them complain about how an "activation context generation failed"; the "Dependent [Mod - Happy Thoughts]embly" value can also be used to determine which version of the runtime library you appear to be missing.

Link to comment
Share on other sites

Janet Kino 1284502
Posted
Posted

There isn't anything in event viewer that seems to be applicable to the error, but yeah, I agree with Bradley. I think the 2013 libraries are missing. I don't have the time right now to go back and look, but I think there were several drivers with the "120" suffix that it was looking for and I thought those were part of 2013.

Link to comment
Share on other sites

Janet Kino 1284502
Posted
Posted

The two missing dll's are MSVCR120.DLL and MFC120.DLL.

Link to comment
Share on other sites

David Zhong
Posted
Posted
or the developer just needs to make it easier on his target audience and recompile the program against the C++ runtime library that is more likely to be installed already.

 

But which one would that be? Alternatively, the dev can simply include the appropriate DLLs in the package or link the libraries as static objects.

 

Anyway... the MS Visual C++ 2013 Redistributables (aka the files that make you think your program works fine but then you discover it doesn't on other computers).

David Zhong

Link to comment
Share on other sites

Janet Kino 1284502
Posted
Posted

I found those yesterday and thought, "Aha, problem solved!". Not so easy. They won't install unless you have Visual Studio 2013 installed on your computer.

Link to comment
Share on other sites

David Zhong
Posted
Posted

They should... I've asked people to get these before and it has worked for them. If you have Visual Studio then you don't actually need this.

David Zhong

Link to comment
Share on other sites

Bradley Grafelman
Posted
Posted

Yeah, that's definitely not true... if you have Visual Studio 2013 installed, you already have those runtime libraries (and even more - you'll have the debug versions of them, too). The entire reason that "redistributable" package exists is for people who don't have Visual Studio 2013 installed.

 

EDIT:

or the developer just needs to make it easier on his target audience and recompile the program against the C++ runtime library that is more likely to be installed already.
But which one would that be?

Touché. That's an excellent question (and one I've struggled with at work many times ).

Link to comment
Share on other sites

Janet Kino 1284502
Posted
Posted

Turns out the download I had a problem with was a different one -- vc_mbcsmfc.exe. The MS page I downloaded it from was very similar to the one your link sent me to, and I jumped to conclusions. Sorry.

 

Anyway those libraries had what the .dll needed and it loaded right up. Now, I can go back and read the instructions on what it does.

 

Thanks guys.

Link to comment
Share on other sites

  • 4 weeks later...
Merik Nanish 1184142
Posted
Posted
What are the dlls? Generally the problem is that there are some Microsoft C++ redistributables that the dev needs to tell everyone to get.
... or the developer just needs to make it easier on his target audience and recompile the program against the C++ runtime library that is more likely to be installed already.

 

For the OpenURLPlugIn.dll, it was linked against MSVCR120.DLL. This suggests that it depends on the Visual C++ Redistributable Packages for Visual Studio 2013.

 

EDIT: Also thought I'd throw this out there... quite often, if you get a problem related to not having the correct C++ runtime library installed, you can verify this is the root cause by opening Event Viewer and looking under Windows Logs --> Application (on Windows 7) for "SideBySide" errors. You'll likely see them complain about how an "activation context generation failed"; the "Dependent [Mod - Happy Thoughts]embly" value can also be used to determine which version of the runtime library you appear to be missing.

 

Correct. I used Visual Studio 2013, and this is the first time ever that I programmed something in C++, so I wasn't aware of the dependencies issue. How can I fix it though? I cannot get my hands on older version of Visual Studio; perhaps the best thing is to just include that link you posted above as a README, so others can install the dependencies first?

NYARTCC Facility Engineer and Instructor

 

255qao8.png

Link to comment
Share on other sites

Bradley Grafelman
Posted
Posted

Merik,

 

Off the top of my head, you might have one or more of the following options:

 

  1. Include the necessary components of the runtime library with your plugin (probably just MSVCR120.DLL). VS has a "redist" directory (I think?) somewhere that includes the files you can redistribute with your application in this manner.
  2. See if you already have support to compile against older platforms; go to the property pages of your project in VS and check Configuration Properties --> General --> Platform Toolset. It might show options like "Visual Studio 2010 (v100)" (or older?). I'm not sure if this requires you to have multiple versions of VS (or some Microsoft SDK) installed or not - likely so.
  3. Use static linking rather than dynamic linking. There are a couple of (likely inconsequential) downsides... e.g. it won't benefit from bug/security fixes from Windows Update and it will make your file size slightly larger. IIRC, all you need to do for this is change Configuration Properties --> C/C++ --> Code Generation --> Runtime Library to be the non-DLL option (e.g. /MT rather than /MD).

Link to comment
Share on other sites

  • 1 month later...
Merik Nanish 1184142
Posted
Posted

Thanks for the response. I intentionally delayed this so I can test the plugin with ES 3.2 and also wanted to avoid asking you questions while you were working on ES 3.2 release.

 

As far as the three choices that you mentioned:

 

1) I am making the MSVCR120.DLL available as a link (added to my first post in this thread, size < 1 MB)

2) I can only compiled for Visual Studio 2013. No option for 2010 exists

3) Trying to compile with the /MT option gives me an error: "Please use the /MD switch for _AFXDLL builds". I fixed it by also changing the Configuration Properties --> General --> Use of MFC to "Static" rather than "Shared". I rebuilt the DLL and the link on the first post now goes the new DLL (about 1 MB in size).

NYARTCC Facility Engineer and Instructor

 

255qao8.png

Link to comment
Share on other sites

 Share