2 Replies Latest reply on Apr 13, 2016 5:51 AM by Ch. Efstathios

    MultiThread problem with FDK

    Ch. Efstathios Level 1

      Hi. I am using a C# desktop application. I have a C++\CLI wrapper that is connected with a native C++ library which is a custom FDK asynchronous client. In the C# application I use task parallelism (multi threading). Whenever I use the FDK client through C++\CLI wrapper from the main thread the FM API calls return data succesfully. However, when I use the FDK client from other thread (new Task) I get back no results. Is FDK multithreaded safe? Any help would be appreciated.

        • 1. Re: MultiThread problem with FDK
          Russ Ward Level 4



          I can't answer this question with any precision. I can say this, though... that older versions of FDK documentation specifically stated that clients operate in a single-threaded manner. Furthermore, in earlier versions of Visual C++, you had to set up your project as single-threaded in the code generation settings. In newer versions of Visual C++, this option no longer exists and now you have to use a multi-threaded option (/MD). The use of the multi-threaded option has been documented by Adobe and apparently they did something to make a DLL compile; however, I would suspect that the underlying functionality of the API has not changed.


          This is as much as I know... any deeper technical details would require someone with more development expertise.



          • 2. Re: MultiThread problem with FDK
            Ch. Efstathios Level 1

            I have downloaded the latest version of FDK: FDK2015.


            In the "fdkprogrammingguide.pdf" I see the following:


            With Code Generation still selected, choose Single-Threaded from the Runtime Library popup list. The FDK ships in a single-threaded version. By default, the project sets this option to Multi-threaded. Compiling the FDK with a multi-threaded runtime library produces the following warning: defaultlib "LIBC" conflicts with use of other libs;


            My projects are Visual C++ 2012 version and in the code generation under C/C++ section I have : Multi-threaded DLL (/MD) (for release mode) and Multi-threaded Debug DLL (/MDd) (under debug mode).


            There are many other properties there.


            Although it builds with Multi-threaded I see no better results.