|
I screwed up the titles. I meant to write that in the other message. Sorry for the confusion. I need some sleep.
// Afterall, I realized that even my comment lines have bugs
When one cannot invent, one must at least improve (in bed).-My latest fortune cookie
|
|
|
|
|
No problem
Have a good sleep
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
Ryan Binns wrote:
Have a good sleep
Thank you. Should I reply with have a nice day? Just curios, what time is it down there?
// Afterall, I realized that even my comment lines have bugs
When one cannot invent, one must at least improve (in bed).-My latest fortune cookie
|
|
|
|
|
Toni78 wrote:
Should I reply with have a nice day?
That would be appropriate
Toni78 wrote:
what time is it down there?
1352
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
You need to download the latest SDK release. Go to [^] to download it.
I just checked Ryan's answer and he is suggesting the same thing.
// Afterall, I realized that even my comment lines have bugs
When one cannot invent, one must at least improve (in bed).-My latest fortune cookie
|
|
|
|
|
Thanx Ryan / Tony,
I am using VC 6. Is it ok if I install PSDK from the link u sent me.
Abhi
|
|
|
|
|
You are welcome.
Abhi@Work wrote:
Is it ok if I install PSDK from the link u sent me
Yes it is ok. I have VC6 and I installed the exact same SDK release a few weeks ago.
// Afterall, I realized that even my comment lines have bugs
When one cannot invent, one must at least improve (in bed).-My latest fortune cookie
|
|
|
|
|
Toni!!
I`ve downloaded the SDK but the error still remains.Is there something more to it ?
Abhi
|
|
|
|
|
Abhi@Work wrote:
I`ve downloaded the SDK but the error still remains.Is there something more to it ?
Did you register SDK with visual studio?
If not go to Start->Programs->Microsoft Plaftorm SDK February 2003->Visual Studio Registration->Register PSDK ...
// Afterall, I realized that even my comment lines have bugs
When one cannot invent, one must at least improve (in bed).-My latest fortune cookie
|
|
|
|
|
Ya it worked !! Thanx..
|
|
|
|
|
I customized CColorDialog into MyColorDialog and added a hex edit box. When the user edits the hex box, I need to call CColorDialog::SetCurrentColor, but it seems to crash everytime I do so. Anyone else have any problems with SetCurrentColor?
Thanks.
|
|
|
|
|
Hello all
I would like to know if there's any way of terminating a process from another process without using "TerminateProcess()". I read from msdn that "ExitProcess()" is the best way of terminating a process, But I'm not getting how to use it from another process.
If anyone knows how to do it, pls help me.
Thanks for your help.
Hari.
|
|
|
|
|
ExitProcess() will exit the process that it is called from - it cannot be used to close another process. If the process you are trying to terminate has a main window, then you can try posting WM_CLOSE or WM_QUIT to it, forcing it to close itself.
Dave
http://www.cloudsofheaven.org
|
|
|
|
|
Hi,
If I have a class
class dll_class
{
func1();
func2();
func3();
private:
int f1;
int f2;
int f3;
};
Then is this permissible?
class dll_class
{
__declspec(dllexport) func1();
__declspec(dllexport) func2();
func3(); /* func3() not exported */
private:
int f1;
int f2;
int f3;
};
i.e. Can I export only some of the functions in the class or do I have to export
all the function in the class? Would instances of the class above cause any run
time errors?
Is it allowable to have a set of multiple classes and carve those into one dll,
and just export the functions that I need from the various classes or should I create
a new class which wraps the functions that I need and just export all the functions in that class?
|
|
|
|
|
Yesterday I read some articles about DLL
I think It is permissable,
But I am not very familar with DLL
I also want to learn more knowledge about DLL.
You can find some articles in this site.
|
|
|
|
|
Simple answer, yes it is possible to export only some functions from a class in a DLL.
You would get linker errors rather than runtime ones.
BUT!!!!
I can't think of a good reason why you would. You are just making your life, and the job of any
users of your DLL harder. Not only do you now have protected / public members, you now have
exported / non-exported member too.
If you *really* want to keep your implementation details a secret, then look at COM / a COM-like
model, where you publish a pure virtual class, implement a Create-My-Class function which returns
a pointer to an instance of a class which implements the virtual functions.
In answer to your second question, you can also export multiple classes / functions from a DLL.
After all, MFC does...
Iain.
|
|
|
|
|
Hi,
I have a simple relatively empty sdi app generated from class wizard.
I can run it and then quit but on exit it crashes and gives.
"Debug Assertion failed", dbgheap.c Expression: pHead->nBlockUse == nBLockUse.
The only thing the program does is load 4 dlls ,
make an instance of one of them unload them and exit.
However each of the 4 dlls relies on loading one of the other dlls.
How do I track this problem down? ( I have source for all dlls )
Yes, I am using the correct dll type for debug, release multithreading etc.
DOes this mean I definately have a memory leak in one of the dlls?
|
|
|
|
|
pHead is NULL that's why you get that error. Is pHead initialized properly? Did you write that part of the code?
// Afterall, I realized that even my comment lines have bugs
When one cannot invent, one must at least improve (in bed).-My latest fortune cookie
|
|
|
|
|
pHead is part of the MFC heap allocation code. (dbgheap.c)
I assume Im trashing it somewhere but can't isolate the possible memory leaks in the dlls.
|
|
|
|
|
The error occurs in one of these two functions; _free_dbg() and _msize_dbg(). I can't tell you much, you have to debug the program and find out the places where are you deleting pointers that you are not supposed to. If you want to find out where you have memory leaks, after you run the program in debug mode, at the output screen scroll down the end. If you have any memory leaks it will tell you where they are occuring. It seems to me like the heap is getting corrupted, but I don't know why.
// Afterall, I realized that even my comment lines have bugs
When one cannot invent, one must at least improve (in bed).-My latest fortune cookie
|
|
|
|
|
If you get this debug assert, than usually you did something wrong with memory you allocated.
Maybe you freed a block of memory twice or similar.
Jens
|
|
|
|
|
the main funtion includes parameters. how can i run the program in VC++?
|
|
|
|
|
if you mean you are running it in the Visual C++ IDE, eg with F5 or single stepping with F10/F11, you go 'Project' -> 'Settings', select the 'Debug' tab, and enter the arguments to the program in the 'Program arguments :' box...
HTH
|
|
|
|
|
thank you very much! i just need it.
|
|
|
|
|
This may seem like a weird question but here goes. Is there a way to tokenize a tokenized string? Explanation:
I have an input buffer that I am tokenizing line by line. Once I get that line I need to tokenize it 3 times to get the info on it and then go back to the original buffer and get the next line. This is what I have so far but it only tokenizes the first line of the buffer:
//This gets the first line of the buffer
char *temp_tok = strtok(m_readBuffer, "\r\n");
m_ctrlTextInA.SetWindowText(temp_tok);
******************************************
//this tokenizes the whole line
char* tokA = strtok(NULL, ",");
m_ctrlTextInA.SetWindowText(tokA);
char* tokB = strtok(NULL, ",");
m_ctrlTextInB.SetWindowText(tokB);
char* tokC = strtok(NULL, "\r\n");
m_ctrlTextInC.SetWindowText(tokC);
*****************************************
I know I need some kind of loop around the ****, but I can not figure out the parameters of that loop. once i get those 3 tokens i want to get the next line from the readbuffer and continue doing this until the readbuffer is empty
any suggestions???
|
|
|
|