|
|
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 |
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 |
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
there should be
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
|
|
|
|
Goto Forum:
Current Time: Thu Jan 23 01:57:49 CET 2025
Total time taken to generate the page: 0.01592 seconds
|
|
|