This project is read-only.

Error 8002801D: Library not registered

Aug 15, 2011 at 7:12 PM

Hello,

 

I started integrating MapWinGIS OCX control (version 4.8RC2) in our application (not .net based).

I can open and display a shapefile without problems, but when accessing some methods/properties I get the error "Library not registered" (code 8002801D).

The problematic methods are for example Open in object Table, Open in object Image, ...

Does anyone know what the problem is ? (Am I missing some library or is it a problem with the OCX itself ?)

The operating system is Windows XP 32-bit.

If you want to reproduce the error then create and execute a file named "test.vbs" with the following content:

Set table = CreateObject("MapWinGIS.Table")
Wscript.Echo table.LastErrorCode

Aug 15, 2011 at 8:06 PM

Usually that means some supporting libraries as missing. To test this theory you could do a full MapWindow installation and test your application to see if it works.

- Dan
--------
Daniel P. Ames Ph.D.
Idaho State University Dept. of Geosciences
dan.ames@isu.edu
--------
Sent from my Droid

On Aug 15, 2011 12:16 PM, "mht666" <notifications@codeplex.com> wrote:
> From: mht666
>
> Hello, I started integrating MapWinGIS OCX control (version 4.8RC2) in our application (not .net based).I can open and display a shapefile without problems, but when accessing some methods/properties I get the error "Library not registered" (code 8002801D).The problematic methods are for example Open in object Table, Open in object Image, ...Does anyone know what the problem is ? (Am I missing some library or is it a problem with the OCX itself ?)The operating system is Windows XP 32-bit.If you want to reproduce the error then create and execute a file named "test.vbs" with the following content:Set table = CreateObject("MapWinGIS.Table")Wscript.Echo table.LastErrorCode
>
>
Aug 16, 2011 at 6:17 AM

I tried doing that, but the result is the same.

 

Could you, or anyone execute the provided script, whether it gives the same error ?

Aug 16, 2011 at 11:59 PM
Edited Aug 17, 2011 at 12:02 AM

Seems to work fine on my end.  Running XP Pro 32-bit with SP3.  Did you try re-registering the OCX:

regsvr32 /u MapWinGIS.ocx

regsvr32 MapWinGIS.ocx

 

-Sam

Aug 17, 2011 at 6:42 AM

Yes, I tried unregistering and registering the OCX - same result. (I´m also running XP Pro 32-bit with SP3.)

Did you run the script I provided ?

 

Is there a way to find out what library I´m missing (if the problem is a nmissing library) - maybe a debug build with detailed logging ?

 

Aug 19, 2011 at 12:55 AM

Pretty much, but I didn't run a VBScript, just a vb6 app with the mapwingis component referenced.  Any reason you need to run VBScript?

Aug 19, 2011 at 6:33 AM

To make sure we are running it under the same conditions. I think a vb6 app is OK in this regard.

Aug 19, 2011 at 7:41 PM

Well, it isn't exactly the same conditions, running it as a VBScript did not work.  You probably need to be able to reference the ActiveX control somehow.  I'm not a VBScript wizard though, actually I have never written any VBScript.

 

-Sam

Aug 20, 2011 at 8:14 AM

I don't work with VBScript either, but I'm doing the same things in our application and it's the only way of doing it. So it looks like it's a problem with the OCX itself, but I don't know how to find or fix it.

Would if help to create an issue on the issue tracker ?

Aug 27, 2011 at 8:41 AM
Edited Aug 31, 2011 at 6:57 AM

I found the cause of the error.

It's a mismatch between the OCX version and versions of COM object interfaces.

 

In file "COM classes\TableClass.h" I changed the line:

    public IDispatchImpl<ITable, &IID_ITable, &LIBID_MapWinGIS, /*wMajor =*/ 1, /*wMinor =*/ 0>

to line:

    public IDispatchImpl<ITable, &IID_ITable, &LIBID_MapWinGIS, /*wMajor =*/ 4, /*wMinor =*/ 8>

 

I made similar changes in files: ESRIGridManager.h, Extents.h, Field.h, Grid.h, GridColorBreak.h, GridColorScheme.h, GridHeader.h, Image.h, LabelCategory.h, LabelClass.h, Labels.h, PointClass.h, Shape.h, ShapeDrawingOptions.h, Shapefile.h, ShapefileColorBreak.h, ShapefileColorScheme.h, ShapeNetwork.h, Tin.h, Utils.h, Vector.h

The other COM objects already had a version 4.8.

The resulting OCX worked like it should without the error.

 

P.S. I created a patch to fix the error here: http://mapwingis.codeplex.com/SourceControl/list/patches

Sep 10, 2011 at 11:33 AM

I've just committed the changes, though I defined version numbers globally to change them more easily. Let me know whether it works for you.

Thanks, for your contribution.

Sep 12, 2011 at 8:29 AM

I tested it and it works.

Oct 21, 2011 at 10:06 AM

hi,Sergei,

I don't have your email, so  in this reply I hope to ask you a quesition about the Label question.

That is , can I set one Label visible and another Label invisible in the same shapefile?

Do you have any method to help me?

Thanks, Li