Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Could not loa type _TREEITEM

3 views
Skip to first unread message

jlea

unread,
Apr 8, 2003, 4:47:18 PM4/8/03
to
I'm getting the following error message when a tree control is initialized:


An unhandled exception of type 'System.TypeLoadException' occurred in
Conbox.exe

Additional information: Could not load type _TREEITEM from assembly Conbox,
Version=0.0.0.0, Culture=neutral, PublicKeyToken=null


The project uses multiple resource files and all was ok until I tried to
build the app with /clr. It built ok (after changing a couple of settings)
but dies on the initialize. Anyone have any ideas? Thanks. Jon.


Tomas Restrepo [MVP]

unread,
Apr 8, 2003, 7:03:55 PM4/8/03
to
Jon,

The problem occurs because the windows headers only do a forward declaration
of _TREEITEM, but no real declaration, so the compiler never generates
metadata for it.

The workaround is to put an empty definition of _TREEITEM in one of your
.cpp files
(I'm have this one pending to add to my faq.... just haven't had the time
:) )

--
Tomas Restrepo
tom...@mvps.org

jlea

unread,
Apr 9, 2003, 4:11:22 PM4/9/03
to
Thanks very much for the help - I'll give it a try and let you know. Jon.

"Tomas Restrepo [MVP]" <tom...@mvps.org> wrote in message
news:eTygYZi$CHA....@TK2MSFTNGP11.phx.gbl...

jlea

unread,
Apr 9, 2003, 5:53:33 PM4/9/03
to
All is better - thanks. Jon.

"jlea" <j...@leapsoft.com> wrote in message
news:uhAIRPt$CHA....@TK2MSFTNGP12.phx.gbl...

0 new messages