Jump to content

SimpleGpUsb - A home brew auto guider...


samtheeagle

Recommended Posts

  • Replies 133
  • Created
  • Last Reply

Hokai.

I guess the ASCOM apps are now compiled as 64bit executables. I was thinking that there is no reason a 32bit driver couldn't run on a 64bit system, but that only holds true if the app loading the driver is also 32bit... I'll see if I can knock up a 64bit compile for you.

Link to comment
Share on other sites

Hokai.

I guess the ASCOM apps are now compiled as 64bit executables. I was thinking that there is no reason a 32bit driver couldn't run on a 64bit system, but that only holds true if the app loading the driver is also 32bit... I'll see if I can knock up a 64bit compile for you.

Very much appreciated Sam, and for all your efforts in creating this project and making it available for others to use.

Link to comment
Share on other sites

I hope I didn't speak too soon... This is getting complicated. I don't have a 64bit build environment available to me right now. And having a quick look at the code it makes use of Win32.SafeHandles which I'm thinking might not work so well on Win64? I'll google it. But this might not be straight forward, or even possible :S

Link to comment
Share on other sites

Just had one quick thought... Relating to the COM interop stuff, I wonder if all I need to do is figure out how to register the driver as a 64bit COM component? It'd be nice if it was as simple as that... .NET code is architecture neutral, so it shouldn't care. When it gets run it basically figures out what sort of machine it's on and sorts itself out.

Link to comment
Share on other sites

Just had one quick thought... Relating to the COM interop stuff, I wonder if all I need to do is figure out how to register the driver as a 64bit COM component? It'd be nice if it was as simple as that... .NET code is architecture neutral, so it shouldn't care. When it gets run it basically figures out what sort of machine it's on and sorts itself out.

I'm talking way out of my depth here as I really don't know anything about it... but It did occur to me that if I could somehow recompile your source code as a 64 bit driver that it might work but I had know idea how to do it.

Of course I don't expect you to spend a lot of time on this Sam so I won't be (too) disappointed if you can't get it to work. :)

Link to comment
Share on other sites

Well I'll have a bit of a crack at it for you :)

Looking at the code, particularly the installer part, I think it should be using the RegAsm.exe from the 64bit framework installed on your machine, which to me would register things as 64bit. But perhaps that's being too simplistic?

Can you check that you have the following folder on your machine please? Of course where your windows install is might be a bit different...

C:\Windows\Microsoft.NET\Framework64\v2.0.50727

And that this folder has the RegAsm.exe in it.

-- EDIT --

Here's a random shot in the dark rebuild with some 64bit options turned on in the installer script... I'd suggest uninstalling the version you already have, and making sure that no files are left laying around...

http://www.guywebb.co.uk/SimpleGpUsb/Driver Install v1.0.2 x64.exe

Link to comment
Share on other sites

Indeed. As far as the .Net code is concerned the architecture is of no importance, as C#, or whatever language you use, is converted into a platform independent intermediate language (IL) which is what the .Net framework runs. The framework, be it 32 or 64 bits, will read the IL and create the appropriate machine specific instructions at execution time.

Going by the error message Rob supplied it seems to be related to the COM registration aspect, and COM has always been a tangled mess. The installer appears to have registered it as 32bit, but I'm not really clear as to why.

If we can get past this error I am still a bit concerned about parts of the code running on a 64bit system, but we can cross those bridges if we get to them :)

Link to comment
Share on other sites

o.k, I've uninstalled the simplegpusb driver I had, and just ran the new installer. There isn't now an option in Ascom (or PHD) telescope chooser to select simplegpusb.

I've checked and I do have RegAsm.exe in C:\Windows\Microsoft.NET\Framework64\v2.0.50727

Link to comment
Share on other sites

Right, can we take a step back here... Can you tell me what operating system you're running, and what bits of software you are trying to use. Obviously include whether it's 32bit or 64bit :)

I've got to be honest, the more I investigate this the more confused I get. As far as I can see PHD is a 32bit only program. The ASCOM FAQ suggests that many of it's components are 32bit, so why is the ASCOM telescope chooser seemingly 64bit? Perhaps the FAQ is out of date? In fact, I've just found this in one of the ASCOM pdfs:

"32bit only drivers will now be identified by the Chooser if selected by a 64bit application and an appropriate message will be given."

So am I wrong about PHD being a 32bit only app? As far as I can make out right now, the error is down to the fact that you're running a 64bit application, and it will be impossible to load a 32bit driver into its address space. But as previously discussed, the .NET code doesn't really have a "bit-ness", I think these issues are down to getting the COM interop parts registered correctly. That's what I hoped the shot in the dark rebuild would do, but apparently not.

Here's another tweaked installer, if this doesn't work I'll revert to asking you to try manually registering the components...

http://www.guywebb.co.uk/SimpleGpUsb/Driver Install v1.0.2 x64.exe

Link to comment
Share on other sites

What's happening is that the application is a 64 bit application. The driver is compiled and registered as a 32 bit application. You can't load a 32 bit DLL into a 64 bit application, that's a Windows restriction.

There are several options:

Compile the driver as "Any CPU" AND register it for both 32 and 64 bit operation. The current installer, provided as part of the ASCOM 6 platform, allows this.

Compile the application as x86. This makes it run as 32 bits, even on a 64 bit system. It will then run with the 32 bit driver. It's only possible if it's your own application of course.

You will need to develop with Platform 6 and it's a lot easier if you make this the minimum version.

Chris

Link to comment
Share on other sites

Well, I just canniballised bits of ArduinoAstroControl to make a Platform 6 minimal Telescope Driver, just enough to support what PHD demands. I just now managed to get the hardware and software going.

The autoguided EQ1 is born!

Link to comment
Share on other sites

Thanks Chris.

The .NET is compiled as Any CPU, so that's all ok. I guess the driver install I have is based on an old v5 or v5.5 template. Perhaps I should look to redoing it with the latest template. This build is compiled against the ASCOM6 platform.

Yes that's it. The V6 installer generator runs both the 32 and 64 bit versions of RegAsm.exe and that seems to be what's required.

Chris

Link to comment
Share on other sites

Here's another tweaked installer, if this doesn't work I'll revert to asking you to try manually registering the components...

http://www.guywebb.co.uk/SimpleGpUsb/Driver Install v1.0.2 x64.exe

This latest driver still doesn't appear as an option in Ascom Diagnostics under "choose device".

I've just remembered the driver I first installed was not the original driver you created but the "Driver Install - No Checks.exe" on the sgl Yahoo group. As mentioned previously this driver does show up as an option in Ascom Diagnostics but you get the 32bit error message.

Thanks for all your help in trying to get this working, Rob.

Link to comment
Share on other sites

Archived

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

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. By using this site, you agree to our Terms of Use.