Search found 54 matches

by Sunsawe
Sun Jun 03, 2007 9:45 pm
Forum: Compiler / Linking / IDE Related
Topic: winsock.h or winsock2.h can i choose?
Replies: 10
Views: 2128

winsock.h or winsock2.h can i choose?

Hi, I'm developping a small project under windows with visual studio 2005. I am using a librairie in my project which uses winsock2.h But the wxWidget part of the project use winsock.h and of course there are issues and compil time errors. What is the difference between winsock.h and winsock2.h? Are...
by Sunsawe
Thu May 31, 2007 4:31 pm
Forum: C++ Development
Topic: Why wxHashMap Iterator is not working?
Replies: 2
Views: 505

i feel a bit stupid...
sorry for that...
by Sunsawe
Wed May 30, 2007 9:09 pm
Forum: C++ Development
Topic: Why wxHashMap Iterator is not working?
Replies: 2
Views: 505

Why wxHashMap Iterator is not working?

Hi, I created a hashmap(wxString,wxString) with wxWidgets 2.8.3. I did it by that way: WX_DECLARE_STRING_HASH_MAP( wxString, wxStringHashMap ); Then created an object to use it: wxStringHashMap hashtest; hashtest[X] = Y; wxStringHashMap::Iterator it; for(it = hashtest.begin(); it!= hashtest.end() ; ...
by Sunsawe
Tue May 29, 2007 9:23 am
Forum: C++ Development
Topic: Debug Assertion failed while displaying wxString
Replies: 5
Views: 859

Ok.... I can't test it now but it sounds interesting.
Is there any other "dangerous" characters?
Is there a way to "secure" them or can i just replace all % in the string by \% ?

Thanks
by Sunsawe
Tue May 29, 2007 7:06 am
Forum: C++ Development
Topic: Debug Assertion failed while displaying wxString
Replies: 5
Views: 859

i performed some more tests. I tried to display every pieces of message that were received. The exception has been fired before. So for each full buffer after i appended the content to the string, i displayed it with : wxLogDebug(wxString(wxConvUTF8.cMB2WC((char*)(buf2)), *wxConvCurrent)); The last ...
by Sunsawe
Mon May 28, 2007 5:45 pm
Forum: C++ Development
Topic: Debug Assertion failed while displaying wxString
Replies: 5
Views: 859

well... I'm still trying to solve that. I noticed that before the mail, all the messages from the server were shorter than the buffer size. I thought that the problem could come from the loop ( that appends the buffer content to a string). To test that, i reduce the buffer size to 8 but... it did th...
by Sunsawe
Fri May 25, 2007 6:33 am
Forum: C++ Development
Topic: Debug Assertion failed while displaying wxString
Replies: 5
Views: 859

Debug Assertion failed while displaying wxString

Hi, I'm usign this piece of code to read in a wxSocket (client): wxChar buf2[1024] = {0}; sock->Read(buf2,(sizeof(buf2)-1)); while(sock->LastCount() > 0 && sock->IsConnected()) { returnString.Append(wxString(wxConvUTF8.cMB2WC((char*)(buf2)), *wxConvCurrent)); sock->Read(buf2,(sizeof(buf2)-1)); } wxL...
by Sunsawe
Wed Apr 18, 2007 9:51 am
Forum: C++ Development
Topic: How to implement web interface for my app?
Replies: 7
Views: 1515

Well... I think this is not that difficult depending on how you can modify your application. My guess is that you need a normal web server like Apache, no need to create on. Then you have to make a real website with whatever language you want, it doesn't matter. The thing is that you have to allow y...
by Sunsawe
Tue Apr 17, 2007 3:33 pm
Forum: C++ Development
Topic: How to use SSL or TLS on wxSocket ?
Replies: 12
Views: 3626

Actually, i'm still working on the same project. I'm just trying to built a little smtp client that deals with authentication. Smtp servers like gmail require an ssl/tls connection to proceed. Knowing that first the connection should be opened then the STARTTLS command should be sent by the client. ...
by Sunsawe
Tue Apr 17, 2007 6:26 am
Forum: C++ Development
Topic: How to use SSL or TLS on wxSocket ?
Replies: 12
Views: 3626

Well, I finally succeeded to compile wxCurl but... Can't find any tutorial on how to use it... I saw a lot of things in it and read the libcurl doc but... so complicated... :oops: Everything seems to be linked to the protocol (ftp, http...) that is used. Me, i just want to open a socket then switch ...
by Sunsawe
Mon Apr 09, 2007 1:46 pm
Forum: C++ Development
Topic: How to obtain a wxUint8 array from a wxFile?
Replies: 12
Views: 1315

Oups...
Sorry... won't do it again...

Thanks for your help, it works perfectly!
by Sunsawe
Mon Apr 09, 2007 12:44 am
Forum: C++ Development
Topic: How to obtain a wxUint8 array from a wxFile?
Replies: 12
Views: 1315

Hi, I tried to use the piece of code that Joel gave. wxFileInputStream strm(wxT("FileName")); wxUint8 arr[65536]; while (!strm.Eof()) { strm.Read(arr, 65536); //arr has the last 65536 bytes (or less, depending of the file pointer's position) //do stuff with arr. The first strm.LastRead() bytes are v...
by Sunsawe
Sat Apr 07, 2007 2:54 pm
Forum: C++ Development
Topic: How to obtain a wxUint8 array from a wxFile?
Replies: 12
Views: 1315

well...

Does somebody know if base64 encoding is "state-dependent"?
by Sunsawe
Sat Apr 07, 2007 1:28 pm
Forum: C++ Development
Topic: How to obtain a wxUint8 array from a wxFile?
Replies: 12
Views: 1315

I think this should fit to my case.
But just to be sure, what do you mean by "not state-dependent"?
by Sunsawe
Fri Apr 06, 2007 12:14 pm
Forum: C++ Development
Topic: How to obtain a wxUint8 array from a wxFile?
Replies: 12
Views: 1315

Thanks for that hint.

I can easily understand why it's not the best thing for large files but...
How to do in this case?
I load the file to encode it after so how can i split it without distubing the encoding process?