FtpCreateDirectory ?

FtpCreateDirectory ?

Postby Ale SB » Tue Nov 11, 2008 6:16 pm

No es possible usar FtpCreateDirectory com fwPPc ?

estoy hacendo asi, y no esta criando el directory :

Code: Select all  Expand view
FtpCreateDirectory( oBjIn:hFTP, "/public_html/Paste_1/NewPaste" )

Code: Select all  Expand view
#pragma BEGINDUMP

#include "windows.h"
#include "wininet.h"
#include "hbapi.

HB_FUNC( FTPCREATEDIRECTORY )
{
    hb_retl( FtpCreateDirectory( ( HINTERNET ) hb_parnl( 1 ), hb_parc( 2 ) ) );
}
#pragma ENDDUMP


Saluds, Ale
aleseribeli@hotmail.com

FwH, Hb Svn, ADS 8.1, ADS 10, Pelles C, FwPPC, MsVc 2008, MsVc 2010
"Conhecimento, você não subtrai quando divide; mas soma e multiplica."
**---Mário Persona---**
User avatar
Ale SB
 
Posts: 248
Joined: Wed Jan 11, 2006 11:30 am
Location: Campo Grande-MS / Brasil

Postby Antonio Linares » Sat Nov 15, 2008 1:12 am

Ale,

Windows Mobile usa unicode, por lo que tienes que pasar esa cadena de ansi a unicode:
Code: Select all  Expand view
#pragma BEGINDUMP

#include "windows.h"
#include "wininet.h"
#include "hbapi.h"

WCHAR * AnsiToWide( char * );

HB_FUNC( FTPCREATEDIRECTORY )
{
    WCHAR * pW = AnsiToWide( hb_parc( 2 ) );

    hb_retl( FtpCreateDirectory( ( HINTERNET ) hb_parnl( 1 ), pW ) );
    hb_xfree( pW );
}
#pragma ENDDUMP
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42099
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Return to FiveWin para Pocket PC

Who is online

Users browsing this forum: No registered users and 11 guests