|
hi, but can i use a socketlib instead? i need it for windows and linux!! i dont want to use OpenSSL because the docu ist bad!!
such a socket lib i search:
<br />
Socket *socket = new Socket();<br />
socket->connectSSL("google.com", 443);<br />
socket->sends("GET / HTTP/1.0\n\n");<br />
const char *response = socket->reads();<br />
cout << response;<br />
socket->close();<br />
cu+thx
|
|
|
|
|
The thread 0xE9C has exited with code 0 (0x0).
The thread 0x50C has exited with code -1073741819 (0xC0000005).
The program 'C:\Program Files\Microsoft Visual Studio\MyProjects\wordlist\Debug\wordlist.exe' has exited with code -1073741819 (0xC0000005).
can someone please tell me what that means i cant figure it out
|
|
|
|
|
I don't recognize 0xC0000005 as a Windows error code, but it is the number you see for an access violation exception. If that's the case, you've got a bad pointer value somewhere (using an uninitialized pointer, dereferencing NULL , using memory after it's freed, etc.).
Software Zen: delete this;
|
|
|
|
|
0xC0000005 is a windows error code!!!
To be precisely, it is an exception code (EXCEPTION_ACCESS_VIOLATION).
Don't try it, just do it!
|
|
|
|
|
Hey there.
Can someone provide me with a few examples of how to handle exceptions? Below is some code I used in an application. p->ShowWindow(SW_SHOW) is used to display a dialog containing an ActiveX Control. If the control is not registered I should get an exception, but it is not working. I must have something set up wrong. I have many places in my application where I need to do exception handling, thought I should start with this example.
Jerry
/////Not sure if I need these 2 lines of code???
#include <new>
using std::bad_alloc;
///////
try
{
p->ShowWindow(SW_SHOW);
}
catch(bad_alloc exception)
{
MessageBox("Data", "Memory Allocation Error", _OK);
}
//////
|
|
|
|
|
I left out: #include <new>
|
|
|
|
|
First off, you really should be catching exceptions by reference, as catching them by value will create two copies, instead of one.
That apart, IIRC, bad_alloc is thrown only when the new operator fails to allocate memory. AFAIK, the CRT that comes with VC++ doesn't do that, it instead returns NULL. Your code is most probably throwing some other exception. If you *really* want to catch all exceptions, your code should look like
try
{
...
}
catch(...)
{
}
This is not recommended though, I'd suggest figuring out the exact exception thrown and catching it.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
I tried catch(...), it didnt catch any exceptions either.
Something else must be wrong with the code.
Thanks,
Jerry
|
|
|
|
|
S. Senthil Kumar wrote:
bad_alloc is thrown only when the new operator fails to allocate memory. AFAIK, the CRT that comes with VC++ doesn't do that, it instead returns NULL.
It depends on compiler settings.
My programming blahblahblah blog. If you ever find anything useful here, please let me know to remove it.
|
|
|
|
|
hello,
just like we can tile the MDI child windows in our application can we write code for tiling the dialog boxes opened in parent dialog boxes?I thought of deriving our child dialog class from CFrameWnd.But then we have to tile them on clicking a menu option which then has to written in OnInitDialog() of CDialogDlgi.e the parent class.
please guide if i am proceeding in proper way?
thanks
|
|
|
|
|
|
Hi!
I am a college student.I wrote a filter demux the DVB-s mpeg-2 TS.Now it can render more than one audio streams But it can only render one video stream.It will be dead lock when rendering more than one video stream at the same time.
I dont know the reason.
I sincerely wait for the master's help!
please dont laugh at my poor english,I am a chinses student.
|
|
|
|
|
I have a question concerning your demultiplexer.
What kind of error corrections did you use?
I've also written a demux, but when there are many bitstream errors, the video and audio playback will get asynchron, although the media samples are all timestamped.
Now to your question:
You should trace where exactly the deadlock occurs (which filter, which routine...).
Don't try it, just do it!
|
|
|
|
|
Alexander:
I have no error correcttion,because the data source is DVB-S there is few error in the sattelite channle. Do you exactly know the wrong data ? whether you can drop the data,drop the audio and video data at the same time.
how do you process with the two video out put pin ?
|
|
|
|
|
|
I have no idea yet.
|
|
|
|
|
I resovled this problem.The sample number of output pin is not enough!
I increased the number from 100 to 4000,and the COutputQueue object's list cache from 10 to 1024*1024.Now everything runs well.
|
|
|
|
|
Question: In my Edit Control i want the users to input HEX Values (I know they dont except HEX values so I can only use them in a CString as Characters). They would input something like "AA BB". What i want to do is take those 2 values ("AA" being 1 value and "BB" being the other value) and put them into a UINT array. i am just not sure how to go about extracting characters from a string.
Anyone have any suggestions on how I could do this?
Thanks
|
|
|
|
|
CNewbie wrote:
am just not sure how to go about extracting characters from a string.
You can use the function
WCHAR <code>GetAt</code>(int nIndex)
"Success is the ability of going from one failure to another with no loss of enthusiasm" - W.Churchill
|
|
|
|
|
It seems that a webbrowser control doesn't pass any referer info to a visited website, but does pass browser and version info.
How can I get a webbrowser control (dialog-based app, VC++6)to pass a referer of, say, http://www.mybrowser.com ?
|
|
|
|
|
is it possable to change the name of a .txt file when writing to it? file1.txt file2.txt and so on if so how?
|
|
|
|
|
of course you can, just use sprintf to specify the file name.
like this:
char fname[256];
for (int i=0; i
|
|
|
|
|
"MyDlg" is a dialog class derived from CDialog
"pg_price" is a derived CPropertyPage
on pressing a button pg_price(derived from CPropertyPage), domodal is called
void pg_price::OnBUTTON() <br />
{<br />
MyDlg MyDlg_obj;<br />
MyDlg_obj.DoModal();<br />
}
OnInitDialog of MyDlg (derived from CDialog):
BOOL MyDlg::OnInitDialog() <br />
{<br />
CDialog::OnInitDialog();<br />
return TRUE;
}
now, the problem is that on winxp there isnt any problem. MyDlg_obj.DoModal(); displays the resource of MyDlg
but on win98se, the whole application hangs and become non-responsive upon clicking the button
MyDlg never appeared
so i ran a debugger and found out that the application has no problem running up to "BOOL MyDlg::OnInitDialog()" and returns it without any problem. I hit "f5" again and the application hangs. no assert/buffer overflow problems error messages were given, the whole application simply hangs there. i believe that's because the user interface thread got into something it cant get out of
doing a "step over" on the debugger i got the following
http://img182.imageshack.us/img182/7687/step4em.gif
i really got no idea how this happened
how is it possible that this app works well on winxp but not win98se?
i need that application on win98se platform
using vc++6.0 SP6
win98se/winxp
please assist
|
|
|
|
|
however, on winxp, i get this
http://img34.imageshack.us/img34/9697/winxp0ok.jpg
after some research, i discovered that because the button was located on a CPropertySheet and the domodal is launch from it
this CPropertySheet is one of the pages in the tabs area
this tab area is on my main dialog
anyone have problems doing domodal on CPropertySheet ?
how to solve this problem?
|
|
|
|
|
Just for grins, give your dialog a parent:
void pg_price::OnBUTTON() <br />
{<br />
MyDlg MyDlg_obj(this);<br />
MyDlg_obj.DoModal();<br />
}
and see if that helps.
|
|
|
|