亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? win32platformutils.cpp

?? IBM的解析xml的工具Xerces的源代碼
?? CPP
?? 第 1 頁 / 共 2 頁
字號:
        return 0;    return retVal;}FileHandle XMLPlatformUtils::openStdInHandle(MemoryManager* const manager){    //    //  Get the standard input handle. Duplicate it and return that copy    //  since the outside world cannot tell the difference and will shut    //  down this handle when its done with it. If we gave out the orignal,    //  shutting it would prevent any further output.    //    HANDLE stdInOrg = ::GetStdHandle(STD_INPUT_HANDLE);    if (stdInOrg == INVALID_HANDLE_VALUE) {        XMLCh stdinStr[] = {chLatin_s, chLatin_t, chLatin_d, chLatin_i, chLatin_n, chNull};        ThrowXMLwithMemMgr1(XMLPlatformUtilsException, XMLExcepts::File_CouldNotOpenFile, stdinStr, manager);    }    HANDLE retHandle;    if (!::DuplicateHandle    (        ::GetCurrentProcess()        , stdInOrg        , ::GetCurrentProcess()        , &retHandle        , 0        , FALSE        , DUPLICATE_SAME_ACCESS))    {        ThrowXMLwithMemMgr(XMLPlatformUtilsException, XMLExcepts::File_CouldNotDupHandle, manager);    }    return retHandle;}unsigned intXMLPlatformUtils::readFileBuffer(       FileHandle      theFile                                , const unsigned int    toRead                                ,       XMLByte* const  toFill                                , MemoryManager* const  manager){    unsigned long bytesRead = 0;    if (!::ReadFile(theFile, toFill, toRead, &bytesRead, 0))    {        //        //  Check specially for a broken pipe error. If we get this, it just        //  means no more data from the pipe, so return zero.        //        if (::GetLastError() != ERROR_BROKEN_PIPE)            ThrowXMLwithMemMgr(XMLPlatformUtilsException, XMLExcepts::File_CouldNotReadFromFile, manager);    }    return (unsigned int)bytesRead;}voidXMLPlatformUtils::writeBufferToFile( FileHandle     const  theFile                                   , long                  toWrite                                   , const XMLByte* const  toFlush                                   , MemoryManager* const  manager){    if (!theFile        ||        (toWrite <= 0 ) ||        !toFlush         )        return;    const XMLByte* tmpFlush = (const XMLByte*) toFlush;    unsigned long  bytesWritten = 0;    while (true)    {        if (!::WriteFile(theFile, tmpFlush, toWrite, &bytesWritten, 0))            ThrowXMLwithMemMgr(XMLPlatformUtilsException, XMLExcepts::File_CouldNotWriteToFile, manager);        if (bytesWritten < (unsigned long) toWrite) //incomplete write        {            tmpFlush+=bytesWritten;            toWrite-=bytesWritten;            bytesWritten=0;        }        else            return;    }    return;}void XMLPlatformUtils::resetFile(FileHandle theFile                                 , MemoryManager* const manager){    // Seek to the start of the file    if (::SetFilePointer(theFile, 0, 0, FILE_BEGIN) == 0xFFFFFFFF)        ThrowXMLwithMemMgr(XMLPlatformUtilsException, XMLExcepts::File_CouldNotResetFile, manager);}// ---------------------------------------------------------------------------//  XMLPlatformUtils: File system methods// ---------------------------------------------------------------------------XMLCh* XMLPlatformUtils::getFullPath(const XMLCh* const srcPath,                                     MemoryManager* const manager){    //    //  If we are on NT, then use wide character APIs, else use ASCII APIs.    //  We have to do it manually since we are only built in ASCII mode from    //  the standpoint of the APIs.    //    if (gOnNT)    {        // Use a local buffer that is big enough for the largest legal path        const unsigned int bufSize = 1024;        XMLCh tmpPath[bufSize + 1];        XMLCh* namePart = 0;        if (!::GetFullPathNameW((LPCWSTR)srcPath, bufSize, (LPWSTR)tmpPath, (LPWSTR*)&namePart))            return 0;        // Return a copy of the path        return XMLString::replicate(tmpPath, manager);    }     else    {        // Transcode the incoming string        char* tmpSrcPath = XMLString::transcode(srcPath, fgMemoryManager);        ArrayJanitor<char> janSrcPath(tmpSrcPath, fgMemoryManager);        // Use a local buffer that is big enough for the largest legal path        const unsigned int bufSize = 511;        char tmpPath[511 + 1];        char* namePart = 0;        if (!::GetFullPathNameA(tmpSrcPath, bufSize, tmpPath, &namePart))            return 0;        // Return a transcoded copy of the path        return XMLString::transcode(tmpPath, manager);    }}bool XMLPlatformUtils::isRelative(const XMLCh* const toCheck                                  , MemoryManager* const manager){    // Check for pathological case of empty path    if (!toCheck[0])        return false;    //    //  If its starts with a drive, then it cannot be relative. Note that    //  we checked the drive not being empty above, so worst case its one    //  char long and the check of the 1st char will fail because its really    //  a null character.    //    if (toCheck[1] == chColon)    {        if (((toCheck[0] >= chLatin_A) && (toCheck[0] <= chLatin_Z))        ||  ((toCheck[0] >= chLatin_a) && (toCheck[0] <= chLatin_z)))        {            return false;        }    }    //    //  If it starts with a double slash, then it cannot be relative since    //  it's a remote file.    //    if (isBackSlash(toCheck[0]) && isBackSlash(toCheck[1]))        return false;    // Else assume its a relative path    return true;}XMLCh* XMLPlatformUtils::getCurrentDirectory(MemoryManager* const manager){    //    //  If we are on NT, then use wide character APIs, else use ASCII APIs.    //  We have to do it manually since we are only built in ASCII mode from    //  the standpoint of the APIs.    //    if (gOnNT)    {        // Use a local buffer that is big enough for the largest legal path        const unsigned int bufSize = 1024;        XMLCh tmpPath[bufSize + 1];        if (!::GetCurrentDirectoryW(bufSize, (LPWSTR)tmpPath))            return 0;        // Return a copy of the path        return XMLString::replicate(tmpPath, manager);    }     else    {        // Use a local buffer that is big enough for the largest legal path        const unsigned int bufSize = 511;        char tmpPath[511 + 1];        if (!::GetCurrentDirectoryA(bufSize, tmpPath))            return 0;        // Return a transcoded copy of the path        return XMLString::transcode(tmpPath, manager);    }}inline bool XMLPlatformUtils::isAnySlash(XMLCh c){    return c == chBackSlash    ||           c == chForwardSlash ||           c == chYenSign      ||           c == chWonSign;}// ---------------------------------------------------------------------------//  XMLPlatformUtils: Timing Methods// ---------------------------------------------------------------------------unsigned long XMLPlatformUtils::getCurrentMillis(){    return (unsigned long)::GetTickCount();}// ---------------------------------------------------------------------------//  Mutex methods// ---------------------------------------------------------------------------void XMLPlatformUtils::closeMutex(void* const mtxHandle){    ::DeleteCriticalSection((LPCRITICAL_SECTION)mtxHandle);    delete (CRITICAL_SECTION*)mtxHandle;}void XMLPlatformUtils::lockMutex(void* const mtxHandle){    ::EnterCriticalSection((LPCRITICAL_SECTION)mtxHandle);}void* XMLPlatformUtils::makeMutex(){    CRITICAL_SECTION* newCS = new CRITICAL_SECTION;    InitializeCriticalSection(newCS);    return newCS;}void XMLPlatformUtils::unlockMutex(void* const mtxHandle){    ::LeaveCriticalSection((LPCRITICAL_SECTION)mtxHandle);}// ---------------------------------------------------------------------------//  Miscellaneous synchronization methods// ---------------------------------------------------------------------------void*XMLPlatformUtils::compareAndSwap(       void**      toFill                                , const void* const newValue                                , const void* const toCompare){#if defined WIN64    return ::InterlockedCompareExchangePointer(toFill, (void*)newValue, (void*)toCompare);#else    //    //  InterlockedCompareExchange is only supported on Windows 98,    //  Windows NT 4.0, and newer -- not on Windows 95...    //  If you are willing to give up Win95 support change this to #if 0    //  otherwise we are back to using assembler.    //  (But only if building with compilers that support inline assembler.)    //    #if (defined(_MSC_VER) || defined(__BCPLUSPLUS__)) && !defined(XERCES_NO_ASM)    void*   result;    __asm    {        mov             eax, toCompare;        mov             ebx, newValue;        mov             ecx, toFill        lock cmpxchg    [ecx], ebx;        mov             result, eax;    }    return result;    #else    //    //  Note we have to cast off the constness of some of these because    //  the system APIs are not C++ aware in all cases.    //    return (void*) ::InterlockedCompareExchange((LPLONG)toFill, (LONG)newValue, (LONG)toCompare);    #endif#endif}// ---------------------------------------------------------------------------//  Atomic increment and decrement methods// ---------------------------------------------------------------------------int XMLPlatformUtils::atomicIncrement(int &location){    return ::InterlockedIncrement(&(long &)location);}int XMLPlatformUtils::atomicDecrement(int &location){    return ::InterlockedDecrement(&(long &)location);}// ---------------------------------------------------------------------------//  XMLPlatformUtils: Private Static Methods// ---------------------------------------------------------------------------////  This method is called by the platform independent part of this class//  during initialization. We have to create the type of net accessor that//  we want to use. If none, then just return zero.//XMLNetAccessor* XMLPlatformUtils::makeNetAccessor(){#if defined (XML_USE_NETACCESSOR_LIBWWW)    return new LibWWWNetAccessor();#elif defined (XML_USE_NETACCESSOR_WINSOCK)    return new WinSockNetAccessor();#else    return 0;#endif}////  This method is called by the platform independent part of this class//  when client code asks to have one of the supported message sets loaded.//  In our case, we use the ICU based message loader mechanism.//XMLMsgLoader* XMLPlatformUtils::loadAMsgSet(const XMLCh* const msgDomain){#if defined (XML_USE_INMEM_MESSAGELOADER)    return new InMemMsgLoader(msgDomain);#elif defined (XML_USE_WIN32_MSGLOADER)    return new Win32MsgLoader(msgDomain);#elif defined (XML_USE_ICU_MESSAGELOADER)    return new ICUMsgLoader(msgDomain);#else    #error You must provide a message loader#endif}////  This method is called very early in the bootstrapping process. This guy//  must create a transcoding service and return it. It cannot use any string//  methods, any transcoding services, throw any exceptions, etc... It just//  makes a transcoding service and returns it, or returns zero on failure.//XMLTransService* XMLPlatformUtils::makeTransService(){    //    //  Since we are going to use the ICU service, we have to tell it where    //  its converter files are. If the ICU_DATA environment variable is set,    //  then its been told. Otherwise, we tell it our default value relative    //  to our DLL.    //#if defined (XML_USE_ICU_TRANSCODER)    return new ICUTransService;#elif defined (XML_USE_WIN32_TRANSCODER)    return new Win32TransService;#elif defined (XML_USE_CYGWIN_TRANSCODER)    return new CygwinTransService;#else    #error You must provide a transcoding service implementation#endif}////  This method handles the Win32 per-platform basic init functions. The//  primary jobs here are getting the path to our DLL and to get the//  stdout and stderr file handles setup.//void XMLPlatformUtils::platformInit(){#if 0 && defined(_DEBUG)    //  Enable this code for memeory leak testing   // Send all reports to STDOUT   _CrtSetReportMode( _CRT_WARN, _CRTDBG_MODE_FILE );   _CrtSetReportFile( _CRT_WARN, _CRTDBG_FILE_STDOUT );   _CrtSetReportMode( _CRT_ERROR, _CRTDBG_MODE_FILE );   _CrtSetReportFile( _CRT_ERROR, _CRTDBG_FILE_STDOUT );   _CrtSetReportMode( _CRT_ASSERT, _CRTDBG_MODE_FILE );   _CrtSetReportFile( _CRT_ASSERT, _CRTDBG_FILE_STDOUT );    int tmpDbgFlag;    tmpDbgFlag = _CrtSetDbgFlag(_CRTDBG_REPORT_FLAG);    tmpDbgFlag |= _CRTDBG_LEAK_CHECK_DF;    _CrtSetDbgFlag(tmpDbgFlag);#endif    // Figure out if we are on NT and save that flag for later use    OSVERSIONINFO   OSVer;    OSVer.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);    ::GetVersionEx(&OSVer);    gOnNT = (OSVer.dwPlatformId == VER_PLATFORM_WIN32_NT);}void XMLPlatformUtils::platformTerm(){    // We don't have any temrination requirements for win32 at this time}#include <xercesc/util/LogicalPath.c>XERCES_CPP_NAMESPACE_END

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
中文子幕无线码一区tr| 麻豆91小视频| 三级久久三级久久| 国产v日产∨综合v精品视频| 精品视频123区在线观看| 国产欧美一区二区精品性色| 婷婷综合另类小说色区| 99在线视频精品| 久久综合九色综合欧美亚洲| 五月综合激情日本mⅴ| 99精品视频免费在线观看| 国产亚洲精品中文字幕| 美日韩一区二区| 欧美性色黄大片手机版| 成人免费小视频| av动漫一区二区| 国产日韩欧美一区二区三区乱码| 日本欧美一区二区| 欧美日韩在线三级| 一区二区三区av电影| 成人午夜激情片| 欧美国产精品一区| 国产美女主播视频一区| 精品国产免费人成在线观看| 日韩 欧美一区二区三区| 欧美三级蜜桃2在线观看| 一区二区三区在线影院| 色伊人久久综合中文字幕| 中文字幕va一区二区三区| 国产成人精品亚洲777人妖| 久久久国产精华| 国产乱码一区二区三区| 久久精品水蜜桃av综合天堂| 国内成人精品2018免费看| 精品久久久久久无| 国产精品夜夜嗨| 欧美国产综合一区二区| 懂色av一区二区三区蜜臀| 欧美国产综合色视频| 成人精品小蝌蚪| 综合亚洲深深色噜噜狠狠网站| gogogo免费视频观看亚洲一| 中文字幕一区三区| 91久久精品国产91性色tv| 午夜欧美在线一二页| 欧美高清www午色夜在线视频| 日韩福利电影在线| 欧美精品一区二区不卡| 国产大陆精品国产| 成人免费在线视频观看| 欧美亚洲自拍偷拍| 美腿丝袜亚洲一区| 国产精品你懂的| 91黄色免费网站| 美脚の诱脚舐め脚责91| 国产人伦精品一区二区| 色婷婷激情久久| 婷婷国产在线综合| 国产色综合一区| 欧美性做爰猛烈叫床潮| 日本视频在线一区| 国产精品美女久久久久aⅴ| 一本在线高清不卡dvd| 裸体一区二区三区| 国产精品久久精品日日| 欧美日韩视频第一区| 国产一区在线不卡| 一区二区成人在线观看| 精品久久久久av影院| 91蜜桃网址入口| 免费美女久久99| 自拍av一区二区三区| 精品剧情在线观看| 欧美视频一区在线观看| 国产成人综合精品三级| 一区二区三区蜜桃网| 国产亚洲精久久久久久| 欧美日韩国产精品自在自线| 国产成人av电影免费在线观看| 亚洲一区二区三区不卡国产欧美| 久久精品夜夜夜夜久久| 欧美一区二区三区免费在线看| 成人av免费在线播放| 亚洲欧美日韩综合aⅴ视频| 亚洲精品一线二线三线无人区| 91久久香蕉国产日韩欧美9色| 国产精品一区不卡| 蜜桃在线一区二区三区| 一区二区三区欧美在线观看| 欧美—级在线免费片| 欧美一级淫片007| 欧美性受xxxx| 99久久精品国产毛片| 国产一区二区三区四区五区美女| 视频一区欧美日韩| 国产精品进线69影院| 欧美精品一区二区三区在线播放| 欧美理论电影在线| 色综合久久88色综合天天免费| 成人高清伦理免费影院在线观看| 久久国产剧场电影| 免费在线观看视频一区| 日韩精品视频网站| 亚洲一本大道在线| 亚洲一区二区三区在线看| 亚洲精品欧美专区| 亚洲乱码国产乱码精品精的特点| 国产精品丝袜在线| 精品国产亚洲在线| 欧美一卡二卡在线| 日韩一区二区三区观看| 欧美日韩精品专区| 欧美美女网站色| 欧美人妖巨大在线| 欧美精品自拍偷拍| 日韩一级完整毛片| 日韩欧美aaaaaa| 精品久久久久久久人人人人传媒 | 国产成人aaa| 国产馆精品极品| 成人激情小说乱人伦| 不卡视频一二三四| 99精品一区二区三区| 91视频精品在这里| 欧美制服丝袜第一页| 国产偷v国产偷v亚洲高清| 欧美大片拔萝卜| 精品久久一二三区| 精品久久久久久综合日本欧美 | 欧美日韩一级二级三级| 欧美日韩午夜精品| 日韩免费在线观看| 久久精品在线观看| 亚洲欧美激情一区二区| 亚洲成人av资源| 老鸭窝一区二区久久精品| 国产精品综合视频| 91在线一区二区三区| 欧美性一级生活| 日韩精品最新网址| 国产精品国产三级国产aⅴ中文| 亚洲综合区在线| 日本在线不卡视频| 国产成人精品亚洲午夜麻豆| 色丁香久综合在线久综合在线观看| 欧美午夜理伦三级在线观看| 日韩免费视频一区二区| 国产精品日日摸夜夜摸av| 亚洲午夜一区二区三区| 国产综合久久久久久久久久久久| 成人av资源网站| 欧美一区二区免费| 1区2区3区精品视频| 美女视频一区在线观看| www.激情成人| 日韩欧美aaaaaa| 一区二区三区精品在线| 香蕉乱码成人久久天堂爱免费| 国模冰冰炮一区二区| 欧美最猛黑人xxxxx猛交| 欧美电影免费观看高清完整版 | 91福利社在线观看| 久久综合九色综合97_久久久| 亚洲欧美日韩系列| 激情欧美一区二区| 欧美视频日韩视频| 亚洲视频在线一区| 国产精品亚洲综合一区在线观看| 欧美男男青年gay1069videost| 欧美国产亚洲另类动漫| 日本伊人午夜精品| 色婷婷久久久亚洲一区二区三区 | 91视频精品在这里| 久久网站最新地址| 日韩高清不卡一区| 欧洲一区二区av| 亚洲天堂2014| 高清av一区二区| 欧美精品 日韩| 亚洲综合成人网| proumb性欧美在线观看| 久久久精品蜜桃| 另类综合日韩欧美亚洲| 欧美丰满美乳xxx高潮www| 亚洲精选视频在线| 99久久综合国产精品| 久久久久国产精品麻豆| 激情综合网av| 欧美成人高清电影在线| 日本欧美一区二区三区乱码| 欧美日韩高清一区二区| 亚洲午夜成aⅴ人片| 欧美性做爰猛烈叫床潮| 亚洲一本大道在线| 欧美日韩视频在线观看一区二区三区 | 一区二区三区在线视频免费| 91免费精品国自产拍在线不卡| 国产精品久久久久精k8| caoporn国产一区二区| 国产精品免费视频网站|