FW: boost::filesystem on WIN32: Problem passing pointer of native to path
Hello... We have problems here passing the boost::filesystem::native function as a checker on WIN32 platform, eg. like this ... boost::filesystem::path path ("d:\hello\hello", boost::filesystem::native); ... When we take the address of the function "boost::filesystem::native(...)" in dll A and the pass it to boost filesystem dll, the various comparisons with "native" inside path_posix_windows.cpp:m_path_append ( const std::string & src, name_check checker ) fail, and and the code throws an invalid name exception. (e.g. line 242: if ( (checker == no_check || checker == native) && src.size() >= 2 ) fails as checker != native) The microsoft compiler takes the address into an internal function table, instead of the adress of the "real" boost::filesystem::native () function, so the comparison can never be true. Anybody got an idea what to do? PS: Getting the address of the native function like this works: path ("d:\hello\hell", reinterpret_castboost::filesystem::path::name_check (GetProcAddress (GetModuleHandle("boost_filesystem-vc71-mt-gd-1_31"), "?native@filesystem@boost@@YA_NABV?$basic_string@DU?$char_traits@D@std@@ V?$allocator@D@2@@std@@@Z"))); But is not really an option... -- Christian Hoffmann This message, including any attachments, is intended only for the person(s) to whom it is addressed. If you received it in error, please let us know and delete the message from your system. This message may be confidential and may fall under the duty of non-disclosure. Any use by others than the intended addressee is prohibited. Trema shall not be liable for any damage related to the electronic transmission of this message, such as failure or delay of its delivery, interception or manipulation by third parties, or transmission of viruses or other malicious code.
participants (1)
-
Christian Hoffmann