|
Oh, I see. The dsp file will have project settings, the registry wil hold the ones for mthe Options dialog.
==============================
Nothing to say.
|
|
|
|
|
Just for the record, and it's okay if you don't know
why? Why are the path settings in the registry? What's the point?
I guess that's rhetorical. I'm going to go over to the "Microsoft Forums social area" (song in background) to see if someone can shed some light as to the thought process.
Charlie Gilley
<italic>You're going to tell me what I want to know, or I'm going to beat you to death in your own house.
"Where liberty dwells, there is my country." B. Franklin, 1783
“They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759
|
|
|
|
|
charlieg wrote: Just for the record, and it's okay if you don't know
Somewhere in HKLM / HKCU \SW\Microsoft\VisualStudio I would say. If you want to know for sure create a distinctive path and search the registry.
As for why, it is because the ones set in VSs options are global paths that apply to all projects.
Not only that, think of VS as the editor, not the compiler. The compiler is in the exes path in options. So you can specify any cl.exe you like, any linker too.
It really is quite flexible.
Perhaps you like VS 6 UI and VS 8 compiler. Then set VS 6 exe path to that of VS 8.
==============================
Nothing to say.
|
|
|
|
|
"because the ones set in VSs options are global paths that apply to all projects."
is the nugget - the lightbulb comes on!! Appreciate stating the obvious.
But I have to say, that signature is annoying.
Charlie Gilley
<italic>You're going to tell me what I want to know, or I'm going to beat you to death in your own house.
"Where liberty dwells, there is my country." B. Franklin, 1783
“They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759
|
|
|
|
|
charlieg wrote: But I have to say, that signature is annoying.
What, the 'Fat__Eric' or the 'Nothing to say' ?
==============================
Nothing to say.
|
|
|
|
|
Nothing to say. It keeps grabbing my attention like it's part of the response, which I guess it is in a way.
Charlie Gilley
<italic>You're going to tell me what I want to know, or I'm going to beat you to death in your own house.
"Where liberty dwells, there is my country." B. Franklin, 1783
“They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759
|
|
|
|
|
If you're using VS2008, you can export the Visual Studio IDE settings on the old machine to a file. Then import the settings on the new machine. These actually live in the CurrentSettings file found in your My Documents\Visual Studio 2008\Settings folder.
The CurrentSettings file is an XML file so if you wanted to, you could use any decent text editor to locate the settings in the file.
Hope this helps.
|
|
|
|
|
Sure does. I was looking for the "why" mostly.
You think you remember everything on a hard drive, but some of the things I installed were 5 years ago. Plus, I'm building a document for new developers and s/w configuration.
Charlie Gilley
<italic>You're going to tell me what I want to know, or I'm going to beat you to death in your own house.
"Where liberty dwells, there is my country." B. Franklin, 1783
“They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759
|
|
|
|
|
Hi all,
I have seen two difference,
1. Critical Sections are relatively faster than Mutex. That is synchronizing with the same process, is more efficient.
2. Mutex could be used with cross-process thread synchronization.
So I have two questions,
1. Am I correct?
2. Any other points on this?
Your comments are really appreciate.
I appreciate your help all the time...
CodingLover
|
|
|
|
|
From the book Programming Applications for Microsoft Windows by Jeffrey Richter,
Mutexes behave identically to critical sections, but mutexes are kernel objects, while critical sections are user-mode objects. This means that mutexes are slower than critical sections. But it also means that threads in different processes can access a single mutex,...
I think this line answers your two questions.
http://www.mono-project.com/Main_Page
|
|
|
|
|
Thanks for the comment.
Yeah your comment give me a some kind of idea. But then, what is the advantage use of a mutex to control multiple process and multiple Critical Sections to control multiple process?
I appreciate your help all the time...
CodingLover
|
|
|
|
|
Mutex and Critical Section are used for synchronization.Both are almost same except that Critical Section is used within a same process area, where mutex is used in different process area.
I will explain you with simple example:
Suppose in your project, You are using one array and two threads are running simultaneously. First thread add data in an array and other display that data on screen.
Scenario 1: Without Critical section
There is a schedular program in OS that give time slot to every process and threads that are running. It is so frequently done that we feel that all threads are running simultaneous.Suppose time slot given to both thread is equal. If thread one is running it can add only 40 data and than time slot is given to other thread and it display 50 data. Now for some data some garbage data is displayed.
If threads uses the same resourse and we must synchronize the thread. In this case we use CS.Process area of both the thread is same, So it is fast.
Scenario 2: Suppose we use printer machine to print some data. If two person request at a time and if no synchronization process is used than it gives to garbage data. At this time one process have to wait to complete the process of second. This time the process or thread are from different process area. So we use mutexes. The process area of process is different, So it is slow.
I think this example will clear your doubt.
"Every Little Smile can touch Somebody's Heart...
May we find Hundreds of Reasons to Smile Everyday... and
May WE be the Reason for someone else to smile always!" (ICAN)
"Your thoughts are the architects of your destiny."
|
|
|
|
|
Thanks for the comment.
Pretty much clear what you are saying now.
However lets consider the scenario 1 for a minute. As you explain we can use CS to control the two threads and guaranteed that data adding or reading take place at a time. But the order of the execution is not guaranteed. That's clear. At the same time we can mutex on that too. At that point what's the advantage of each.
Hope I am clear with my this question.
I appreciate your help all the time...
CodingLover
|
|
|
|
|
My suggestion is you must read about the synchronization of thread.
There are four types of synchronization
1) Critical section
2) Mutex
3) Event
4) Semaphore
Every synchronization object is used to meet different requirement and as per our requirement we have to choose which synchronization object is used in our application.
"Every Little Smile can touch Somebody's Heart...
May we find Hundreds of Reasons to Smile Everyday... and
May WE be the Reason for someone else to smile always!" (ICAN)
"Your thoughts are the architects of your destiny."
|
|
|
|
|
SP 24 wrote: My suggestion is you must read about the synchronization of thread.
Of course, I myself have to do that. BTW do you know any good online resources?
Regarding my previous comment, do you have any thoughts of it? If so I would like to know.
I appreciate your help all the time...
CodingLover
|
|
|
|
|
|
Thanks a lot. I'll have a look at them.
I appreciate your help all the time...
CodingLover
|
|
|
|
|
I have been trying to write automation code for Mozilla Firefox and need to use the IAccessible2 interface in my code.
The problem is that I keep getting the error : No such interface supported. I have registered the IAccessible2Proxy.dll. But still get the error.
|
|
|
|
|
Hello, I'm trying to display a web page inside my own window.
I found a c++ example by chris becke on the net which is huge. I ported the code into my application but I can only get the web page to display when I run the project in visual c++.
Is there a more bare bone example that displays a web page inside a window ? or why does my program only work when I run it from visual c++ ?
I'm not of a great state of intelligence to understand all the com code needed to display a web page but with a little help I think I might understand..
thanks,
|
|
|
|
|
If you are using MFC then you may have a look at "Using MFC to Host a WebBrowser Control"[^] at MSDN.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Thanks, but i'm not using MFC
|
|
|
|
|
When you run an application from inside Visual Studio, the working directory is the directory containing the project files (.vcxproj, .sln). However when you run outside of VS, the working directory is the one containing the .exe file.
So if you are opening an html file with just a file name (e.g. open "MyTest.html") then that file must exist in the working directory. You should use full path names to avoid this problem. (You can use GetModuleFileName to find out the directory containing your exe).
Hope that helps.
Karl - WK5M
PP-ASEL-IA (N43CS)
PGP Key: 0xDB02E193
PGP Key Fingerprint: 8F06 5A2E 2735 892B 821C 871A 0411 94EA DB02 E193
|
|
|
|
|
I understand this, I have been using the full path and file name.
I need to convert the string to a BSTR, I'm assuming i'm doing it correctly because as I say, the program works but only shows a web page when I run it from visual studio.
here's how:
char url[MAX_PATH];
GetModuleFileName(InstanceHandle, url, MAX_PATH);
std::string file = url;
file = file.substr(0, file.find_last_of("\\"));
file += "\\Help.html";
MessageBox(NULL, file.c_str(), NULL, NULL);
OLECHAR* oleChar = NULL;
oleChar = (OLECHAR*)calloc(file.length(), sizeof(OLECHAR));
MultiByteToWideChar(CP_ACP, MB_PRECOMPOSED, file.c_str(), -1, oleChar, sizeof(WCHAR)*file.length());
vURL.bstrVal = SysAllocString(oleChar);
|
|
|
|
|
I've got the program to work ! after some modifications. still not sure what the problem was but I think it had something to do with structure declarations I'd placed in a header file..
|
|
|
|
|
So I use a lot of function pointers in C, and wanted to add one to a C++ class (MFC).
So I start off with a typedef in my class:
typedef ULONG (MyClass::*MyFunc)(PULONG, PVOID);
The call back:
ULONG MyFunc(PULONG, PVOID);
Another func that takes the callback as a parameter:
ULONG SomeFunc(PULONG, MyFunc, PVOID);
I then write the implementaiton of SomeFunc:
ULONG MyClass::SomeFunc(PULONG pVal, MyFunc pProc, PVOID pOpt)
{
...
}
To call the callback from inside MyClass::SomeFunc() I had to use this syntax:
ULONG ret = (this->*pProc)(&x, NULL);
I couldn't just call (*pProc)(&x, NULL); I had to add the 'this->'.
What a crappy syntax. You dont have to call other member funcs with a 'this->' so why is it required for function pointers?
--edit--
Perhaps it would look better as: (*this.*pProc)(&x, NULL);
Nah, thats WAY to much direction...
==============================
Nothing to say.
|
|
|
|