OS OpenSpace [logo]

OS OpenSpace Forum » OS OpenSpace » OpenSpace Forum

Thread: Grid In Quest

Reply to this Thread Reply to this Thread Search Forum Search Forum Back to Thread List Back to Thread List

Permlink Replies: 6 - Pages: 1 - Last Post: 18-Sep-2011 00:22 by: CharlesHarrison
CharlesHarrison

Posts: 488
Registered: 28/08/08
Grid In Quest
Posted: 09-Sep-2011 16:48
  Click to reply to this thread Reply

I realise that this is off-topic, but I'm hoping that the powers that be will be tolerant and allow me to ask for help here, if only on the grounds that when I go to www.qgsl.com I see a message: "Grid InQuest download and support are no longer available". Nevertheless, I tried emailing along the following lines to the support address, but it bounced. I found nothing on the web either.

I'm trying to use GIQ60.dll from within a Python script. So far I've been trying the steps manually from the Python interpreter, as follows:

>>> from ctypes import *
>>> windll.LoadLibrary("C:\Program Files\Common Files\Quest\Geodetics\GIQ60.dll")
<WinDLL 'C:\Program Files\Common Files\Quest\Geodetics\GIQ60.dll', handle 10000000 at 9774d0>
>>> windll.GIQ60
<WinDLL 'GIQ60', handle 10000000 at 977750>
>>> windll.GIQ60.Intialise
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Program Files\Python\2.6\lib\ctypes\__init__.py", line 366, in __getattr__
func = self.__getitem__(name)
File "C:\Program Files\Python\2.6\lib\ctypes\__init__.py", line 371, in __getitem__
func = self._FuncPtr((name_or_ordinal, self))
AttributeError: function 'Intialise' not found

At this point I tried various other function names from Page 10 Section 2 'Getting Started' in the Grid InQuest Programming Manual.pdf, and none of them appeared to exist either! Puzzled, I read on to the example code sections, both of which suggest that an instance must be created before the functions from Section 2 are available via the instance. That at least makes sense, but is not actually documented anywhere, unless you count the specific coding examples as documentation - useful and worthwhile though these undoubtedly are, they are not documentation as such, nor an adequate substitute for it, as can be seen by what follows.

I loaded the DLL into Dependency Walker, and noted that, contrary to the documentation, there are only four functions exported:

DllCanUnloadNow
DllGetClassObject
DllRegisterServer
DllUnregisterServer

So, going back to Python I tried the following:

>>> windll.GIQ60.DllGetClassObject
<_FuncPtr object at 0x008DFAF8>

Thus encouraged, I tried:

>>> giq = windll.GIQ60.DllGetClassObject()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ValueError: Procedure probably called with not enough arguments (12 bytes missing)

Now we can see why proper documentation is needed, the DLL call clearly, and not unnaturally, expects some arguments, but I have no means of finding out what they are!

I'd be very grateful if anyone can help.

cmasters2002

Posts: 18
Registered: 28/11/09
Re: Grid In Quest
Posted: 15-Sep-2011 00:18   in response to: CharlesHarrison
  Click to reply to this thread Reply

Hi I am not sure if I can help or not!!
I have used the GIQ60.dll before but I use Delphi not Python, Delphi creates a type library for the DLL as a wrapper making it easy to use. I can email you a copy of the type Lib if you want which may give you come additional clues on how to interface with it?

From what i Remember the Initialise function has to be passed the password before any other functions are available


Colin

CharlesHarrison

Posts: 488
Registered: 28/08/08
Re: Grid In Quest
Posted: 15-Sep-2011 18:29   in response to: cmasters2002
  Click to reply to this thread Reply

> I have used the GIQ60.dll before but I use Delphi not
> Python, Delphi creates a type library for the DLL as
> a wrapper making it easy to use. I can email you a
> copy of the type Lib if you want which may give you
> come additional clues on how to interface with it?

Although I've since had to solve the original problem a different way (I loaded the Proj4js script into a JavaScript of my own and wrote all the transformed coordinates into a text file which was read by the Python script), I'd still like to know how to get this to work, so anything helpful you can mail to me will be gratefully received. Can you read my email in my user details? If not, I'll pmail you my email.

Thanks and regards, Charles.

cmasters2002

Posts: 18
Registered: 28/11/09
Re: Grid In Quest
Posted: 16-Sep-2011 16:18   in response to: CharlesHarrison
  Click to reply to this thread Reply

Hi I cannot see youe email, also I am not sure if you can send PM's on here, have had a look but to no avail.

Colin

CharlesHarrison

Posts: 488
Registered: 28/08/08
Re: Grid In Quest
Posted: 16-Sep-2011 22:18   in response to: cmasters2002
  Click to reply to this thread Reply

> Hi I cannot see youe email

The trouble used to be, and for all I know still is, that AFAIAA it is not possible to make it visible to forum members only - either everyone can see it or noone. To solve our communication problem here, I've temporarily made it visible.

> also I am not sure if you
> can send PM's on here, have had a look but to no
> avail.

Looks like you're right. We definitely used to be able to do it. I wonder when that convenient feature was removed?

You can email me at the address given in my user details.

Thanks and regards,

Charles

cmasters2002

Posts: 18
Registered: 28/11/09
Re: Grid In Quest
Posted: 18-Sep-2011 00:07   in response to: CharlesHarrison
  Click to reply to this thread Reply

Hi Charles
I have sent you an email as discussed

colin

CharlesHarrison

Posts: 488
Registered: 28/08/08
Re: Grid In Quest
Posted: 18-Sep-2011 00:22   in response to: cmasters2002
  Click to reply to this thread Reply

> I have sent you an email as discussed

Yes, arrived safely, thanks.

Will rehide my email now ...

Legend
Expert: 51 - 1000 pts
Advanced: 31 - 50 pts
Intermediate: 16 - 30 pts
Novice: 5 - 15 pts
Newbie: 0 - 4 pts
Helpful Answer
Correct Answer

Point your RSS reader here for a feed of the latest messages in all forums