|
I guess the bigger question is why do you need this information? Perhaps if you explained, we might could offer a different approach.
"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
|
|
|
|
|
|
If you want to drag,drop of your program with Internet Explorer I think I saw on the codeproject an example of it.
|
|
|
|
|
Hi,
I want to design my own file storage format,not the simple text format and other existed file storage format(PDF or RTF etc.)
Is there any article to describe this question?
Is there any books to describe this question?
It will be better if there is an simple example for me.
Thank you very much!!
?????
|
|
|
|
|
That's not really complicated. The only thing you have to do is store what you want to save in the way you want. You are responsible of the format of your file, as long as you keep consistent between saving and loading there's no problem.
Anyway, if you are using MFC, I suggest that you take a look at this series of article: Serialization primer[^]. It doesn't talk about file format but it will get you started with serialization with MFC (that's the way to go if you are using MFC).
|
|
|
|
|
Using the Dbghlp functions
e.g. SymGetSymFromAddr
Where does Windows search for the Symbols (I guess its PDB's)
Is It were environment variable _NT_SYMBOL_PATH POINTS TO
|
|
|
|
|
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
|
|
|
|