FtpCreateDirectory ?

Post Reply
User avatar
Ale SB
Posts: 248
Joined: Wed Jan 11, 2006 11:30 am
Location: Campo Grande-MS / Brasil

FtpCreateDirectory ?

Post by Ale SB »

No es possible usar FtpCreateDirectory com fwPPc ?

estoy hacendo asi, y no esta criando el directory :

Code: Select all

FtpCreateDirectory( oBjIn:hFTP, "/public_html/Paste_1/NewPaste" )

Code: Select all

#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
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Ale,

Windows Mobile usa unicode, por lo que tienes que pasar esa cadena de ansi a unicode:

Code: Select all

#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
Post Reply