I am developing an application that puts data into some global memory or locations for example,clipboard.That data has to be accessed only by me.When any other application access that data,I need to find which is that application that access that data.Can any one pls tell me how to find which is that application?
Instead of giving you an answer to your question, I would suggest you to change what you are trying to do. Why do you use this 'global memory' to share your data (I suppose you are using the notepad, as suggested in your post) ? There are some more efficient ways to share your data like memory mapped files and so on. I am no expert in that field (I just know memory mapped files) but I'm sure somebody here can help you to find the best way to share your data (this question has already been answered before, so...)
Did you read what I was saying in my previous post ?
I suggested you to change the way you share your data. If you use another technique like memory mapped files, there is no need to know which application access your data because the only application that will access your data will be the one you wrote (because your shared memory is named and you use this name to access the memory).
Moreover, if for example you are using notepad to share your data, what happens when the user works with word (or anything else) by the same thime and makes a copy or a cut of some data (text, image, ...) ? Your data in the clipboard will be erased and you cannot prevent this (maybe yes but I don't know any way to prevent this).
Sorry Cedric Moonen,
Its mistake in my part.I have to share that data sometimes with other applications also.When i put the data onto some global memory or IStreams its my data,for some specific applications i need to allow that application to access my data,for that i need to find what application is that?Based on that i need to allow it to access my data or prevent it from accessing my data.
I am sorry for not telling my problem in detail
Ok, but then explain in details how your data is shared. Is it in the clipboard or what ? And how do you 'copy' your data there.
To be able to answer your question, we will need to know what you are doing and what do you want to achieve. Please be as complete as possible (without going into unecessary details of course).
Please, help me!!!
I have application in MFC and i want to send message from one window(dialog) to another window(dialog) in this application, but i wan't to use pointer to this window.I want to use HANDLE to this window.Is it way to do this???
First off, if your using the ++ operator and passing the value as an argument you should prefix not postfix the the operator ( ie. ++i ) else the value is incremented after the statement is executed - see the c++ documentation for more details.
Secondly, ur incrementing the value twice - so you'll end up with a result of 64 being printed (8 x 8).
so you'll end up with a result of 64 being printed (8 x 8).
But he's saying the output is 49.
<marquee direction="up" height="40" scrolldelay="1" step="1" scrollamount="1" style="background:#aabbcc;border-bottom:thin solid 1px #6699cc">
--Defeat is temporary but surrender is permanent
--Never say quits
--Jesus is Lord
Short answer: don't do that.
Long answer: Having more than one ++ or -- operating on the same variable in the same expression is bound to expose an implementation detail and give unexpected results. It's the same reason that you shouldn't do this:
The ++ operator does take affect until the next sequence point is reached, in this case the semicolon at the end of the statement, so i is not incremented until after the function call.
But as Michael said, don't use more than one ++ or -- on a variable in a single line - you are violating the C++ standard, which states that no variable can be modified more than once between successive sequence points.
"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"
I have created a dll file with dialog box. Dll I am using in Visual Basic .NET. How can I display the dialog box so the user could not switch back to the original form without closing the dialog box? Like system Open or Save dialog boxes...
1. For displaying my dialog box from DLL I am using following code:
In preparation for retro-incorporating the MiniExcel class into a number of my projects I've set up a practice project in order to get familiar with the class. I'm in VC++ 6.0 and the project is an MFC exe. I've put the mexcel.cpp and mexcel.h files in the base project directory. I've added both files to the project. I've #included mexcel.h in stdafx.h and also, for good measure, in the view doc file. The class shows up in the Classes tab, though it doesn't show up in ClassWizard after a rebuild of the CLW file.
I've declare an object of class CMiniExcel as a local variable inside a button message handler. When I go to compile I get four errors. The first three indicate that the class is unknown. The fourth is:
fatal error C1010: unexpected end of file while looking for precompiled header directive
Additionally I've noticed that instead of being placed in the DEBUG directory the system has created a directory with the projects base name followed by ___Win32_Debug
Am I using a class that needs to be modified to work under MFC or am I overlooking something else.
Fixing the PCH settings may take care of the other errors
A revision to my previous reply. I've gotten past the error but have gotten four warnings of the same type. It compiles and links. But I'd be interested in suppressing the warnings if possible. The error/warning is
'identifier' : identifier was truncated to 'number' characters in the debug information
The identifier string exceeded the maximum allowable length and was truncated.
It doesn't appear to be an identifer as much as it's an expansion of a vector template. Since namespace is specified as std that gets included in the expansion to the point that the entire line is over 300 characters.
When creating a MDI application (with MFC AppWizard VC++ 6.0) you have the choice of excluding the maximize/minimize boxes for the child frames.
When creating my MDI app, I chose to not have the maximize/minimize boxes, but to have the child frames start in 'maximize mode'. However, when the child frames are viewed in 'maximized mode', the non-themed minimize and maximize buttons are still drawn.
Is there a way to remove or at least disable the non-themed maximize/minimize buttons?
Last Visit: 31-Dec-99 18:00 Last Update: 23-Sep-23 12:26