|
Are you sure you get error 183 from the ReadFile func?
According to MSDN, that's not possible.
|
|
|
|
|
yes - its 183.
but i add some more method that check if the pipe already open and if its not it will reopen it.
now i getting error code 142
142 = The system cannot perform a JOIN or SUBST at this time. ERROR_BUSY_DRIVE
|
|
|
|
|
I'm sorry, but this is getting more and more peculiar.
Can you post some source code?
|
|
|
|
|
The following problem occurs in unicode debug config:
A socket connection handler class CMclSocket has a derived class
CHttpProtoFile. A function Send() of the base class is called in the
derived class in the OnConnect handler. Untill this function is called
in the derived class the member variables of the base class r
acessible. Once this function is called, accessing the member variables
inside this function in the base class throws '0xC0000005: Access
Violation.' error while running the application. This application works
fine in debug config.
Harshapaul Pinto
|
|
|
|
|
Try compiling it without the /GZ compiler switch in debug build.
Steve
|
|
|
|
|
|
hi all,
in a VC++ application, a .dsw file is created, on click of which we are able to open our project in the state as it was before closing...i want to do the same thing for my application...where in my project.xyz(say) shud open up the last state of my application.....rite now i am able to open the initial state(by calling .exe file, that is through registry entry)...where should i store all the information of state of my application, n where and how should i use that information....hope my point is clear...plzz reply as soon as possible...thanks and regards, geetika...
|
|
|
|
|
IMHO,
if you are to show the file in the previous state,save the number of characters that were not being shown (at the time of exiting from your application) from the start and save it to the registry.The next time you have to show the file, set the text on the control on which you are showing the contents according to the count you put previously in the registry.
This could be one of the many options of doing this. You can also look for better opinions/options on this forum.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
You may start with INI file where you can store the application data...and use whenever required.
Knock out 't' from can't,
You can if you think you can
|
|
|
|
|
I have loaded bmps to a CImageList,
ex:
//////////////////////////////////////////////
bmp->m_hObject=(HBITMAP)LoadImage
(NULL, str, IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE);
m_imagelist1.Add(bmp, RGB(0, 0, 0));
question:
I want use this CImageList to gain an icon to Load to other place, what shall I do?
wating for answers online!
Just my interest for these common things
|
|
|
|
|
HICON ExtractIcon( int nImage );
Regards,
FarPointer
Blog:FARPOINTER
|
|
|
|
|
could you tell me in detail?
Just my interest for these common things
|
|
|
|
|
Taken From MSDN :-
Just look for that function in MSDN.
Example<br />
<br />
extern CImageList* pmyImageList;<br />
extern CDC* pmyDC;<br />
<br />
int i, dx, cx, cy, nCount = pmyImageList->GetImageCount();<br />
HICON hIcon;<br />
<br />
::ImageList_GetIconSize(*pmyImageList, &cx, &cy);<br />
<br />
for (dx=0,i=0;i < nCount;i++)<br />
{<br />
hIcon = pmyImageList->ExtractIcon(i);<br />
<br />
pmyDC->DrawIcon(dx, 0, hIcon);<br />
dx += cx;<br />
}
Regards,
FarPointer
Blog:FARPOINTER
|
|
|
|
|
Ok, thank you very much, I will try this way!
Just my interest for these common things
|
|
|
|
|
Can someone compile this c file for me I tired for a few days with no success
and this is really important to me .
http://www.xs4all.nl/~itsme/projects/sources/other/zippw.c[^]
many of my other mates attempted also failed they said it need unix os
I appreciate it to the max.
-- modified at 0:34 Thursday 22nd June, 2006
|
|
|
|
|
Yes it does compile (win32 console app) with a few changes to the includes and a few typedefs (the changes amount to at most 6 lines). That said this is a forum for posting programming questions and not a compiling service.
|
|
|
|
|
lol cmon I have no where else to ask
|
|
|
|
|
I really cannot see what's wrong here:
for (curPart; curPart < totalParts; curPart++)<br />
{<br />
#ifdef MTXCMD<br />
printf("Reading part #%i... \n", curPart);<br />
#endif<br />
printf("C");<br />
<br />
iFileName = mtxJoinAddExt(fileName, curPart-1);<br />
<br />
<br />
iFile = fopen(iFileName, "wb");<br />
<br />
<br />
if (iFile == NULL)<br />
{<br />
_mtxSetErrorCode(MTX_ERROR_READFILE);<br />
_mtxSetErrorInfo(iFileName);<br />
return -1;<br />
}<br />
printf("Checkpoint!");
The "C" prints, but the "Checkpoint!" doesn't... And no, the fopen() didn't return false, because if I put the "C" printf() after the next line, it does not print! And mtxJoinAddExt() returns fine, I'm sure of that. Maybe a compiler error? (GCC 3.4.2)
Thanks!
\|/ Thrift Store Floppy Collection \|/
(Server currently down due to mainteneance, aka comp not detecting monitor and acting weird)
|
|
|
|
|
Maybe because your program exit before having printed the text ? Try to add a sleep after the print.
Cédric Moonen
Software developer
Charting control
-- modified at 2:25 Thursday 22nd June, 2006
BTW, if you use printf to debug your code, use your debugger instead, it is much more powerfull.
|
|
|
|
|
My guess is that mtxJoinAddExt corrupts the stack. Check it for array overrun.
I.e:
char ch[5];
strcpy(ch, "Hello");
|
|
|
|
|
char ch[5];<br />
strcpy(ch, "Hello");
What am I supposed to check with that? Should I printf(ch) ? Thanks both of you!
\|/ Thrift Store Floppy Collection \|/
(Server currently down due to mainteneance, aka comp not detecting monitor and acting weird)
|
|
|
|
|
Hello. I'm sorry for the delay, due to public holidays in Sweden.
What I wanted you to check is for buffer overruns, as in my example.
(Allocating 5 bytes and writing 6 bytes in it).
Such overruns usually corrupts the stack, and makes the return to the previous function "go bananas".
That's a common source of this kind of problems.
|
|
|
|
|
hi..I have the following problem..
Im doing a program that receives SMS and save it to file,the SMS format is received like this
+CMGR=2
+CMGR: "REC UNREAD","phone number",,"06/06/21,15:20:28+32"
SMS Test
OK
the first line is the command Ive typed to read SMS to char* buffer and the last line is the responce of the modem (that the operation is done)
now I want to save the SMS starting from "phone number" ending with SMS test ( the message itself).
how can I do that dynamiclly?
|
|
|
|
|
You can use Find(), and based on the index returned extract the string using CString::Right(), CString::Left(), CString::Mid()
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
use find()..to find what ? Ive searched CString functions and find() return the first occurrence of char..saying that "\"" or "\," is what Im looking for find() wont work..so can you explain more how is that done?
what about string tokenizer ..I dont know much about it but if I can tokenize the string it will be good..but with library to use and how??
|
|
|
|