Is OfficeWritter PowerPointTemplate thread safe? - thread-safety

I am using OfficeWritter to create a PPT file in multiple thread application where I got the error regarding memory. So Can anyone let me know if can use OfficeWriter in multi threaded application.
I am getting error at when ppt start process: ppt.Process();

Yes OfficeWriter controls are considered thread safe. If you run into an issue in multi threaded environments it may be bug.
Source: Former developer on OfficeWriter

Related

List error application of TWC into a dataset

Our Mainfarmes batch applications are scheduled in Tiwoli workload schedular(TWS), by the end of the batch some of the application are going in error.
I want to know is there any way I can get th list of the error application into a dataset.??
I know we can go to "QCP - Query the status of work in progress " option in TWS and get the list of error jobs on screen, but I want it in a dataset..
I see 2 options to implement this scenario:
Create a PIF program, but that require programming skills. PIF are documented on the IBM Knowledge Center: The program interface (PIF)
Make a script using the WAPL (Workload Automation Programming Language). This has been added with TWSs 9.3, for previous release it was called SOE (Scheduling Operational Environment) and was available as an external unsupported tool.
I suggest to see at WAPL, even if I don't have an example to make exactly what you are looking for, this should be possible, and much easier with WAPL then making a PIF program.

Is there a way to attach with VS2013 to the application under focus?

We are developing a Prism application and starting the application under the debugger is pretty slow due to the loading modules procedure so we start the application and later on we attach to it.
Is there a way (macro, plugin, external tool) to attach to the application that is currently under focus? That would be very convenient.
According to some Research and my experience, it is not possible to attach the Debugger to the process whose window is in foreground. What may be the best solution for you, my friend, is the Just - In - Time Debugger. You can find more info here :
http://msdn.microsoft.com/de-de/library/5hs4b7a6.aspx
If you configure your application to use JIT, every time an error occurs, the following window will pop up : http://i.stack.imgur.com/gCBKq.png
Following Hans advice I've created a tool that exactly does that:
https://attacher.codeplex.com/
I hope it helps someone with the same need.

Custom error reporting (XP and above)

This is somewhat complex issue with several questions. Feel free to answer only the questions to which you have an answer.
I have a task to create minidumps in case of Windows exceptions for several of our components, and to support XP SP3 as minimal OS. Components include:
Standalone C++ apps
CSP and PKCS11 libraries (DLL's) to be used in known browsers
one UI and one non-UI service
Static libraries, which are used in all previous three points
The requirement is to have something like WER (from XP onward), but to send reports to dedicated vendor server instead of to Microsoft's current Winqual equivalent. It would be really nice the reporting functionality could be wrapped in one static library.
There are issues, though. DLL's are special beasts. How to generate a report only if fault happens in DLL code? Services may also require some special handling, of which I'm currently unaware.
First of all, is there a known open-source library that could help me with this task? If not, I'd have to roll my own.
My first thought is to have a sleeping watchdog thread in each of my modules. This thread just waits on an event, which will be set from unhandled exception filter. The thread would generate the report using MiniDumpWriteDump, send it over the internet and then finish, and in the mentioned filter we would wait for the thread to end, and then terminate the process. Any thoughts on this solution? For instance can Windows service under local system account access the internet at all?
You don't need to create a thread that "waits for an exception".Just register your own Exception handler using UnhandledExceptionFilter. Look at this URL, it is well explain how to take MiniDumpWriteDump when an exception occurs.
Windows services that run under local System credentials don't have network access.

Win32 threads synchronization/performance monitoring tools

would Intel(R) VTune(TM) Thread profiler be able to tell if threads synchronization was successful? I'm never profiled any application, where do i start?
What exactly are you trying to profile or measure?
If you are trying to protect a critical resource from being accessed by 2 or more threads at the same time, then use a synchronization primitive such as a mutex/critical section/slim reader-writer locks and surround the writes to the critical resource with these primitives.
If you are trying to figure out if there is any lock contention, then I believe the profilers out there will surely be able to help you out. I've never used the Intrl profiler myself, so I can't say how well it works. The new tools in VS2010 (http://code.msdn.microsoft.com/VS2010ppa) are a great way to figure out the problems in your code if your project is VS based.
I can probably help out a little more if you provide more details.

How to create Chrome like application in Delphi which runs multiple processes inside one Window?

Is it possible to create an "application group" which would run under one window, but in separate processes, like in Chrome browser? I'd like to divide one application into multiple parts, so that one crashing or jamming process cannot take down others, but still keep the look and feel as close to original system as possible.
I know the Chrome source is available, but is there anything even half ready made for Delphi?
I guess basically you would create multiple processes each of which creates a window/form. One of the processes has the master window in which every child window is embedded. That is as simple as calling SetParent. The windows in different processes would talk to each other using an IPC (Inter Process Communication) mechanism like named pipes or window messages.
See this question for an embedding example of using SetParent in Delphi. See this question for an example of using named pipes in Delphi.
Have a look at the Delphi code of HeidiSQL. It's a great open source MySQL client that implements this mechanism.
Read this newsitem that was posted when Chrome was released:
"Google playing catch-up with HeidiSQL?"
:-)
(source: heidisql.com)
Have a look at : http://blogs.microsoft.co.il/blogs/maxim/archive/2008/09/23/curiosity-killed-the-programmer-multiprocess-browser.aspx . The source of the app is in CSharp. I'm sure you can adapt it to Delphi.
Harriv, you can use a scheme based on plugins. where you have a main application and this dynamically load news functionality. There are several libraries available here I leave some.
(source: wikimedia.org)
Frameworks
TMS Plugin Framework
TJvPluginManager from JVCL
Delphi Plugin Framework
Hydra
Tutorials
Implementing Plug-Ins for Your Delphi Applications
How to make a Plugin for Your Application (Source Code)
Bye.
You can separate your application logic and execute it in several threads. That way, if one part of your application logic hangs up, you still have a responsive application. But you won't be able to put the GUI in multiple threads. The VCL requires you to execute all GUI related stuff in the main thread.
I am not sure about how Delphi operates but the standard procedure for multiprocess programming is forking.
You fork a new process with whatever code you want. Pass information to the forked process and let it run doing whatever it wants.
Can't explain multiprocess programming in one thread response. But look it up.

Resources