S
Scott Brogden
Any body have any luck using ftp from CF. I'm trying to bring in
InternetOpen, InternetConnet, FtpOpenFile and InternetWriteFile using
[ DllImport("wininet.dll", EntryPoint="FtpGetFileW",
CharSet=CharSet.Unicode) ]
public static extern UInt32 InternetOpenW(string sAgent, UInt32 nAccessType,
string sProxy, string sProxyBypass, UInt32 nFlags);
[ DllImport("wininet.dll", EntryPoint="InternetConnectW",
CharSet=CharSet.Unicode) ]
private static extern UInt32 InternetConnectW(UInt32 hInternet, string
ServerName, UInt16 ServerPort, string sUserName, string sPassword, UInt32
nService, UInt32 nFlags, UInt32 Context);
[ DllImport("wininet.dll", EntryPoint="InternetConnectW",
CharSet=CharSet.Unicode) ]
private static extern UInt32 FtpOpenFileW(UInt32 hConnect, string
lpszFileName, UInt32 dwAccess, UInt32 dwFlags, UInt32 dwContext);
[ DllImport("wininet.dll", EntryPoint="InternetWriteFile",
CharSet=CharSet.Unicode) ]
private static extern bool InternetWriteFile(UInt32 hFile, byte[] lpBuffer,
UInt32 dwNumberOfBytesToWrite, Int32 lpdwNumberOfBytesWritten);
See any problems with this. InternetOpen just returns 0. what would
HINTERNET correspond to in C#? Is there a better way of doing this?
Thanks
Scott
InternetOpen, InternetConnet, FtpOpenFile and InternetWriteFile using
[ DllImport("wininet.dll", EntryPoint="FtpGetFileW",
CharSet=CharSet.Unicode) ]
public static extern UInt32 InternetOpenW(string sAgent, UInt32 nAccessType,
string sProxy, string sProxyBypass, UInt32 nFlags);
[ DllImport("wininet.dll", EntryPoint="InternetConnectW",
CharSet=CharSet.Unicode) ]
private static extern UInt32 InternetConnectW(UInt32 hInternet, string
ServerName, UInt16 ServerPort, string sUserName, string sPassword, UInt32
nService, UInt32 nFlags, UInt32 Context);
[ DllImport("wininet.dll", EntryPoint="InternetConnectW",
CharSet=CharSet.Unicode) ]
private static extern UInt32 FtpOpenFileW(UInt32 hConnect, string
lpszFileName, UInt32 dwAccess, UInt32 dwFlags, UInt32 dwContext);
[ DllImport("wininet.dll", EntryPoint="InternetWriteFile",
CharSet=CharSet.Unicode) ]
private static extern bool InternetWriteFile(UInt32 hFile, byte[] lpBuffer,
UInt32 dwNumberOfBytesToWrite, Int32 lpdwNumberOfBytesWritten);
See any problems with this. InternetOpen just returns 0. what would
HINTERNET correspond to in C#? Is there a better way of doing this?
Thanks
Scott