|
Hi!
I also had this problem.
Just try to include the file using double quotation marks around the path specification:
use #include "afximpl.h" instead of #include <afximpl.h>.
|
|
|
|
|
venera_soft wrote: Just try to include the file using double quotation marks around the path specification:
use #include "afximpl.h" instead of #include <afximpl.h>.
Why? That instructs the preprocessor to look for the file in the same directory as the #include statement, which it obviously is not going to find.
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
Dear All,
My project requirement is VC++ application need to open an .trp file using FileReading method.I tried it works proper.But i need to open a .trp file using Thead concept...
It will be much helpful to me to give some advice on this..
Thank you very much,
Yours,
Anitha
|
|
|
|
|
Move the FileReading method into the your thread procedure and do things over there.
Since you can open the .trp file it should not be a problem to achieve this from the thread.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Thank you for your kind reply.
If I process the file reading in a thread, the thread starts its separate execution. I need some of the values from the file to proceed further. So please tell me, is it possible to suspend the main thread till the worker thread (File reading method) is completed. Please advice.
|
|
|
|
|
AnithaSubramani wrote: suspend the main thread till the worker thread (File reading method) is completed
If you want to suspend the main thread what is the advantage of using another thread?
Regards,
Sandip.
|
|
|
|
|
it won't be a good idea cause threads are generally used for parallel processing. why start a thread if you want the main thread to get suspended?
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Hi all,
I want to use registration dialog with limit of 30 days.
So i m taking help of this article
http://www.codeproject.com/KB/dialog/regdialog.aspx[^]
it working fine if i increase the date.But when i decrese the date or set back date than also it is count number of days.
i just want it is working only for next date not for back date.
Please help me for this.
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
|
|
|
|
|
didn't look at the article, but why don't you compare the dates before saving them. On comparison if the selected date is prior to the current date, pop a message box and reset the date to the current date otherwise you can let the user proceed.
I think I got ur query correctly.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
|
I need to do 3-4 tasks after a fix time interval . the tasks are dependent on each other , i need to do all in parallel.currently I m doing these in separe threads (running 3-4 threads).problem is I m using sleep method in each thread to repeat task after a fix interval .but sleep is not guaranteed to sleeep for exact interval. how can I do parallel tasks after exact interval .
|
|
|
|
|
You could use an auto-reset event for each thread that the
corresponding thread waits on until it's signaled by a timer.
OnTimer
{
for each threadstartevent in arrayofthreadstartevents
SetEvent(threadstartevent)
}
threadproc
{
while (false == threadshouldterminate)
{
wait for event
do some processing
}
}
You could instead use a single manual-reset event to release all the waiting threads
at "the same time" but then you need some scheme to get the last thread that
completes its task to reset the event. The other threads would need to wait
for the last thread to complete.
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
I have wrote an application which edit system file.when i run my application in limited user account it shows access denied error.i need to give admin privillage for limited user to edit that file . how i do this in vc++.
help me plea se
|
|
|
|
|
I am linking a C library in C++ application.
i have declared function in my c.h
#ifdef __cplusplus
extern "C" {
#endif
int fun(int,int);
#ifdef __cplusplus
}
#endif
created my c.lib
now in my capp.cpp i have included this c.h as
#include "c.h"
and i have linked the c.lib and calling this fun function in my cpp application as
int x=fun(2,3); directly ...
would this work ??
how can i be sure that the library is linked propery ??
|
|
|
|
|
Should work. Sounds like you've done everything correctly.
Steve
|
|
|
|
|
I m allocating memory using GlobalAlloc(GMEM_FIXED|GMEM_DDESHARE,)method
while deallocate using GlobalUnlock(),GlobalFree()but its not freeing memory what method should i use to allocate and deallocate
|
|
|
|
|
What is the return value of GlobalFree()? If it returns anything other than NULL you need to call GetLastError().
Best Wishes,
-David Delaune
|
|
|
|
|
please explain how getlasterror can help me by code
|
|
|
|
|
GlobalFree()[^] will return NULL if it succeeds. If GlobalFree()[^] fails it will return a positive HGLOBAL value which is essentialy a handle to the memory object.
If GlobalFree is returning any value other than NULL it is indeed failing. Calling GetLastError()[^] will tell you why it is failing.
So I ask you again:
What value is the GlobalFree() returning?
Best Wishes,
-David Delaune
|
|
|
|
|
Gloobal Unlock returned 1
global free returned 00000
|
|
|
|
|
This means your call to GlobalFree() was successful.
|
|
|
|
|
when i debug code , every time it give blue screen with message buffer overflow using locked memory and system restarted
|
|
|
|
|
If memory is unlocked then why system always dump memory and restart giving message driver_left locked files in process
modified on Monday, August 11, 2008 3:20 AM
|
|
|
|
|
|