|
I my dictionary I found it as application which works in background of system. It starts mostly before starting of system. Do u know other name for such application ?
If so, please post it here.
_________<br />
I'm made in C++... and I'm proud of it!
|
|
|
|
|
The term "background application" is a holdover from the days of Unix and DOS (see TSR). It is meaningless within Windows because of its multitasking capabilities.
That said, what exactly is it that you are trying to accomplish?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
I want to do for my parents an app which will log to file every application which run on it. My parents have an office - they want to prevent from using chattin' tools in it so they asked me. It have to work in background, otherwise it can be easily closed what will cause stopping of logging.
_________<br />
I'm made in C++... and I'm proud of it!
|
|
|
|
|
Thanks, that makes more sense!
Unless you are one with the OS, I don't not believe there is a foolproof way of keeping someone from shutting down your application if they really want it shut down. For the most part, this sort of application works great for the (semi) honest person. If a person is a guru and is determined to play a game, IM, etc, they will find a way around such barriers.
I've run into some tough spyware issues in the past but the one that impressed me most was comprised of two applications. From my observations, it appeared as though each was programmed to (once per second?) watch out for the other so that if one was shut down, the other would start it back up and vice-versa. Given that you can only shut down one application at a time via Task Manager (I'm sure there are other utilities out there that allow this), there was no way for me to shut them down at the same time. After about 45 minutes of trying everything I could think of, I finally rid the machine of the spyware. The guy whose machine I was working on was in awe/disbelief at how deep things could get in regards to spyware and the like. I think a bit of his naivety was removed that day.
What OS are we talking about here? If it is at least Windows 2000, you could put some policies in place that would lock the OS down pretty well. Policies/permissions are a very underutilized feature in my opinion. You can uninstall all but the necessary applications, keep other applications from being installed, restrict access to the CD and floppy drives, etc. All this can be done without an ounce of code.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
I'm using here win[sh*t]98... and I want to write an app, you can ask why. Here's the answer: I want to practise my programming skills and.. this app will work in my parents office - they just want to have a proof if some1 is using chattin' app like MSN, ICQ etc., also this app will log every WWW title to the file - than we will know what was she/he doing and when. Do you know how to help me?
I'm going now - be back tomorrow -.- I'm from europe! It's 18:26 now thought... have to go to home and make my homeworks [I'm just 18years-old.. hah!]. Keep posting! I'll be back tomorrow and I'll read everything !
_________<br />
I'm made in C++... and I'm proud of it!
|
|
|
|
|
Micie wrote:
I want to practise my programming skills...
An admiral goal.
Micie wrote:
...they just want to have a proof if some1 is using chattin' app like MSN, ICQ etc.
Some of these chat-type programs communicate on a specific port. If you can configure the firewall to block those ports, problem solved.
Micie wrote:
...also this app will log every WWW title to the file
This would require the creation of a Browser Helper Object (BHO).
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
I ran into this with the Xupiter Spyware/Malware or whatever that CRAP was.
Only it had THREE programs doing this.
My trick was to stop one and have an explorer window OPEN to the folder where the EXE file was located. Once stopping it, I immediately deleted the EXE file.
Then I went onto the next one.
There were some DLLs loaded by IE and locked in memory that were a little tricker, and they resurrected one or two of the EXE files.
So.... I wrote a custom tool that has a file browser.
Any file I select gets added to the 'delete at restart' of Windows.
So, I added a bunch of the DLL files from Xupiter to this kill list, and the EXE files.
When I rebooted, it was mostly gone, then it was some manual cleanup of the registry.
Have not seen it since.
|
|
|
|
|
Blake Miller wrote:
I ran into this with the Xupiter...
I've battled this one several times.
Blake Miller wrote:
My trick was to stop one and have an explorer window OPEN to the folder where the EXE file was located. Once stopping it, I immediately deleted the EXE file.
Then I went onto the next one.
Good idea.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
What do you mean by a Residential Application? If you clarify that it may be possible to give you a useful answer.
Mike
|
|
|
|
|
Windows NT Service should do the trick.
|
|
|
|
|
I have written a MFC Screensaver and it runs just fine. There is one problem...when Yahoo Messenger displays a toast notification, the toast is displayed on top of my screensaver. This does not seem to happen with other, shipped-with-windows, screensavers. My screensaver window is already created with the WS_EX_TOPMOST flag. What more, if more, can I do to prevent this? Any tips, thoughts, pointers to another resource...???
I have already searched different groups and discussion boards but just can't find anything. If my answer is out there, I have failed in guessing the correct search keywords.
Thanks,
Randy
|
|
|
|
|
Hi, i need to get a handle to the file i opened.
pPos = mainApp->GetFirstDocTemplatePosition();
docTempl = mainApp->GetNextDocTemplate( pPos );
// docTempl now has the correct pointer.
The CDocTemplates holds more CDocuments that are opened. I need a handle from doctempl that i retrieved, to i can close the document (if it was open).
Anyone experience with this? thx, Jack.
|
|
|
|
|
A CDocument does not have a handle. If you want a handle to the file that the CDocument currently holds, use CreateFile() . Something like:
CString strFile = GetDocument()->GetPathName();
HANDLE hFile = CreateFile(strFile, GENERIC_READ, ...);
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Hi everyone,
I am having problems trying to use a templated function.
I have a templated function like so:
template <class T>
bool SetCellStyle(int row, int column, const T & value)
Now I call the function like this for example:
void MyFunc(int value)
{
objectPointer->SetCellStyle<int>(row, column, value);
}
This results in the following error:
error C2275: 'int' : illegal use of this type as an expression.
I do not know why I am not allowed to do this. I would really appreciate some help here.
Thanks,
Pankaj
<font size = "1">
/**
I'm the one who's gonna have to die
When it's time for me to die
So let me live my life
The way I want to
- Jimi Hendrix
*/</font>
|
|
|
|
|
Hello, first of all please turn the "Do not treat <'s as HTML tags" checkbox on when posting code, so that < s are shown properly. I reproduce here your code (with brackets):
template <class T>
bool SetCellStyle(int row, int column, const T & value)
void MyFunc(int value)
{
objectPointer->SetCellStyle<int>(row, column, value);
} Is MyFunc by chance a member function of a class template? If so, maybe you're being hit by a nasty problem with so called dependent contexts. Please try the following and report the results:
void MyFunc(int value)
{
objectPointer-> template SetCellStyle<int>(row, column, value);
} Did that work?
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
Want a Boost forum in Code Project? Vote here[^]!
|
|
|
|
|
Oh, also, you don't really need the <int> part here. The following should suffice:
void MyFunc(int value)
{
objectPointer->SetCellStyle(row, column, value);
}
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
Want a Boost forum in Code Project? Vote here[^]!
|
|
|
|
|
Hi!
Thanks. The whole problem was the <int> in the call. It behaves ok when I use
objectPointer->SetCellStyle(row, column, value) instead of
objectPointer->SetCellStyle<int>(row, column, value);
I have no idea why. I thought after VS 5.0 this problem disappeared. I am going to try it with VS 7 to see what happens.
Cheers,
Pankaj
<font size = "1">
/**
I'm the one who's gonna have to die
When it's time for me to die
So let me live my life
The way I want to
- Jimi Hendrix
*/</font>
|
|
|
|
|
Hi,
I have two projects
1. DLL project: Creating one .dll file
2. Application project: Which uses the .dll file created in Dll project
First I execute the Dll Project in Debug mode wherein it creates a .dll file. Now I copy this .dll file to the Debug folder of Application project. Now I execute the Application project in debug mode which uses the created .dll file.
How can I debug the DLL project (traversing .cpp files of DLL project by puting break points) i.e. I put a break point into a CPP file(X) of DLL Project and one break point in the CPP file(Y) of Applicatin project where it calls the function from dll file. When control reaches the break point in Y which calls to the function in dll file and if I press F5, control should go to the function in CPP file (X) of DLL project.
How to do this?
Thanks & Regards,
Neeraj
|
|
|
|
|
Insert the DLL project into .exe workspace from the projects menu
Set the exe project as active configuration
Make the exe project dependent on the dll project (porject dependencies)
Add a post build step to the dll project which copies the nuilt dll to the applications directory
Place breakpoints as required (works as VC knows about both)
Debug as required.
If you vote me down, my score will only get lower
|
|
|
|
|
I need to save few objects' to a file and reload them later on to memory.
I used something like that:
WriteFile(hFile, obj_ptr, sizeof(DATABASEINFO), &NumberOfBytesWritten, NULL);
and then:
ReadFile(hFile, CurrentObject, sizeof(DATABASEINFO), &NumberOfBytesRead, NULL);
where "CurrentObject" is a pointer to an allocated space for "DATABASEINFO" structure.
This method doesn't work. the Read operation reads nonsense.
Can anyone see the problem? is there a better way for doing this?
Thanks.
|
|
|
|
|
Make sure the structure members are on 1 byte boundaries. You can specify that using:
#pragma pack(1)
macro.
You can also specify it for complete project in project -> settings, C/C++ tab and there choose the Code generation category and set struct member alignment to 1 byte.
|
|
|
|
|
ok. it seems to do the work. but there is still a problem with pointers types. is there a simple way to handle them?
for example, in one structure i am holding a property from type char*. when writing the object to the file, the pointer is stored and not the string held in it, which is, of course - useless.
|
|
|
|
|
Of course, you cannot use this when your structure hold pointers !!!
What is a pointer ? A pointer is just a 32 bits variable that holds an adress (at this adress, the data is stored). So, when you write the pointer to the file, it just stores the adress and not the data.
If you want to save your structure, it would be a better idea to encapsulate the save/load functions inside your structure (if you don't use the MFC and/or don't want to use serialisation, you can do it yourself):
typedef struct
{
int DataCount;
int* pSomeData;
void SaveData(HANDLE* hFile)
{
DWORD NumberOfBytesWritten;
WriteFile(hFile, &DataCount, sizeof(int), &NumberOfBytesWritten, NULL);
WriteFile(hFile, pSomeData, sizeof(int)*DataCount, &NumberOfBytesWritten, NULL);
}
void LoadData(HANDLE* hFile)
{
DWORD NumberOfBytesRead;
ReadFile(hFile, &DataCount, sizeof(int), &NumberOfBytesRead, NULL);
pSomeData = new int[DataCount];
ReadFile(hFile, pSomeData, sizeof(int))*DataCount, &NumberOfBytesRead, NULL);
}
} YourStruct;
And from the outside it will look like:
YourStruct* pStruct = new YourStruct;
pStruct->SaveData(hFile);
Or for loading:
YourStruct* pStruct = new YourStruct;
pStruct->LoadData(hFile);
Hope this helps
|
|
|
|
|
|
Hi all
How can I share some memory allocated in one process by another process by using dll.?
Is there any way to accomlish this using other methods
Thanks in advance
The Best Relligion is Science.
Once you understand it, you will know God.
|
|
|
|
|