Downloading DLLs

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I've created a web service that sends a DLL to a smartdevice client app via a
byte stream.. Unfortunately, when I attempt to use the function
File.Create("MainWindow.dll"), no file is created?

Any tips...?

-Ivan
 
It probably is created; I would suspect you're looking in a wrong place.

You see, unlike desktop, device has no notion of current folder so all paths
are absolute and this files ends up in a root folder.


--
Best regards,

Ilya

This posting is provided "AS IS" with no warranties, and confers no rights.

*** Want to find answers instantly? Here's how... ***

1. Go to
http://groups-beta.google.com/group/microsoft.public.dotnet.framework.compactframework?hl=en
2. Type your question in the text box near "Search this group" button.
3. Hit "Search this group" button.
4. Read answer(s).
 
I'm actually using reflection to denote the path of the current directory...

string path = System.IO.Path.GetDirectoryName(
System.Reflection.Assembly.GetExecutingAssembly().GetModules()
[0].FullyQualifiedName) + "\\MainWindow.dll";

try
{
if (File.Exists(path))
{
File.Delete(path);
}

FileStream fs = new FileStream(path, FileMode.CreateNew);
BinaryWriter binWriter = new BinaryWriter(fs);

binWriter.Write(assBytes);

binWriter.Close();
}
catch (Exception e)
{
MessageBox.Show("There was an error while writing the dll");
}
 
Back
Top