Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. Bertv100

    Retrieving session ID

    Found a solution. Regards, Bert Vingerhoets vingerhoetsbert@hotmail.com
  2. Bertv100

    Retrieving session ID

    Hi, I'm trying to retrieve the session ID of a process. More specifically, a printer driver process; and the session ID I need is the one in which the user who submitted the print job is working. In Windows XP, I use the user's security token to let SYSTEM impersonate as that user, call...
  3. Bertv100

    Reading and writing to files

    In that case you should add a stock_code entry in the record and expand your user interaction with a writeln and a readln, analogous to what you have now. Regards, Bert Vingerhoets vingerhoetsbert@hotmail.com http://student.vub.ac.be/~bvingerh/ Don't worry what people think about you. They're...
  4. Bertv100

    Reading and writing to files

    I appreciate you telling us that, but which problems do you still have? Regards, Bert Vingerhoets vingerhoetsbert@hotmail.com http://student.vub.ac.be/~bvingerh/ Don't worry what people think about you. They're too busy wondering what you think about them.
  5. Bertv100

    metronome

    Indeed, but you can overcome this problem by calibrating a correcting factor: perform a long delay and see how long it really takes with gettime. Regards, Bert Vingerhoets vingerhoetsbert@hotmail.com http://student.vub.ac.be/~bvingerh/ Don't worry what people think about you. They're too busy...
  6. Bertv100

    metronome

    You can search on google to find an existing metronome application. If you want to program one yourself, you can use the sound, nosound and delay functions of the crt unit. Regards, Bert Vingerhoets vingerhoetsbert@hotmail.com http://student.vub.ac.be/~bvingerh/ Don't worry what people think...
  7. Bertv100

    Problem with Turbo Pascal in Windows2000 cmd.exe/DOS-box

    If the program works from within the IDE and not from DOS, this means that the program messes with interrupts. Before running a program the TP IDE saves all interrupt handlers, when the program has finished, the handlers are restored. Even during the run of a program it is not certain that a...
  8. Bertv100

    Ctrl-Break does not break (BP7 in XP-DosBox)

    Ctrl-Break works fine here. Note that not all operations can be interrupted by a break (e.g. a break during a readln will interrupt the program after the readln statement is completed). Regards, Bert Vingerhoets vingerhoetsbert@hotmail.com http://student.vub.ac.be/~bvingerh/ Don't worry what...
  9. Bertv100

    decompiling .exe files in turbo pascal

    The halting problem is not a problem, it's the name for a theorem and its proof. I mentioned it because it is related to the problem of creating an accurate decompiler. The point I'm trying to make is that it is virtually impossible to produce a program that restores a binary file into its...
  10. Bertv100

    Reading and writing to files

    It is quite a lot, but since it's there ... It's also clear you were giving a practical solution. If you would have responded like that to a core aspect of the problem, I would have red flagged it. Questions that are too general or vague deserve an equally general and vague answer. If, however...
  11. Bertv100

    Reading and writing to files

    Some remarks: - This is not modular programming. It's procedural or structured programming. You get modular programming when you use mudules (duh). A module is a black box with an interface. The user only needs to know the interface, the programmer of the module only needs to know what it should...
  12. Bertv100

    Reading and writing to files

    You can't use the append procedure on binary files (they can be opened in read/write mode, so there's no need). When you open an existing binary file, you should use reset (rewrite clears an existing file and makes a new one). To write to the end of a binary file, use the seek procedure...
  13. Bertv100

    Find filename of running program

    paramstr(0) does indeed return the drive, full path and filename of the running executable. If you're running from the IDE, you will get the path to your executables directory. To search directories, you can use findfirst and findnext in Turbo 7.0. I don't know if they exist in Turbo 5.5...
  14. Bertv100

    decompiling .exe files in turbo pascal

    I said that a decompiler should be able to know what a program does to produce accurate code. A program that can decide what another program does, just by looking at it, is closely related to the halting problem. And even when the program to decompile is executed to see what it does, it's not...
  15. Bertv100

    decompiling .exe files in turbo pascal

    A disassembler literally translates a binary file to mnemonics. These mnemonics are only a *readable* version of the machine code and makes is easier for programmers to write code (e.g. "MOV AX,BX" is easier to remember than 89D8h). A decompiler (if one existed) would go one step...
  16. Bertv100

    Borland Pascal - Graphics problem again

    This problem is due to modern BIOSes not supporting the (full) ASCII set anymore. Try to use smallfont, if you don't use large characters, it's as good as defaultfont (it's proportional though). You can also use gothicfont, triplexfont, sansseriffont, ... Example...
  17. Bertv100

    Reading from file error

    It can be helpful sometimes to switch on range checking when debugging programs: {$R+} Regards, Bert Vingerhoets vingerhoetsbert@hotmail.com http://student.vub.ac.be/~bvingerh/ Don't worry what people think about you. They're too busy wondering what you think about them.
  18. Bertv100

    Polish fonts

    This has nothing to with the compiler and everything with the BIOS of your computer. ASCII was originally a 7 bit standard, so only the first 128 characters are the same on every computer. Characters #128 to #255 can be used to support regional characters (such as ê, ë, è, ò, Ö, Ü, etc) and can...
  19. Bertv100

    Reading from file error

    Var means that a pointer is put on the stack in stead of a copy of the whole structure. As a result, changes to the structure from within the procedure will also be applied to structure that was passed. Example: procedure test(s1 : string; var s2 : string); begin s1:='one'; s2:='two'; end...
  20. Bertv100

    Reading from file error

    Reading past the end of a text file is no problem, when reading a string, the result will be the empty string; when reading integers, the result will be 0 and when reading floating point types, the result will be 0.0. Furthermore, when a line is too long to be read entirely, the only logical...

Part and Inventory Search

Back
Top