Loading ...
Sorry, an error occurred while loading the content.
 

Compiling MDI project with VS.NET /clr switch

Expand Messages
  • soulofsealion <dworthem@msn.com>
    I generated a MDI project from the WTL7 wizard(originally done in VS6) I compiled this in VS.NET and the code executed OK. When I used the /clr switch. It
    Message 1 of 3 , Feb 2, 2003
      I generated a MDI project from the WTL7 wizard(originally done in VS6)

      I compiled this in VS.NET and the code executed OK. When I used
      the /clr switch. It compiles fine but when it creates the toolbar I
      get the following exception message:

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

      Additional information: Could not load type _IMAGELIST from assembly
      WTL7MDI, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null.


      If I remove all the toolbar code then the code executes OK. It
      appears that the clr compiler is having trouble handling the
      HIMAGELIST type in the assembly metadata. There appears not to be a
      problem with other handles such as HWND and HMENU.

      Has anyone experienced this and/or have a solution?

      thank you.

      Dennis Worthem
    • Rodrigo Strauss
      Is there any specific reason to compile the project for CLR?????? Strauss ... From: To: Sent: Monday, February 03,
      Message 2 of 3 , Feb 3, 2003
        Is there any specific reason to compile the project for CLR??????


        Strauss
        ----- Original Message -----
        From: <dworthem@...>
        To: <wtl@yahoogroups.com>
        Sent: Monday, February 03, 2003 12:31 AM
        Subject: [wtl] Compiling MDI project with VS.NET /clr switch


        > I generated a MDI project from the WTL7 wizard(originally done in VS6)
        >
        > I compiled this in VS.NET and the code executed OK. When I used
        > the /clr switch. It compiles fine but when it creates the toolbar I
        > get the following exception message:
        >
        > An unhandled exception of type 'System.TypeLoadException' occurred in
        > WTL7MDI.exe
        >
        > Additional information: Could not load type _IMAGELIST from assembly
        > WTL7MDI, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null.
        >
        >
        > If I remove all the toolbar code then the code executes OK. It
        > appears that the clr compiler is having trouble handling the
        > HIMAGELIST type in the assembly metadata. There appears not to be a
        > problem with other handles such as HWND and HMENU.
        >
        > Has anyone experienced this and/or have a solution?
        >
        > thank you.
        >
        > Dennis Worthem
        >
        >
        >
        >
        > To unsubscribe from this group, send an email to:
        > wtl-unsubscribe@yahoogroups.com
        >
        >
        >
        > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
        >
      • soulofsealion <dworthem@msn.com>
        I found the answer elsewhere. The problem is that HIMAGELIST is only forward declared as a struct in the windows header files. The solution is to put an
        Message 3 of 3 , Feb 3, 2003
          I found the answer elsewhere. The problem is that HIMAGELIST is only
          forward declared as a struct in the windows header files. The
          solution is to put an empty struct definition for _IMAGELIST
          (HIMAGELIST is typedefed as an NEAR* _IMAGELIST).

          Everything executes OK.

          Thanks anyway.

          Dennis

          P.S. I am investigating mixing some .NET Framework class code into
          the WTL project and ATL projects in genera.




          --- In wtl@yahoogroups.com, "soulofsealion <dworthem@m...>"
          <dworthem@m...> wrote:
          > I generated a MDI project from the WTL7 wizard(originally done in
          VS6)
          >
          > I compiled this in VS.NET and the code executed OK. When I used
          > the /clr switch. It compiles fine but when it creates the toolbar
          I
          > get the following exception message:
          >
          > An unhandled exception of type 'System.TypeLoadException' occurred
          in
          > WTL7MDI.exe
          >
          > Additional information: Could not load type _IMAGELIST from
          assembly
          > WTL7MDI, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null.
          >
          >
          > If I remove all the toolbar code then the code executes OK. It
          > appears that the clr compiler is having trouble handling the
          > HIMAGELIST type in the assembly metadata. There appears not to be a
          > problem with other handles such as HWND and HMENU.
          >
          > Has anyone experienced this and/or have a solution?
          >
          > thank you.
          >
          > Dennis Worthem
        Your message has been successfully submitted and would be delivered to recipients shortly.