|
Thankx, its all clear now.
--------------------------
Must..kill..all..humans!
|
|
|
|
|
You are welcome.
|
|
|
|
|
Hi all:
I wonder how the calls into CRT library are resolved, namely the calls into msvcm80.dll msvcp80.dll and msvcr80.dll. The system will search through the environment variable? But I didn't see anything special with the %PATH%.
The problem I'm facing is that the to be released program behave differently on two XP machines. I have a startup executable (I believe it's didn't use any routines provided in those CRT libs) resides in the release root dir which just used to launch another executable in sub folder. I put those CRT libs in the previously mentioned sub folder, and the program acts normally until today. I was prompted with "The application failed to initialize properly (150002). Click OK to terminate", and when I copied those CRT libs from sub folder over to root the app start to works normally again. I figured I must done something special to the system, but I've done nothing. But how could this happen?
|
|
|
|
|
hello everyone!!!
i am working on some application. i have to deal with strings. the string may contain the ASCII characters or some other values. i need to check if the string contains ascii characters. for that purpose, i am parsing the string, taking each character at once, checking whether it lies in the ascii range and then print the string only if it has ascii characters.
i think this is the right procedure. but i am afraid that the performance is hampered when i am dealing with large number of lengthy strings. so, i wanted to know if there is any other better way. thanks in advance...
vijay.
|
|
|
|
|
You can use: isalpha(char *ch) .
Regards
|
|
|
|
|
I have to write a program for recovering emails, which are permanently deleted from Outllook. Any idea, how to programmatically scan a pst file for this purpose?
|
|
|
|
|
Hi,
As far as I remember, its record in PST is cleared, so not much hope for its recovery.
It is even logical to clear entire record of item that is to be deleted for better privacy protection.
Regards
|
|
|
|
|
The following article says that the record from PST is not cleared unless the PST is compressed:
http://www.outlook-tips.net/howto/recover_deleted.htm
But the article suggests to first corrupt the pst file and then to use "scanpst.exe" tool to recover the emails. How can we programmatically implement the functionality of "scanpst.exe"?
|
|
|
|
|
Easy,
once you get to know how PST record structure looks like. Without this information you can't actaully do anything.
Regards
|
|
|
|
|
Is there any way to know how PST record structure looks like?
|
|
|
|
|
can anyone helpme out how to sort listbox items as per our requirement,but not setting the properties sort option.
SARVEJANA SUKINOBAVANTHU
Ashok
|
|
|
|
|
I think you have to do yourself the sort on the list items (provided you disable the sort option). If you have no performance issues a simple bubble sort may suffice.
|
|
|
|
|
using LVM_SORTITEMSEX message
You need to pass it a function that compares two items and says whether the first goes before the second. The prototype is a global or static function
int CALLBACK CompareFunc(LPARAM lParam1, LPARAM lParam2, LPARAM lParamSort);
typically, you pass a pointer to the struct with the window handle of the list control and the information how to sort as "paramSort".
Developers, Developers, Developers, Developers, Developers, Developers, Velopers, Develprs, Developers! We are a big screwed up dysfunctional psychotic happy family - some more screwed up, others more happy, but everybody's psychotic joint venture definition of CP Linkify!|Fold With Us!
|
|
|
|
|
Can anyone send me stlport_vc6.lib to dudiav@hotmail.com?
Thanks,
Dudi
|
|
|
|
|
|
I have a question.How to realize a multithreading at use of sockets. More particularly: there is a server which accepts data from the client in a secondary thread, how many clients are so much streams. Me the problem of realization of the given problem interests.
-- modified at 4:35 Wednesday 22nd November, 2006
|
|
|
|
|
Meat man, meat. Try to not use translators anymore, please.
As for the case of your, use accept to redirect connection to randomly generated port, then create thread which will use that newly created socket, and return immediately to accept for another connection.
It could look like this:
do
{
newsocket = accept(initial_socket)
create_thread(newsocket) {
work_with_new_socket();
...etc...
};
}
loop (get back to the beginning, mean accept);
Regards
|
|
|
|
|
|
I just switched from a debug build to a release build using my fairly new VC8 compiler, when I was confronted with many warnings I never expected. Most of these warnings relate to my using C type casts (at least I think, I didn't fix them all yet). One warning in particular I am unable to correct:
_stprintf_s(buf,255,_T("SYNTHETIC:%8.8X"), reinterpret_cast<DWORD>(this));
Which gives me a pointer truncation error. I know it is safe to ignore, but in my view warnings are there to tell you you something, in this case "Hey lamer, code this better!!!".
Also, since these are warnings and not errors, the compiler tends to not repeat the warning on further rebuilds. How can I change this? If I remember in VC6 I had to toggle the "incremental rebuild" option, but I have so far been unable to find it in VC8.
And, one last question, how can I view the same warnings when doing a debug build?
-- modified at 3:06 Wednesday 22nd November, 2006
|
|
|
|
|
The problems was due to the "64 bit compatibility check" option being set in the options for release builds. Disabling the option has resolved the problems, however it does lead me to another question.
Does anybody know of any decent articles about creating 64 bit compatible applications?
|
|
|
|
|
The big thing, which you just ran into, is casting pointers to a 32-bit type such as DWORD . You should use DWORD_PTR instead. The _PTR doesn't mean "pointer" (it's a bad choice of name IMO but we're stuck with it), it means "same size as a pointer" - so 32 bits in x86 and 64 bits in x64.
|
|
|
|
|
Michael Dunn wrote: The big thing, which you just ran into, is casting pointers to a 32-bit type such as DWORD. You should use DWORD_PTR instead. The _PTR doesn't mean "pointer" (it's a bad choice of name IMO but we're stuck with it), it means "same size as a pointer" - so 32 bits in x86 and 64 bits in x64.
Thanks for the heads up. I was always under the assumption that the *_PTR DID mean "pointer". My own fault for not checking the docs, but with a name like that what is to be expected!
What is it with MS and their typecasts?
|
|
|
|
|
hi all i had created the bitmap of whole screen through code,i mean functiosn such as createcompatiblebitmap(),bitblt() etc and then save it works fine
now i want that that size of image(i mean widht and height) should be reduced,so that whole screen fits into small bitmap,i had tried using stretchblt() but it did not work bcos it creates image of same size. i mean reduced image + some black parts also present on image which i dont want.
how to remove those black parts from image.so that color values are present and no black parts where i reduced the widht height.
Tasleem Arif
|
|
|
|
|
stretchblt() is the function you need, it shouldn't be painting any black rectangles to your bitmap, so I can only guess you are using it wrong. Perhaps you could show the code sample you are using and we may be able to help you find the errors.
|
|
|
|
|
thanks for replay here is the code of its behind the button event,
<br />
int nScreenWidth =:: GetSystemMetrics(SM_CXSCREEN);<br />
int nScreenHeight =:: GetSystemMetrics(SM_CYSCREEN);<br />
HWND hDesktopWnd = ::GetDesktopWindow();<br />
HDC hDesktopDC = ::GetDC(hDesktopWnd);<br />
HDC hCaptureDC =:: CreateCompatibleDC(hDesktopDC);<br />
HBITMAP hCaptureBitmap=::CreateCompatibleBitmap(hDesktopDC, nScreenWidth, nScreenHeight);<br />
::SelectObject(hCaptureDC,hCaptureBitmap); <br />
StretchBlt(hCaptureDC,0,0,((nScreenWidth/2)+310),((nScreenHeight/2)+290),hDesktopDC,0,0,nScreenWidth,nScreenHeight,SRCCOPY);<br />
CImage file; <br />
char str[15];<br />
DWORD filetime=::timeGetTime();<br />
itoa(filetime,str,10);<br />
strcat(str,".png");<br />
char strdrive[25]="C:\\";<br />
strcat(strdrive,str);<br />
file.Attach(hCaptureBitmap);<br />
file.Save(strdrive);<br />
hope it clears my question.
Tasleem Arif
|
|
|
|