hi,

I've got a problem with embedded resources, I'm using this code:


--------------------------------------------------------------------------------

Dim path As String = Application.ProductName & " test.txt" '/// must be the exact path of the embedded exe.

Dim sReader As New IO.StreamReader(MyBase.GetType.Assembly.GetManifestResourceStream(path))

Dim sWriter As New IO.StreamWriter(New IO.FileStream("C:\test.txt", IO.FileMode.OpenOrCreate))

    While Not sReader.Peek

        sWriter.WriteLine(sReader.ReadLine)

    End While

   sWriter.Close()

    sReader.Close()

End Sub


--------------------------------------------------------------------------------



I am trying to get the test.txt file copied from the program's exe to the C:\

but on this line:

--------------------------------------------------------------------------------

Dim sReader As New IO.StreamReader(MyBase.GetType.Assembly.GetManifestResourceStream(path))

--------------------------------------------------------------------------------


I get told that it can't be NULL, yet the variable 'path' is not empty?

any help will be greatful,


-- 
§tudz

www.studzworld.com - Graphics, downloads, and alot of 3D
www.icewebdesign.biz - Cool Crisp and Hard web design