Click here to Skip to main content
15,902,198 members
Home / Discussions / Mobile
   

Mobile

 
AnswerRe: Image in DataGrid?? Pin
sven-it8-Jan-08 20:23
sven-it8-Jan-08 20:23 
QuestionCan I develop Google map api to display on Mobile phone or PDA? Pin
bowling28-Dec-07 12:24
bowling28-Dec-07 12:24 
AnswerRe: Can I develop Google map api to display on Mobile phone or PDA? Pin
Ravenet7-Feb-08 16:05
Ravenet7-Feb-08 16:05 
GeneralNative coders blog for Windows mobile developer. Pin
Member 387706527-Dec-07 21:45
Member 387706527-Dec-07 21:45 
GeneralRe: Native coders blog for Windows mobile developer. Pin
Ravenet7-Feb-08 16:08
Ravenet7-Feb-08 16:08 
GeneralMobile software compatible with VC6 Pin
QuickDeveloper23-Dec-07 23:14
QuickDeveloper23-Dec-07 23:14 
GeneralRe: Mobile software compatible with VC6 Pin
Mike Dimmick24-Dec-07 12:38
Mike Dimmick24-Dec-07 12:38 
GeneralFTP ERROR CANT OPEN PORT FOR DATA CONNECTION ..... Pin
M_Pramod20-Dec-07 2:01
M_Pramod20-Dec-07 2:01 
Hi ,
I am trying to retrieve a file from server to the device emulator in my application .
I am able to login successfully on the ftp server but not able to open the port for data connection to retrieve file from server.

Please guide ...

Pramod

//----------------------------- CODE ---------------------------------
HINTERNET hInternet,hConnect, handle;<br />
<br />
HINTERNET pTemp = 0;<br />
<br />
<br />
hInternet = InternetOpen(TEXT("DevX Sample"),INTERNET_OPEN_TYPE_DIRECT, NULL, 0,INTERNET_FLAG_NO_CACHE_WRITE);<br />
<br />
<br />
hConnect = InternetConnect(hInternet, TEXT("ps2672"),INTERNET_DEFAULT_FTP_PORT, NULL, NULL, INTERNET_SERVICE_FTP,0,0);<br />
<br />
if( hConnect==NULL)<br />
<br />
{<br />
<br />
printf("hiiii");<br />
<br />
}<br />
<br />
HANDLE hFile = CreateFile(TEXT("test1.txt"), GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);<br />
<br />
// FAILS HERE, CAN'T OPEN PORT FOR DATA CONNECTION<br />
<br />
if (!(handle = FtpOpenFile(hConnect, TEXT("abc.txt"), GENERIC_WRITE,<br />
<br />
INTERNET_FLAG_TRANSFER_ASCII | FTP_TRANSFER_TYPE_ASCII ,0))) <br />
<br />
DWORD abc=GetLastError(),abc3=40;<br />
<br />
wchar_t *abc1=new wchar_t [40];<br />
<br />
InternetGetLastResponseInfo(&abc,abc1,&abc);<br />
<br />
MessageBox(hWnd,abc1,NULL,0);<br />
<br />
}<br />
<br />
else<br />
<br />
{<br />
<br />
char buff[1000]; unsigned long read;<br />
<br />
while (InternetReadFile(handle, buff, 1000, &read) && read);<br />
<br />
}<br />
<br />
CloseHandle(hFile);<br />
<br />
InternetCloseHandle(handle);<br />
<br />
InternetCloseHandle(hConnect);<br />
<br />
InternetCloseHandle(hInternet);


//----------------------------- OUTPUT ------------------------------------------------------------------



2007-12-19 17:55:47- User connected from 127.0.0.1 1858

2007-12-19 17:55:47- (not logged in) (127.0.0.1) > 220 Welcome to WinFtp Server.

2007-12-19 17:55:47- (not logged in) (127.0.0.1) > USER anonymous

2007-12-19 17:55:47- anonymous (127.0.0.1) > 331 Password required for anonymous

2007-12-19 17:55:48- anonymous (127.0.0.1) > PASS *********

2007-12-19 17:55:48- anonymous (127.0.0.1) > 230 Logged on

2007-12-19 17:55:58- anonymous (127.0.0.1) > TYPE A

2007-12-19 17:55:58- anonymous (127.0.0.1) > 200 Type set to A

2007-12-19 17:55:58- anonymous (127.0.0.1) > PORT 192,168,55,101,4,27

2007-12-19 17:55:58- anonymous (127.0.0.1) > 200 Port command successful

2007-12-19 17:55:58- anonymous (127.0.0.1) > STOR abc.txt

2007-12-19 17:56:19- anonymous (127.0.0.1) > 425 Can't open data connection.

2007-12-19 17:58:10- User disconnected from 127.0.0.1
"No one will believe in you unless you believe in youself"
GeneralRe: FTP ERROR CANT OPEN PORT FOR DATA CONNECTION ..... Pin
Arjun Marwaha21-Feb-08 23:42
Arjun Marwaha21-Feb-08 23:42 
GeneralCoding 4 fun Pin
kingletas19-Dec-07 8:40
kingletas19-Dec-07 8:40 
NewsNew site offers tools, support, training for Mobile ISVs Pin
brucedkyle18-Dec-07 8:51
brucedkyle18-Dec-07 8:51 
QuestionCan I resize Form in device application Pin
MANOJ BATRA13-Dec-07 20:49
MANOJ BATRA13-Dec-07 20:49 
AnswerRe: Can I resize Form in device application Pin
Mike Dimmick16-Dec-07 1:49
Mike Dimmick16-Dec-07 1:49 
GeneralRe: Can I resize Form in device application Pin
Christopher Fairbairn31-Jan-08 16:15
Christopher Fairbairn31-Jan-08 16:15 
AnswerRe: Can I resize Form in device application Pin
Ravenet7-Feb-08 16:14
Ravenet7-Feb-08 16:14 
GeneralAutoscale function in CF Pin
haolan12-Dec-07 0:37
haolan12-Dec-07 0:37 
GeneralRe: Autoscale function in CF Pin
Alain Rist12-Dec-07 21:29
Alain Rist12-Dec-07 21:29 
GeneralWindows mobile 6.0 CE strip problem Pin
Yoyosch10-Dec-07 20:48
Yoyosch10-Dec-07 20:48 
GeneralRe: Windows mobile 6.0 CE strip problem Pin
Jared Bienz [MSFT]13-Dec-07 4:48
Jared Bienz [MSFT]13-Dec-07 4:48 
Generaldownloading zip file to PDA Pin
gottimukkala10-Dec-07 2:06
gottimukkala10-Dec-07 2:06 
GeneralRe: downloading zip file to PDA Pin
Arjun Marwaha22-Feb-08 1:11
Arjun Marwaha22-Feb-08 1:11 
GeneralIntegrating Application Help File Pocket PC's Help System (TOC) Pin
PavanPareta6-Dec-07 23:04
PavanPareta6-Dec-07 23:04 
GeneralRe: Integrating Application Help File Pocket PC's Help System (TOC) Pin
Meenakshi Sundaram.k6-Dec-07 23:15
Meenakshi Sundaram.k6-Dec-07 23:15 
GeneralBitmap to Hex codes Pin
pete007_ke6-Dec-07 3:42
pete007_ke6-Dec-07 3:42 
QuestionHow do I detect the audio/video capabilities on windows mobile Pin
jit_knit5-Dec-07 18:43
jit_knit5-Dec-07 18:43 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.