|
MSDN: "Hook Procedures"
You should use global hooks only for debugging purposes; otherwise, you should avoid them. Global hooks hurt system performance and cause conflicts with other applications that implement the same type of global hook.
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
How could i make an app start up before windows so it can access the partition tables, execute formats, repartition etc?? I mean something like Partitionmagic for example, you choose to delete a partition, like for example your C partition then it does something, u have to reboot and it does the job before windows is fully started (otherwise it cant access it because its protected?). Allthough in Windows 2000 and XP it seems sort of encapsulated, like windows starts but during startup it does the tasks, like where scandisk runs too.
Anyone know how to do this from an application?
Kuniva
--------------------------------------------
|
|
|
|
|
|
is there a way to pack or zap a recordset?
or do i have to create an outside program?
|
|
|
|
|
What do you mean by recordset?
Do you mean database recordset?
Best regards,
Alexandru Savescu
P.S. Interested in art? Visit this!
|
|
|
|
|
yes, i am sorry i am most likely using the wrong wording for vc++. pack and zap are database terms. pack will permently delete all records marked for deletion. zap removes all records from the table.
are there any mfc functions that do the same.
|
|
|
|
|
You could possibly serialize the recordset object, if this is what you mean, I am not sure.
-Nick Parker
|
|
|
|
|
you know that may be what i want to do, but i can not find any documentation on it. what does that function actually do?
and what does it required to be passed?
thanks
|
|
|
|
|
Is this a SQL database? If so, it has built-in stored procedures for just this sort of thing, and more.
|
|
|
|
|
it is a access database being accessed through odbc.
|
|
|
|
|
I'm not as experienced with Access, but I do not know of it having anything internally that will pack a database. If that is indeed the case, you will need to do it manually. Something like:
open database in exclusive mode
create a temporary database
for each row that is not marked for deletion, copy it to temporary database
close the temporary database
close the main database
delete the main database
rename the temporary database
This is a very high-level overview but hopefully you get the idea. You might also want to look at the Compact utility. It works in basically the same way I described above, but no doubt more elegantly!
|
|
|
|
|
that is what i was originally thinking. but that again is what i was hoping to avoid. when you get to large files this function becomes slow.
thank you.
|
|
|
|
|
First of all I am not sure what you mean by marked for deletion? Is there a field in the table that marks the recordset for deletion? If not, then you should check the batch mode.
If there is a field in the table that flags the record as deleted then you should check SetFilter or set_filter functions. This way only the records that need to be deleted will be accessed (you can specify your own filter criterias). If your database allows you to delete multiple records at once then you can go ahead and do that. If not, then you should iterate through each element and delete them.
How are you accessing the database? ODBC, ADO, etc.?
// Afterall, I realized that even my comment lines have bugs
When one cannot invent, one must at least improve (in bed).-My latest fortune cookie
|
|
|
|
|
I'm writing a very simple console program to solve a very specific problem i'm having:
I have two computers set up in a home network configuration. One is newer and one is older. I have my printer plugged into the older one (becuase of space). However, if the older comp is not on and I run Word i get this error (that references the printer driver) that crashes word. I've called customer support for the printer and the vendor but they are clueless (go figure). So I've decided to write a simple fix for this prob. However, I haven't written code in a year (no so much a prob) and there are some things i've never had to do in a prog that i'm going to have to do for this:
-start a process (the printer software) from within my prog...I'm probably going to use CreateProcess()
-end a process from within my prog
-to check and see if a process is running (the printer software)...wishful thinking tells me someone has a function that does this and will simply return a bool value
-to check if the other computer is connected to the network...I figured the easiest way to do this would be to ping the other computer and use the ping as the deciding factor, but how do you get a ping from within your own prog?
Any help on this would definently be great.
Thanks
PS I'm going to hide the prog using parameters from CreateProcess() because creating a service would be too much of a hassle.
|
|
|
|
|
What operating systems are you using? What kind of printer are you using? What version of word?
:wq! wrote:
ping the other computer and use the ping as the deciding factor, but how do you get a ping from within your own prog?
Yes this is probably the best way. I think there are a few examples that put a GUI on ping on this site.
I was thinking why not get a 1 port network printserver connect that to the printer and leave it on all the time. I have used them in the past. You should be able to buy one for less than $50 on ebay.
John
|
|
|
|
|
I'm writing the code in WinME (ick) and putting it on a WinXP box. This is kind of why I want to keep the program really simple.
|
|
|
|
|
I fogot: the printer is an hp 5550...HP technical support just told me that is was a Word prob and told me to call the vendor.
|
|
|
|
|
The reason why I asked these questions is that I have never experienced this myself and I have (as a system admin) seen many different printer configurations. I don't see why the printer driver would cause an application to crash but a badly written driver could.
John
|
|
|
|
|
me neither...
I've tried upgrading the driver and reinstalling word a couple of time to no avail. Besides why would Word be in communication with the printer while i'm typing?
|
|
|
|
|
Hi everyone!
I wonder how to associate my own extension to the program that I build.
For example I have saved a file as MyFile.ext. When I double-click the file in explorer I want to start my program and load the file. I do not use serialization.
The program is written in VC++6.0.
I appreciate any help
kratesis
|
|
|
|
|
When you create a new SDI or MDI application with AppWizard, it creates a .REG file that will register your app's extension.
|
|
|
|
|
I am creating several windows using the Create function within Visual C++(MFC), i plot a graph on one of the windows and need it to be updated regularly, as I am implementing a tooltip feature where the mouse can be moved over a point and then the value of that point is displayed. The problem i am having is refreshing the view when another value is displayed, as it keeps displaying the previous values on top of the graph which also means the graph cannot be viewed easily. Any ideas on solving this problem, I tried using Invalidate and UpdateWindow with no luck
Rishi
|
|
|
|
|
see:
http://www.codeproject.com/script/comments/forums.asp?msg=550923&forumid=1647#xx550923xx
and
http://www.codeproject.com/script/comments/forums.asp?msg=549039&forumid=1647#xx549039xx
now my test result is :
the clean app works, but the clean DLL does not.
a good man
|
|
|
|
|
Hi friends,
anybody knows how to Hide a file or folder programatically? I meant, I need to lock that file/folder with password and invisible also.Even if the windows explorer properties set to show hidden items.
Vikram
|
|
|
|
|
vikrams wrote:
I need to lock that file/folder with password
This (i.e., setting permissions) can only be done with an NTFS volume.
vikrams wrote:
...invisible also.Even if the windows explorer properties set to show hidden items.
Wouldn't this kind of defeat the purpose of Explorer being able to show hidden files? There is no super-hidden attribute.
|
|
|
|