ftp_file.cpp

来自「将Janpanes文档转换为ISO-8859-1编码」· C++ 代码 · 共 48 行

CPP
48
字号
// Ftp_File.cpp : Defines the entry point for the console application.
//


#include "stdafx.h"



typedef int (WINAPI *RTFCONVEX) ( LPCTSTR pSrcFileName, LPCTSTR pDstFileName,
     int nSrcCodePage, int nDstCodePage, const RTFCONVEXINFO *pRtfconvExInfo ) ;


int main () {

    /* DLL */
    HINSTANCE hRtfconv ;
    RTFCONVEX pRtfconvEx ;

    /* Structures */
    RTFCONVEXINFO RtfconvExInfo = { sizeof(RTFCONVEXINFO) } ;

    /* Reading DLL */
    hRtfconv = LoadLibrary( TEXT("D:\\rtfc640_dll\\bin\\rtfconv.dll")) ;
    if ( hRtfconv == NULL ) {
        return 1 ;
    }

#ifdef UNICODE
    pRtfconvEx = (RTFCONVEX) GetProcAddress( hRtfconv, "RtfconvExW" ) ;
#else
    pRtfconvEx = (RTFCONVEX) GetProcAddress( hRtfconv, "RtfconvExA" ) ;
#endif
    if ( pRtfconvEx == NULL ) {
        FreeLibrary( hRtfconv ) ;
        return 1 ;
    }

    /* Options */
    RtfconvExInfo.dwConversionMode = CONVMODE_NO_HANKANA ;

    /* Conversion */
	cout<<pRtfconvEx ( _T("d:\\ShiftJIS.txt"), _T("d:\\ShiftIOS_JPS.txt"), 932, 50220, & RtfconvExInfo ) ;

    /* Finalization */
    FreeLibrary( hRtfconv ) ;
    return 0 ;
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?