|
What are you trying to accomplish? This sounds like an instance of the XY problem[^].
|
|
|
|
|
Well yes, it is a XY problem.
When I'm opening a txt file from an application which I made I want to open another instance of this application with the file opened in it. So I don't want to load all the dlls and bins again, but just point to them in the memory (because the files were already loaded by the application which was first opened).
I want to do this because I cannot make the application a MSDI one, because it's to hard to do for me.
modified 12-Mar-13 7:10am.
|
|
|
|
|
I don't think you can interfere much with how images (executables, not bitmaps) are loaded, but they're partly shared anyway. Don't ask me for too much detail, I'm not very familiar with what exactly windows does with images and/or memory mapped files.
That's all much too complex for such a goal anyway - just look into MDI, it'll be simpler.
|
|
|
|
|
Each process has it's own address space so, in general, it's not possible to just run another instance and "point to them in the memory". If you're worried about DLL's and such beging loaded twice I'd leave the management of virtual memory up to the OS, it's smart enough to map the same physical page into multiple processes when possible.
Steve
|
|
|
|
|
Are you sure of this? In what operating system? I have Win XP and I can tell you for sure that this is not happening because when I open a second app it takes as much time as the first one for all the files and dlls to load. Maybe in higher operating systems all apps point to the same adress in memory but not in XP.
|
|
|
|
|
Yes, XP included. I'd guess what you think is taking the time is not the real culprit.
Steve
|
|
|
|
|
You say it's taking 15 seconds to start up, this gives plenty of time to break into it 5 or so times with a debugger and get some stack traces to see what it's really up to.
Steve
|
|
|
|
|
Okay, I will do that. Thanks.
|
|
|
|
|
Why do you think it matters if it was loaded twice?
|
|
|
|
|
It will matter because it takes 15 seconds for the app to start.
|
|
|
|
|
DLiviu wrote:
It will matter because it takes 15 seconds for
the app to start.
You know that there are ways to mitigate that right?
|
|
|
|
|
|
DLiviu wrote: No, there aren't.
I guess the number of times I have done it and countless others are just fantasy.
|
|
|
|
|
You say there are ways to make this files load faster?
I guarantee you that in this case there are no ways.
Loading has already been optimized to the max.
|
|
|
|
|
DLiviu wrote: You say there are ways to make this files load faster?
What I said was "mitigate"="Make less severe, serious, or painful"
|
|
|
|
|
Find out what's really taking the time instead of guessing (I'm willing to bet incorrectly).
Steve
|
|
|
|
|
Hi,
I am working on a project in which I have created a property sheet, I am using 3 property pages in that. Now it happens that it perfectly displays in Windows xp (72 DPI default ), but if I run it on higher DPI than 72 DPI, controls starts disturbing. Many of the controls will hide.
I have one list control and 3 buttons on that which I have created manually (Hard-coded), not created on any dialog. I am facing big problem in setting the position of that List Control and 3 buttons.
Please let me know if anyone have any suggestions about this.
Any help will be appreciated.
|
|
|
|
|
If you create the controls manually then you need to add code to calculate their positions based on the window size and DPI settings. In Dialogs this is done automatically.
Use the best guess
|
|
|
|
|
Hi,
I am working on a project in which I have created a property sheet, I am using 3 property pages in that. Now it happens that it perfectly displays in Windows xp (72 DPI default ), but if I run it on higher DPI than 72 DPI, controls starts disturbing. Many of the controls will hide.
I have one list control and 3 buttons on that which I have created manually (Hard-coded), not created on any dialog. I am facing big problem in setting the position of that List Control and 3 buttons.
Please let me know if anyone have any suggestions about this.
Any help will be appreciated.
|
|
|
|
|
Member 9903065 wrote: I have one list control and 3 buttons on that which I have created manually (Hard-coded), not created on any dialog. Any reason why you are doing this?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous
|
|
|
|
|
Hello ,
I have created a multilanguage supported application in mfc.
|
|
|
|
|
|
Hi,
i am trying to read registry key value the code is this unable to get key value whats wrong this code
LONG ret =RegOpenKeyEx(HKEY_LOCAL_MACHINE,"SOFTWARE\\Apache Software Foundation\\Tomcat\\7.0\\Tomcat7", 0, KEY_ALL_ACCESS, &hKey);
if(ret == ERROR_SUCCESS)
{
RegQueryValueEx( hKey, "Version",NULL, 0, (BYTE*)value, &size);
}
MessageBox(value);
RegCloseKey(keyHandle)
|
|
|
|
|
What is the return value for RegQueryValueEx.
You can check here[^] for the issues you can face and identify why RegQueryValueEx is failing.
Below are the failure scenarios mentioned at the above location:
If the function succeeds, the return value is ERROR_SUCCESS.
If the function fails, the return value is a system error code.
If the lpData buffer is too small to receive the data, the function returns ERROR_MORE_DATA.
If the lpValueName registry value does not exist, the function returns ERROR_FILE_NOT_FOUND.
You talk about Being HUMAN. I have it in my name
AnsHUMAN
|
|
|
|
|
hi,
return value ERROR_FILE_NOT_FOUND.
but path of key correct
|
|
|
|