And how do you open it (if it's a type of log file.)
Sounds like it's been written by Dr Watson (part of Windows) but I though that was dead...
Might be best asking this on Server Fault.
Related
I need the following information
How to get "C:\Document and settings\Network service" folder of XP OS
programmatically from Delphi2010?
What is the equivalent of above folder in Vista and Win7 OS ?
I need to set the Network Service"
account full rights for the above folder thru Delphi 2010
Any help on the above is highly appreciated!!
Thanks in adv
Ven
Here you go:
1) For WinXP: Use SHGetFolderPath API with CSIDL CSIDL_PROFILE to get the folder of your own profile (e.g. "C:\Documents and Settings\Steve"), remove your own name (the Steve part) and add NetworkService (giving you "C:\Documents and Settings\NetworkService"). There seems to be no direct way to get the Documents and Settings folder.
(Example for SHGetFolderPath usage: http://delphi.about.com/od/kbwinshell/a/SHGetFolderPath.htm)
2) For Win7 the location changed to "%windir%\ServiceProfiles\NetworkService", this is commonly "C:\Windows\ServiceProfiles\NetworkService". Don't know for Vista, might be the same.
3) The easiest way seems to be the approach described here: Create folder/file and set permissions
You can start the CACLS programm via ShellExecute API. See example of usage here: http://delphi.about.com/od/windowsshellapi/a/executeprogram.htm
In my school days, i developed a hotel management system in legacy programming language foxpro 2.6. Few months ago, i revived the application and its running pretty well on windows xp. But, i am stuck at printing. Right now i am printing the page to a text file. Afterward i manually open the file and call the print function on that.
I googled and found no effective tutorial or link or anything as to how can i get to print directly from foxpro 2.6. The printer is USB supported and i have tried the trick of adding another printer for virtual port LPT1 and then spooling. Nothing worked.
Later i downloaded an application which acts as a spooler and sends any file that is added to the specified directory to Printer. Still, no success.
Can anyone help me with a short example, a link or a tutorial which guides me to the printing settings in foxpro 2.6
Thanks !!
Install the printer and share it. You may need to set permissions to allow Authenticated Users to use the printer.
Add NET USE LPT1: \CRAIG\USBPRINTER to the logon script for the user's profile.
For help on logon scripts, look up "To assign a logon script to a profile" in XP Help.
Not true - it works perfectly well in Vista and Windows 7, as long as they are the 32-bit versions of those operating systems.
You might find the following useful. Disclaimer: I wrote it a long time ago.
Painless Legacy FoxPro Applications On Modern Networks
I have developed one windows service through which I am trying to open an word document. But when service tries to open document, it logs following error "There is insufficient memory. Save the document now."
If I run the same program as normal windows application, it works fine but problem comes only when I try to run the program as windows service.
I tried to google this problem, but there arent many answers about this problem. Is there any way to increase the memory limit for windows service or process? Something like in Java world, where we can specify memory limit while executing java class java -Xmx800M. Is there something similar for windows processes?
Does anyone knows how to solve this problem? I am using C#, .net framework 2.0 and office 2003 for development.
I found out that office automation is not recommended by microsoft on server side code.
More information can be found here.
EDIT :
I found one more article regarding office automation in server side code.
I am attempting to use WinDBG or another debugger to debug a CodeGear Delphi 2007 Windows application on a remote machine. I have been unable to produce symbol files for WinDBG.
Is there a way to use WinDBG or another debugger to debug Delphi applications on a system that doesn't include the IDE?
Edit1
The remote debugger is not an option here. I am able to remote in to the end user PC, but I am unable to use the remote debugger due to firewall restrictions.
Edit2
I am able to remote in to the machine, but can not connect the CodeGear remote debugger due to firewall restrictions.
How about the remote debugger? Build your app with remote debug symbols and debug from your development machine across the network.
instead, i rely on MadExcept stack tracing and some logging features. my application is distributed worldwide & this has been sufficient.
You can try generating a map file and then convert it to a dbg file using map2dbg from
http://code.google.com/p/map2dbg/
Then you can load the dbg file in WinDbg.
Disclaimer: I had faced a similar issue but I managed to do remote debugging and didn't have to do all this. So I am not sure this will work. But if you try it then do let us know if it works.
I'm afraid this is one more of those "I don't have an actual answer" answers, but it might just help...
Have you considered adding logging to your application? I've heard great things about SmartInspect. With it, you can log all sorts of information, including stack traces and "watches" (variables).
Another logging product for Delphi is EurekaLog.
In Delphi you could use Run -> Attach to Process, select the remote machine and select the process you'd like to debug.
http://sourceforge.net/projects/tds2dbg/ can be used to convert Delphi's TDS debug files to DBG files. This gives basic symbol information -- functions, classes, units, but not variables. Enough for a reasonable call stack, and with a bit of knowledge, enough to debug Delphi apps live and with dumps.
I've written about some of Delphi+WinDBG experiences on my blog: https://marc.durdin.net/2015/11/windbg-and-delphi-a-collection-of-posts/
Thank you all for the great suggestions and interesting products.
To solve this specific issue, the "best" way I found uses the OutputDebugString located in the Windows namespace. This, along with Debug View from Sysinternals, will allow me to gather debug information and sort through it pretty quickly.
If you decide to use this method, make sure everything is wrapped in ANSI formatting. IE:
OutputDebugString(PAnsiChar(string1 + string2));
This makes sure that string1 and string2 are combined and then converted in to ANSI Characters.
I probably should have just started dumping text to a file for something quick and dirty, but this will allow a non-debugging version to emit debugging messages.
Here's the situation:
A user of our program suddenly started receiving an error from the Borland Database Engine (BDE) when attempting to start the application. The error message says that it was unable to initialize the BDE and gives error code $251e. User is on BDE 5.2.0.2.
I cannot find any official documentation on the error $251e. The only somewhat useful hit I can get on Google is not very instructive and the suggestion there does no good.
Here are some things that we have tried / discovered:
Other applications that access the BDE the exact same way have no complaints.
The error occurs on a line where we set Connected := True on the TDatabase component.
Reinstalling the BDE makes no difference.
Closing all BDE apps except the one in question makes no difference.
Changing from using an MSSQL database to a Paradox database makes no difference.
Making the logged in user a member of the Administrators group on the workstation makes no difference.
The typically logged in user is a domain user.
Logging in as a workstation administrator (non-domain) account that was originally setup on the machine as a last resort administration account, all works fine.
Creating a new workstation user with local admin rights, the problem returns.
The user has been temporarily allowed to use the one workstation admin account that actually works, but this is not an acceptable long-term solution. Any idea where we might go from here? Any clue as to what $251e really means?
I know that the BDE is way out of date and no longer supported, but changing the use of the BDE is not an option right now.
You might have better luck searching for the error here..
http://www.fulltextsearch.com/
A common culprit seems to be a conflicting device driver.
Good luck
I am not sure, because I don't use BDE for lot's of years, but here are some hints and links:
Error is probably related to BDE parameters (as article you linked claims)
Here are some sites that have some suggestions for optimal BDE configuration
http://www.kennedysoftware.ie/oldapps.htm - check BDE section, have information about BDE configuration and some advices about using BDE with Vista
http://www.thedbcommunity.com/index.php - community site about Paradox and BDE
BDE issues from Codegear quality central
search newsgroup borland.public.bde - there is lots of questions about #251E
Error $251E means "Insufficient shared memory available"
Proposed solutions:
Increase SharedMemSize to 4096 or 8192
Change SharedMemLocation to 0x5BDE.
After using www.fulltextsearch.com to read through hundreds of messages regarding 251e (thanks for the pointer KevinRF), we came up with a list of about a half-dozen new things to try.
Turns out the user had turned on compatibility mode (right-click exe file, choose Properties, Compatibility tab) for the program in question. Turning compatibility mode off for the application resolved the error.
Thanks to all for the suggestions!
Turn off uac and add the setup.exe and regsvr32.exe to DEP.
look on codegear's web site. some time ago i saw an article about the memory layout for this shared memory and ways to resolve a problem like this. it's an ugly business but there was a good article on this. sorry, i can't find it offhand.
Wow, I tried a lot of tactics to try and solve this problem, and it was the same. Compatibility mode. Disabled the compatibility mode and the problem is gone for good.
If your executable is with the tables (same directory), try putting it in another location.
You can also Try to rename the Executable file name, had the same problem, I know it sounds strange but it worked for me.
Looks like the path somehow caused the problem.
I solved it by renaming the folder containing project files.