|
I see. Thanks again for your help.
Cheers
|
|
|
|
|
Hi,
In server program I do a createfilemapping followed by MapViewOfFile
in The Client I do a OpenFileMapping using the name last parameter from CreateFilemapping
and then I do a MapViewOfFile and I get 2 different address from MapViewOfFile in the
Client and Server
shouldn't they be the same since its shared storage
Thanks
|
|
|
|
|
No. They will be different because the processes are different.
The addresses will be different but the data is guaranteed to be the same between the two.
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
|
Technically:
the physical memory is the same, but the MMU maps it to available free logical address in the destination process.
|
|
|
|
|
|
Hi
If Do a CreateProcess with bInheritHandles set to true
and I create a event with name/string in the Parent Process
In the Child I do a OpenEvent
Do I still have to do a DuplicateHandle to have access to the event handle
|
|
|
|
|
No you don't need to duplicate handle if you have enabled inheritance int the CreateEvent of parent process setting lpEventAttributes parameter.
You need a duplicated handle if the event is created in the child process.
For detailed info see[^].
|
|
|
|
|
|
What I am trying to do is each thread gets to print out its 5 characters before potentially yielding to another thread. It works but it does not do what I want. THanks for help.
for (unsigned i = 0; i < _repCount; ++i) {
unique_lock<mutex> lck(mtx);
cv.wait(lck, []{return !inUse; });
inUse = true;
for (auto c : _printMe) {
cout << c;
cout.flush();
}
inUse = false ;
}
|
|
|
|
|
ramonlarodo wrote: It works but it does not do what I want. What do you want?
|
|
|
|
|
Hi everybody,
is there a possibility to edit the year in the short format(yy) aswell?
I set the format "dd.MM.yy" and the date is shown correctly as "23.04.15"
But if I place the cursor in the year-section, the year switches from 15 to 2015.
I need that the year keeps 15 at the edit-mode.
Big thanks for any information
Regards
-baerten-
|
|
|
|
|
What edit mode are you talking about? Where is this value displayed that changes, and how is the change displayed?
|
|
|
|
|
Thanks for your reply
I call it edit mode if I place simply the cursor into it.
Without the focus the control displays 24.04.15
If I place the cursor in the day section of the control it displays 24.04.15
If I place the cursor in the year section of the control it displays 24.04.2015
I use Visual Studio 2013. It has the same behaviour on Windows 7 and 8
Thanks for any information
|
|
|
|
|
So exactly what programming problem are you having?
|
|
|
|
|
I use the short format of the DateTime Control.
So, I want only 2 digits for the year.
But if I place the cursor in the year, it becomes 4 digits.
Is there a possibility to avoid this?
To recreate the OnDraw/OnKey logics is not so rational
|
|
|
|
|
Hi Guys,
I have a weird problem debugging my project.
I have upgraded my VS 2008 project to VS 2010 by opening the solution file and successfully built the project (debug and release configurations). But when I run the project within Visual Studio I get the following weird error saying:
"Unable to start program"
"System cannot find the file specified"
Anyone knows hows how to fix this issue.
thanks
|
|
|
|
|
Something is either wrong with the project, or it has not built properly. Try a clean and rebuild, and check the output directories to make sure it has been properly created.
|
|
|
|
|
It build successfully. But if I try running the debug application within Visual studio (by key F5) I can't proceed.
|
|
|
|
|
Member 9350237 wrote: I can't proceed. Without more information we have no way of guessing what may be wrong. Look in the directory tree for the project and check that the excutable actually exists. Try starting it from Windows Explorer to see if it runs.
|
|
|
|
|
If you have multiple project in your solution, check that your project is really the "Startup Project"
I'd rather be phishing!
|
|
|
|
|
Hello, i'm trying to write a simple VSS based restore program in C++. I've read the microsoft documentation on how to perform a restore under VSS but it is not helping very much. Does anyone can help with a sample program or point me towards any useful documentation?
Thanks
|
|
|
|
|
|
(not really urgent, just a general question)
I want to "owner draw" a CStatic to have a custom "GroupBox".
The documentation says that I need to add the SS_OWNERDRAW style to the control; The resource editor does not let me change the style (there's no toggle for that).
So, I added a variable to my test dialog and tried to use ModifyStyle to add the SS_OWNERDRAW style in the dialog OnInitDialog (after the control is created).
I also tried to change the style in custom CStatic's PreSubclassWindow method; but that does not work.
Both changes did not work as expected.
I tried manually create the control in the dialog OnInitDialog; this is the work-around I am using now.
CRect rect;
GetClientRect(rect);
rect.DeflateRect(10, 10, 10, 10 );
m_CustomGroup.Create(_T(""), SS_OWNERDRAW|WS_CHILD|WS_VISIBLE, rect, this, IDC_CUSTOM_STATIC );
This works, but I remove the ability to use the resource editor to manage the custom static.
Is this the proper way to do it?
Thanks.
Max.
I'd rather be phishing!
|
|
|
|
|
I had a similar problem a few weeks ago. I solved it by manually editing the resource file containing the dialog box and adding the style that way.
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|