picnaut
11-08-2005, 10:55 AM
Hello VB Masters!
I need some help.
I've been doing research on the net and I am still no closer to success with my project.
Hopefully you can provide the answers to my questions.
I need a few things and I'd appreciate some brief usage examples (especially with registry related stuff).
I'd like to use Windows API calls where possible, and I'd prefer to have it backwards compatible to at least Windows 98.
In other words, if XP has a version of a particular API routine that is more efficient than the Windows 98 equivalent, I'd still like to use the Windows 98 routine. Actually, I could probably use both and have my program decide which one to use.
All I have is VB6, so NO VB.net examples please.
1) READING & WRITING TO THE REGISTRY
I need to be able to READ from and WRITE to values in the Windows registry.
I know how to find the particular value using Regedit, but I've tried using VB with Windows API's and I can't seem to get it to work.
Currently, I just want to "read" a string value and "read and write" a boolean value (0 or 1).
For instance, I need to read a string value called "LastFile" that's located in the following registry path: HKEY_CURRENT_USER\Software\NameOfSoftwareManufacturer\SoftwareName\Edi tor
I also need to read and write to a boolean value called "FullTitleFilename" that's located in the following registry path: HKEY_CURRENT_USER\Software\NameOfSoftwareManufacturer\SoftwareName\Opt ions
2) COMPARING TWO FILES
I need to be able to compare two files to see if they're different. I don't need to know what makes them different, but just that they ARE different. Does Windows embed some kind of checksum in files (i.e. a simple text file)? If so, reading that would probably be the least resource intensive.
3) DETECTING CONSOLE EXECUTABLES
I need to detect if an "old school" console (DOS-like) executable is running. This console application is launched from a Windows application which passes parameters to it when it starts (in the form of command-line-switches). I have no problem detecting Windows executables, but I can't seem to be able to detect when a small, minimized (i.e. no window pops up when it runs) program executes. This program can execute and close in as little as a second or two, so I need to catch it quickly. Alternatively, if there was a way I could read some kind of record that listed all of the programs/processes that had been run in the last 10 seconds (or any suitable time period) that would be even better, because then I could make my program a lot less resource intensive. Bonus points go to anybody who can show me how to detect that the program has run AND intercept any parameters (switches) that were passed to it!
Thanks in advance for all your help.
I really appreciate it.
Regards,
Peter
I need some help.
I've been doing research on the net and I am still no closer to success with my project.
Hopefully you can provide the answers to my questions.
I need a few things and I'd appreciate some brief usage examples (especially with registry related stuff).
I'd like to use Windows API calls where possible, and I'd prefer to have it backwards compatible to at least Windows 98.
In other words, if XP has a version of a particular API routine that is more efficient than the Windows 98 equivalent, I'd still like to use the Windows 98 routine. Actually, I could probably use both and have my program decide which one to use.
All I have is VB6, so NO VB.net examples please.
1) READING & WRITING TO THE REGISTRY
I need to be able to READ from and WRITE to values in the Windows registry.
I know how to find the particular value using Regedit, but I've tried using VB with Windows API's and I can't seem to get it to work.
Currently, I just want to "read" a string value and "read and write" a boolean value (0 or 1).
For instance, I need to read a string value called "LastFile" that's located in the following registry path: HKEY_CURRENT_USER\Software\NameOfSoftwareManufacturer\SoftwareName\Edi tor
I also need to read and write to a boolean value called "FullTitleFilename" that's located in the following registry path: HKEY_CURRENT_USER\Software\NameOfSoftwareManufacturer\SoftwareName\Opt ions
2) COMPARING TWO FILES
I need to be able to compare two files to see if they're different. I don't need to know what makes them different, but just that they ARE different. Does Windows embed some kind of checksum in files (i.e. a simple text file)? If so, reading that would probably be the least resource intensive.
3) DETECTING CONSOLE EXECUTABLES
I need to detect if an "old school" console (DOS-like) executable is running. This console application is launched from a Windows application which passes parameters to it when it starts (in the form of command-line-switches). I have no problem detecting Windows executables, but I can't seem to be able to detect when a small, minimized (i.e. no window pops up when it runs) program executes. This program can execute and close in as little as a second or two, so I need to catch it quickly. Alternatively, if there was a way I could read some kind of record that listed all of the programs/processes that had been run in the last 10 seconds (or any suitable time period) that would be even better, because then I could make my program a lot less resource intensive. Bonus points go to anybody who can show me how to detect that the program has run AND intercept any parameters (switches) that were passed to it!
Thanks in advance for all your help.
I really appreciate it.
Regards,
Peter