Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Library : Other (not classified elsewhere) » OleCalc from examples - can't register OCX
OleCalc from examples - can't register OCX [message #17342] Fri, 08 August 2008 10:25 Go to next message
qapko is currently offline  qapko
Messages: 55
Registered: October 2007
Location: Slovakia
Member
Hello,
I can't register calc.ocx compiled from OleCalc example. When running registration utility (in Theide or through command line) it complains with error code 80040200. In calc.log there is this error message:

Registering library "C:\Prog\Upp_2008.1\out\MSC8.Dll.Force_size.Gui.Mt\calc.ocx"
LoadTypeLib(C:\Prog\Upp_2008.1\out\MSC8.Dll.Force_size.Gui.M t\calc.ocx) -> 00000000, hr = 80028019
-> failed: 80040200

Error code 80028019 means "Old format or invalid type library" (google). I'm using Visual C++ 8.0.
Do you have any recommendations? Thank you for your help.

Gabi
Re: OleCalc from examples - can't register OCX [message #17347 is a reply to message #17342] Fri, 08 August 2008 11:47 Go to previous messageGo to next message
rylek is currently offline  rylek
Messages: 79
Registered: November 2005
Member
Hello!

The OCX building has several catches. Please open the source directory (.../examples/OleCalc) and look for the file named "calc.tlb". I bet you'll find a file of zero or some small size (just a few bytes). This is a bug caused partly by UVS synchronization, partly by simplicity of the IDE make processor which is so-so able to cope with the OCX build process. I've just also noticed that in my "live" examples there's a typo in the calc.rc file, instead of

1 TYPELIB "calc.idl"


there should be

1 TYPELIB "calc.tlb"


Please delete the TLB file, correct this typo and try to rebuild, it should start working. Sorry for that, I don't have any idea how this got there, it makes no sense to me.

The catch is that the build process has more stages than when building a traditional application: MIDL (defined by a Custom build step) has to be run to build the interface definition (in calc.idl); this produces the TLB library, which is later compiled into the application resources (it is included from calc.rc and built by the resource compiler).

In a way the main problem is really that the TLB file is generated into the source directory. This shouldn't be really so as it's technically an intermediate compilation product (like an object file), but for practical reasons it is simpler to put it there (otherwise it would have to be included with full path from the resource file or the object directory would have to be present in the resource build step include path set, which cannot be currently done).

Regards

Tomas
Re: OleCalc from examples - can't register OCX [message #17349 is a reply to message #17347] Fri, 08 August 2008 12:44 Go to previous message
qapko is currently offline  qapko
Messages: 55
Registered: October 2007
Location: Slovakia
Member
Thank you very much Smile
It was this typo in calc.rc. Before reporting the problem I actually removed all generated files in OleCalc directory and then regenerated them again so in my case calc.tlb was OK.
Once more, thank you for your attention.

Gabi
Previous Topic: Drag & Drop Sample Size
Next Topic: CtrlLib PaletteLayout wrong size (Very Minor)
Goto Forum:
  


Current Time: Sat Apr 20 04:28:15 CEST 2024

Total time taken to generate the page: 0.04294 seconds