Windows Vista Forums
Vista Forums Home Join Vista Forums Webcasts Vista Tutorials Tags

Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
Register at Vista forums...the world biggest Windows Vista resource Join Vista Forums Now

Go Back   Vista Forums > Microsoft Technical Newsgroups > Avalon

Change in rc1, code no longer working

Update your Vista Drivers Update Your Drivers Now!!
Closed Thread
 
Thread Tools Display Modes
Old 10-04-2006   #1 (permalink)
Griff
Guest


 

Change in rc1, code no longer working

I found another bit of simple code that worked in Beta 2 but not in rc1


c#

public partial class Window1 : System.Windows.Window
{
public Window1()
{
InitializeComponent();
Image im = new Image();
String filePath = @"c:\Program Files\Icons\sketch.JPG";
im.Source = (ImageSource)((new
ImageSourceConverter()).ConvertFromString(filePath));
MyGrid.Children.Add(im);
}
}

Whereas before this worked OK, it now causes Win32 Exception, but not when
the code above actually runs. It is specifically when the Image (or
something containing it) is first made visible and it gets rendered.

Any suggestions anyone ?



--
Griff
(trying to make an industrial UI with XAML/WPF/c#)

My System SpecsSystem Spec
Old 10-04-2006   #2 (permalink)
Douglas Stockwell
Guest


 

Re: Change in rc1, code no longer working

I can't seem to reproduce that. It doesn't raise an exception for me.

- Doug

"Griff" <Griff@discussions.microsoft.com> wrote in message
news:13262D20-D5C4-4233-BDE8-4A8D0B2060A7@microsoft.com...
>I found another bit of simple code that worked in Beta 2 but not in rc1
>
>
> c#
>
> public partial class Window1 : System.Windows.Window
> {
> public Window1()
> {
> InitializeComponent();
> Image im = new Image();
> String filePath = @"c:\Program Files\Icons\sketch.JPG";
> im.Source = (ImageSource)((new
> ImageSourceConverter()).ConvertFromString(filePath));
> MyGrid.Children.Add(im);
> }
> }
>
> Whereas before this worked OK, it now causes Win32 Exception, but not when
> the code above actually runs. It is specifically when the Image (or
> something containing it) is first made visible and it gets rendered.
>
> Any suggestions anyone ?
>
>
>
> --
> Griff
> (trying to make an industrial UI with XAML/WPF/c#)


My System SpecsSystem Spec
Old 10-05-2006   #3 (permalink)
Griff
Guest


 

Re: Change in rc1, code no longer working

I guess your installation must be different to mine then.

Maybe mine's not "clean"...

Are there any known issues with installing rc1 after previous versions ? I
did a control panels uninstall of all the WinFX components from Beta 2, then
installed 3.0 from scratch.

When I drill right down with debugger I end up with a write to unauthorised
memory somewhere in a DLL called something like WindowsCodecs.

Any suggestions as to where to look ?


--
Griff
(trying to make an industrial UI with XAML/WPF/c#)


"Douglas Stockwell" wrote:

> I can't seem to reproduce that. It doesn't raise an exception for me.
>
> - Doug
>
> "Griff" <Griff@discussions.microsoft.com> wrote in message
> news:13262D20-D5C4-4233-BDE8-4A8D0B2060A7@microsoft.com...
> >I found another bit of simple code that worked in Beta 2 but not in rc1
> >
> >
> > c#
> >
> > public partial class Window1 : System.Windows.Window
> > {
> > public Window1()
> > {
> > InitializeComponent();
> > Image im = new Image();
> > String filePath = @"c:\Program Files\Icons\sketch.JPG";
> > im.Source = (ImageSource)((new
> > ImageSourceConverter()).ConvertFromString(filePath));
> > MyGrid.Children.Add(im);
> > }
> > }
> >
> > Whereas before this worked OK, it now causes Win32 Exception, but not when
> > the code above actually runs. It is specifically when the Image (or
> > something containing it) is first made visible and it gets rendered.
> >
> > Any suggestions anyone ?
> >
> >
> >
> > --
> > Griff
> > (trying to make an industrial UI with XAML/WPF/c#)

>

My System SpecsSystem Spec
Old 10-05-2006   #4 (permalink)
Griff
Guest


 

Re: Change in rc1, code no longer working

Thanks to Doug's hint that it was my installation at fault, I found and fixed
the problem.

My WIC (Windows Imaging Component) files and somehow ended up as the wrong
version with all the CTP's I'd had installed.

Found Robert A. Wlodarczyk's Blog (MSFT) with the fix outlined.
http://blogs.msdn.com/rwlodarc/archi...25/607131.aspx

(It refers to beta 2 but the same fix works for 3.0 rc1).

All working again.


--
Griff
(trying to make an industrial UI with XAML/WPF/c#)


"Griff" wrote:

> I guess your installation must be different to mine then.
>
> Maybe mine's not "clean"...
>
> Are there any known issues with installing rc1 after previous versions ? I
> did a control panels uninstall of all the WinFX components from Beta 2, then
> installed 3.0 from scratch.
>
> When I drill right down with debugger I end up with a write to unauthorised
> memory somewhere in a DLL called something like WindowsCodecs.
>
> Any suggestions as to where to look ?
>
>
> --
> Griff
> (trying to make an industrial UI with XAML/WPF/c#)
>
>
> "Douglas Stockwell" wrote:
>
> > I can't seem to reproduce that. It doesn't raise an exception for me.
> >
> > - Doug
> >
> > "Griff" <Griff@discussions.microsoft.com> wrote in message
> > news:13262D20-D5C4-4233-BDE8-4A8D0B2060A7@microsoft.com...
> > >I found another bit of simple code that worked in Beta 2 but not in rc1
> > >
> > >
> > > c#
> > >
> > > public partial class Window1 : System.Windows.Window
> > > {
> > > public Window1()
> > > {
> > > InitializeComponent();
> > > Image im = new Image();
> > > String filePath = @"c:\Program Files\Icons\sketch.JPG";
> > > im.Source = (ImageSource)((new
> > > ImageSourceConverter()).ConvertFromString(filePath));
> > > MyGrid.Children.Add(im);
> > > }
> > > }
> > >
> > > Whereas before this worked OK, it now causes Win32 Exception, but not when
> > > the code above actually runs. It is specifically when the Image (or
> > > something containing it) is first made visible and it gets rendered.
> > >
> > > Any suggestions anyone ?
> > >
> > >
> > >
> > > --
> > > Griff
> > > (trying to make an industrial UI with XAML/WPF/c#)

> >

My System SpecsSystem Spec
Closed Thread

Thread Tools
Display Modes



Similar Threads
Thread Thread Starter Forum Replies Last Post
Power Management no longer allowing me to change display brightnes Shiroinohi Vista performance & maintenance 18 05-12-2008 09:16 AM
USB no longer working mrinventions General Discussion 0 03-01-2008 11:01 AM
Fn keys no longer working computerilliterate Vista General 6 09-19-2007 10:29 AM
wmp and wmc no longer working snewton62 Vista music pictures video 4 05-04-2007 03:28 AM
USB no longer working darthsabre Vista hardware & devices 1 03-09-2007 07:57 PM


Vistax64.com is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media 2005-2008

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51