|
ForNow wrote: Where does Windows search for the Symbols (I guess its PDB's)
You have to specify the search path in the SymInitialize() function. It is necessry that SymInitialize() must be called before calling any other Sym functions.
|
|
|
|
|
Thankx now that we are on this thread (little joke) was wondering I generate .pdb
When I am in Release mode I guess without the compiler /Zi option
I am able to run the Debugger and step thru the Code however in Release as Opposed to Debug I am unable to display certin Variables dont know if they are Local or Global
So what my question??? what is the difference (if you know) between a debug and release
.exe/dLL
|
|
|
|
|
ForNow wrote: I am unable to display certin Variables dont know if they are Local or Global
In release mode most of the variable values is not displayed or shows incorrect value, unless you have turn off the optimization ( /Od ).
|
|
|
|
|
BTW it worked Syminitlize that is I'll try /Od
thankx
|
|
|
|
|
I use enums a lot in my projects. The problem is that they're not encapsulated the way they are in C#, so there's the occasional problem of name clashes between more than one enum declaration when they declare the same name as a value. I was thinking about doing something like this:
struct WaveType
{
enum
{
Sine,
Triangle,
Sawtooth
};
};
Or maybe instead of a struct, use a namespace:
namespace WaveType
{
enum
{
Sine,
Triangle,
Sawtooth
};
};
Then I can access the enum values like so: WaveType::Sine , WaveType::Triangle ...
Would this be considered bad style? Have any of you done anything like this?
|
|
|
|
|
I prefer the second approach, and namespace is meant for this purpose (avoid name clash). I would suggest if you can group a set of classes, function, user defs... as some software module then declare them with in a namespace rather than declare only the enum within a namespace region. And if you are using the enumeration only within a class then declare the enumeration within the class declaration.
|
|
|
|
|
You've also the following option
class WaveTool
{
public:
enum
{
Sine,
Triangle,
Sawtooth
};
};
i.e. to wrap the enum inside a class that has the responsibility of offering related services.
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
|
|
|
|
|
<br />
m_hThread1 = CreateThread(NULL, 0, ThreadFun1, this, 0, &m_dw1);
m_hThread2 = CreateThread(NULL, 0, ThreadFun2, this, 0, &m_dw2);
How to get thread 1 using memory size when program run.
|
|
|
|
|
yoda speak ?!!?
Sure i am not what talking you are.
Seriously, it depends what the thread is doing; and normally, it's the same way as find finding out
what the current/main thread is doing.
|
|
|
|
|
Maximilien wrote: yoda speak ?!!?
Sure i am not what talking you are.
Or:
What you are talking about, I am not sure of.
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Hi,
a thread does not use memory, except for its stack;
when it creates some objects, they will occupy some memory, but they do not belong
to the thread, and they sit in the heap, common to all threads of the process.
Luc Pattyn [Forum Guidelines] [My Articles]
This month's tips:
- before you ask a question here, search CodeProject, then Google;
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get;
- use PRE tags to preserve formatting when showing multi-line code snippets.
|
|
|
|
|
I'm thinking about writing an application to access some unix shares from a windows server, is it possible to create an NFS mount in C++?
|
|
|
|
|
alchong wrote: is it possible to create an NFS mount in C++?
The phrase 'NFS mount' implies a device driver. It is generally not recommended to develop Microsoft Windows device drivers in C++ however it can be done.
Microsoft supplies the IFS Kit[^] for developing file systems and file system filters.
If you however simply want to use something already available (or have some common sense) then perhaps you can use Microsoft Windows Services for UNIX[^] This link will give you a head-start.
http://www.openfree.org/pet/index.php/Mount_an_NFS_share_from_Windows[^]
Best Wishes,
-David Delaune
|
|
|
|
|
David, thanks for the response, I think my question may have been too brief, and I think I should explain what I want to do. Basically there are some shares on a Unix machine that I would like to look at and determine the contents. Currently we run a batch file that maps these shares to a drive letter (on a windows box) I'd like to just automate that and add extra code to do some reporting on the file contents. I was hoping to do this in C++, and that some library out there existed that I could use to map these unix shares. I'd eventually like to make it a web service, but that is the next challenge.
|
|
|
|
|
Are you wanting to access those shares via UNC?
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Yes that's correct, I would like to access it by UNC. Currently we have a batch file that calls some executable nfs.exe ( I think it's a hummingbird's ) which mounts unix shares, which allows us to see those shares from a windows box.
|
|
|
|
|
alchong wrote: Yes that's correct, I would like to access it by UNC.
You appear to have two separate issues here. Mounting shares (using nfs.exe), and accessing them using UNC are not the same thing. For the former, see here. For the latter, unless otherwise indicated, the Win32 API recognizes UNC.
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Thanks for the quick reply, I was thinking about just invoking the executable from an app. I curious if anyone knew if there were any standard WIN32 API that was available.
|
|
|
|
|
alchong wrote: I curious if anyone knew if there were any standard WIN32 API that was available.
Probably, but without knowing what nfs.exe was doing internally, I wouldn't know. You might could use depends.exe to open nfs.exe and see what functions it is importing from the Win32 API. That would give a big clue.
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
|
Are you wanting to rename the file?
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
You have to provide more information. What do you mean by "identity"? By what or whom was the file "banned"?
"It is better to remain silent and be thought a fool, than to open your mouth and remove all doubt."
--Groucho Marx
|
|
|
|
|
|
I have lots of dialogs in my application and these dialogs are used with 1600 1200 resolution. Now, this application is ready to use but i want to run it with different resolutions. I wrote an different application(or function or class with function) to do this and it sets all of controls' size of a dialog as resolution but for only one dialog. How can I apply this solution for all my dialogs? For example May all of my dialogs inherit from my new class(is it a good solution) or what else? Please help.
|
|
|
|
|
The solution is really up to you. How many dialogs do you have?
There are several articles on codeproject dealing with resizable dialogs - they should give you a headstart. But they will require work for every dialog.
I don't see any other way though - how a dialog stretches / shrinks will be very dependent on the job it's doing. ie, You may have a bos asking for some text, with an OK button. You want the text box to change in width, but not the button.
Iain.
Plz sir... CPallini CPallini abuz drugz, plz plz help urgent.
|
|
|
|