- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 1
- Posts with Upvotes
- 1
- Upvoting Members
- 1
- Downvotes Received
- 4
- Posts with Downvotes
- 2
- Downvoting Members
- 4
Retired IBM Systems Programmer (VM/VSE)
- Interests
- C++ programming.
17 Posted Topics
Re: If you wish to open a specific drive tray .... // Must open "shareable" to avoid "driver already in use error" // "CDROM" can be any word you choose to be an alias sprintf(openstring,"open %c: type cdaudio alias CDROM shareable",Drive); mciSendString(openstring,NULL,0,0); mciSendString("set CDROM door open wait",NULL,0,0); mciSendString("set CDROM door closed … | |
This program was developed and tested in the XP environment, so the requisite platform is Windows. It demonstrates some basic sound file manipulation techniques using the Multimedia Control Interface (MCI). | |
A program that handles either piped input (command/prog | your_prog) or file redirected (your_prog < file_name) input. Determine whether such input exists before issuing a stdin read so that the program does not go into a "waiting for input" state. Written in/for the XP environment. | |
Re: If you're attempting to cast the variables to a different type, the type needs to be enclosed in parentheses. e.g., (double) distance_moon((float) speed, (double) radians). If the variables are defined as the proper type to begin with, there is no need to cast them. Specifying types is appropriate in the … | |
Re: Check this post in the C code snippets: "Determining if stdin data exists for your program BEFORE issuing fgetc() or similar command." It's on page 4 of the snippets. | |
Re: You have no declaration for m. Your Force calcuation needs to be Force = mass * a, not Force = m * a. | |
Re: I just looked at the first few bytes .... "In: TmljZSBzdGFydC4gIFN1cmUgaG9wZSB5b3UgdGhpbmsgaXQgd2FzIHN0dXBpZCBzaW1wbGUuIAoK Out: Nice start. Sure hope you think it was stupid simple. " What you're looking at is 64 byte encoding. | |
Displays which partitions are on which physical hard drives and shows partition starting offset and length. Developed and tested under XP using a Borland C++ compiler. Code is not provided for the private includes, but changes to make to code work are trival. References to werrtxt() and format() can be … | |
Code written and tested using the Borland C++ compiler. Code uses access() to determine if an input string exists either as a directory name or as a file name. If access() fails, the string is neither a file or directory and the function terminates. If it does exist, the name … | |
Here's some rudimentary code that does directory traversal recursively. Useful for inspecting the contents of a directory subtree. Sorting the directory information or inspecting file details within directories is beyond the scope of this routine. | |
Here are 2 pieces of code. The first makes a hidden partition accessible by creating a path to it and assigning a drive letter. The second removes the path definition, effectively rehiding the partition. It is advised that caution be taken in the use of this code. The core to … | |
This a routine that executes a _popen() pipe on your behalf and retrieves the spawned program's/comand's console output for you. Useful if your program needs data from another program and can't communicate directly with it. | |
Re: I had to go back to DOS (MS-DOS 6.22) and Borland 4.0 to get it to compile, but it worked well once compiled. On exit, however, it changed my screen colours to white on grey (from white on blue) and left the screen unresponsive to the color command. Great project … | |
A program that demonstrates opening Windows registry keys, reading data fields and closing the keys. | |
Two very short routines. CLIPPUT transfers data to the clipboard and CLIPGET retrieves data from the clipboard. Developed and tested in Windows XP using a Borland C++ compiler. | |
Programming Environment: Windows XP Compilers: Borland C++ Builder 6 (Personal)/Borland C++ 5.5 (freebie) This is a routine that queries the logical drives in the system, along with their device types, local/network status and whether or not the devices are removable. Once the data are gathered, the caller's selection parameters are … | |
Re: access() in <io.h> can be used to check for path/file existence. if (access(xxxxx,0) == 0) { // perform your objective } |
The End.