|
Well basically in my code I want to write:
#include '<ibpp.h'>
(I use ' just beacuse of the tags)
instead of
"..\IBPP\ibpp.h"
I know that I have to use static library, but I have no clue about them
|
|
|
|
|
Well, and what is the problem with the solution I gave you ?
And why do you want to use <> instead of "" ?
|
|
|
|
|
akirilov wrote: Well basically in my code I want to write
no, don't !
<> is meant for the compiler that the include is to be searched from the includes in its installation folder.
this is a C/C++ standard language feature and it is not what you want.
what you want is to reduce the path in the include instruction, don't you ?
well, if you include in the project settings the path to the folder containing the ibpp.h header file, you will then be able to do the following:
#include "ibpp.h"
so, not using <> , but you reduced the relative path included.
do that satisfy you now ?
|
|
|
|
|
Personally I don't care if it going to be <...> or "...".
However, I have to change some things in a project written by someone else and ... I can't compile it ... for now. I hoped that if I try to stay as close to the environment that the other guy had, I will compile it.
The program was written in DevC++ 4.0 ... no project, just a make file (can't compile trough it).
I receive: [Linker error] undefined reference to IBPP::CheckVersion(unsigned int)
and so on for all functions inside.
So, this is the main reason for my question ... and I hoped around it to learn more about static library.
|
|
|
|
|
Hi All,
Can anyone please tell me whether may I debug a microsoft function like strcpy or IStoreNameSpace: RegisterNotification() or any othe MS functtion?
Thanks!
dolly,
N,IN
|
|
|
|
|
If the source is available, you can set a break point and step into the source. If the source is unavailable, then you cannot do it.
What does it have to do with if it is a function written by MS or not?
Many are stubborn in pursuit of the path they have chosen, few in pursuit of the goal - Friedrich Nietzsche
.·´¯`·->Rajesh<-·´¯`·.
[Microsoft MVP - Visual C++]
|
|
|
|
|
why ? your application is crashing in there ?
here is a better advice : fix you code. strcpy() is certainly not the cause.
so, please show your code...
|
|
|
|
|
Actually strcpy() is just an example but I am facing a problem with another function, in Windows Mail plugin, it's a COM DLL written in 'c' language, and IStoreNameSpace: RegisterNotification() method fails there....and the last return code which I get is not implemented.
dolly,
N,IN
|
|
|
|
|
I am getting the return code from this function as 0x80004001
dolly,
N,IN
|
|
|
|
|
show out your F*ckin' code !
|
|
|
|
|
In some cases is the sourcecode available. But you need a complete installation of the VS!!!
If there are problems with the MS-Functions check your input parameters. That are the most error case. ("The biggest problem of the PC sits in front of it" )
Greetings from Germany
|
|
|
|
|
Hi all,
I want to find all the drives and its information like(volume name, size, type etc.) in my system....
How can i do this???
Thanks in advance
|
|
|
|
|
|
Some of the information that you need can be taken using GetVolumeInformation
Russell
|
|
|
|
|
VCProgrammer wrote: I want to find all the drives and its information...
Check out GetLogicalDriveStrings() and GetDiskFreeSpace() .
"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
|
|
|
|
|
Is there any Macro that can be used to know if the function that is running is called from a worker-thread or the main program? It is needed to know without use any addictional static global variable or addictional parameter to the function.
thanks
Russell
|
|
|
|
|
This looks the solution:
if( AfxGetMainWnd()==NULL ){
}else{
}
Any comment will be wellcome
Russell
|
|
|
|
|
May be you can use something like this...
DWORD dwMainThreadId = 0;
DWORD dwProcessId = 0;
dwMainThreadId = GetWindowThreadProcessId( hMainWnd, &dwProcessId);
if( dwMainThreadId == GetCurrentThreadId() )
{
//Main Thread
}
else
{
//Thread specialization code
}
I have not tested this snippet.
|
|
|
|
|
Yes! your solution looks work better then mine
inline BOOL IsThisAThread(){
return GetCurrentThreadId()==GetWindowThreadProcessId(AfxGetMainWnd()->GetSafeHwnd(), NULL);
}
thanks
Russell
|
|
|
|
|
*Edit* Never mind - that error doesn't occur
Mark
Mark Salsbery
Microsoft MVP - Visual C++
modified on Tuesday, September 23, 2008 4:56 PM
|
|
|
|
|
yes, you are right....but as you suggested it is better in this way, thanks
inline BOOL IsThisAThread(){
CWnd* pMainWnd=AfxGetMainWnd();
if(! pMainWnd) return TRUE;
return GetCurrentThreadId()!=GetWindowThreadProcessId(pMainWnd->GetSafeHwnd(), NULL);
}
Russell
|
|
|
|
|
Hi All,
I m new to MAPI, and m tryig to copy messages from one profile to another profile.
Created a dummy profile.
Configured a MSPST messages service and added a PST file to it.
And trying to copy data from My profile to this dummy profile.
I hav no idea how to do this?? IS there any way to do this??
Can I open two mapi sessions in a single thread?
Please help in this
|
|
|
|
|
Hello!
I am trying to write a program which involves getting the size of a pictures and videos from their paths, I have looked on msdn and I found the function GetFileSizeEx but I need to put there a handle to the file and I don't know how to do that.
How can I create a handle to the file from it's path? unless you have a better idea how to get the size of the file?
|
|
|
|
|
AlProb wrote: unless you have a better idea how to get the size of the file?
May not be a "better" idea, but this is just another way to do it (Just found off a search):
TCHAR* sFile = _T("D:\\Rajesh\\Cheers.htm");
struct _stat buff;
_tstat(sFile, &buff);
cout<<"The size of your file is "<<buff.st_size<<" Bytes"<<endl;
Please note that _tstat returns an int , so if the file size is larger than the maximum value of an int , then this method won't work right!
Many are stubborn in pursuit of the path they have chosen, few in pursuit of the goal - Friedrich Nietzsche
.·´¯`·->Rajesh<-·´¯`·.
[Microsoft MVP - Visual C++]
|
|
|
|
|
You may also want to try CFile::GetStatus[^], which stores the file size in an ULONGLONG (64 bit unsigned integer), which is a relief.
Many are stubborn in pursuit of the path they have chosen, few in pursuit of the goal - Friedrich Nietzsche
.·´¯`·->Rajesh<-·´¯`·.
[Microsoft MVP - Visual C++]
|
|
|
|