Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
S

Szymon Pusz

@Szymon Pusz
About
Posts
12
Topics
9
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • ASSERT on CFileDialog.DoModal()
    S Szymon Pusz

    My code looks like this: CFileDialog m_FileDialog(FALSE); m_FileDialog.m_ofn.Flags = OFN_HIDEREADONLY; m_FileDialog.m_ofn.lpstrFilter = "Rich Text Format (*.rtf)\0*.rtf\0"); m_FileDialog.m_ofn.lpstrDefExt = "*.rtf"; m_FileDialog.DoModal(); <------------------- Why do I get an assertion failed on DoModal() ???

    C / C++ / MFC question

  • Memory deallocation
    S Szymon Pusz

    Who knows how to deallocate memory I allocated using something like this: char *x = new char[100000000]; ? I know tha there is a 'delete' command, but it deallocates mem only for the current app and I want to give the memory back to the OS. Any ideas ?

    C / C++ / MFC performance tutorial question

  • Socket and ReadCallback
    S Szymon Pusz

    I have a problem with ReadCallback when I'm using sockets. Here's my problem: i'm writing an internet chat program. When user sends me a messages at large time intervals, everything is OK, but if he's flooding me, ReadCallback gets lots of calls. This causes that many Readcallback is calling and this causes overlapping messages in socket. Socket treats some messages as a one big message (they were sent as a separate messages). As a result of this the message is not easy readable... My ReadCallback begins with Monitor.Enter(RecQueue) and ends Monitor.Exit(RecQueue) [RecQueue = new Queue()]. How to force socket not to overlap multi messages into one? Here is my ReadCallback code: public void ReadCallback(IAsyncResult ar) { Monitor.Enter(RecQueue); StateObject state = (StateObject) ar.AsyncState; state.workSocket.Blocking = false; Socket handler = state.workSocket; handler.Blocking = false; int read; read = handler.EndReceive(ar); if (read > 0) //display a message { DisplayMessageProcedure("the message"); } else { //close the connection handler.Close(); } if (handler.Connected == true) { handler.BeginReceive(state.buffer,0,StateObject.BufferSize, 0, new AsyncCallback(ReadCallback), state); } Monitor.Exit(RecQueue); } public class StateObject { public Socket workSocket = null; public const int BufferSize = 1024; public byte[] buffer = new byte[BufferSize]; public StringBuilder sb = new StringBuilder(); } public void ListenProcedure() { IPAddress ipAd = IPAddress.Parse("0.0.0.0"); //all interfaces IPEndPoint localEP = new IPEndPoint(ipAd, System.Convert.ToInt32(PortEdit.Text)); sock = new Socket(localEP.Address.AddressFamily, SocketType.Stream, ProtocolType.Tcp); sock.Blocking = false; sock.Bind(localEP); sock.Listen(1); sock.BeginAccept(new AsyncCallback(AcceptCallback), sock); } HELP!!!

    C# help ios data-structures tutorial question

  • How to play WAVE sound from resource?
    S Szymon Pusz

    Yesss, now it works!!! Thanks a lot!!!

    C# tutorial hardware question learning

  • How to play WAVE sound from resource?
    S Szymon Pusz

    Thanks, but does anyone knows how to open these wave bytes??? I know that there's an API function called PlaySound, but it can play from file or from *Win32* resource. As far as I'm concerned C# doesn't compile resources as a Win32 type, but as it own format... Any ideas?

    C# tutorial hardware question learning

  • How to play WAVE sound from resource?
    S Szymon Pusz

    I put a WAVE file into the resource as a Embedded resource. How to play it now? Could someone give me an example?

    C# tutorial hardware question learning

  • "Default" attribute to button ?
    S Szymon Pusz

    How can I add something like "default" attribute to button? When I press the ENTER key I simply want to activate specific button, but where is the "default" attribute? It was in Visual C++, but in C# I don't see it... :((

    C# c++ question csharp

  • Assembler in C# code ?
    S Szymon Pusz

    Who knows if it's possible to include some inline assembler code into C# code ?

    C# csharp question

  • Yes! Solution to compile MANIFEST resource into EXE ;)
    S Szymon Pusz

    At last I found the way to compile manifest into C# exe file. Download program called PE Explorer (http://www.heaventools.com). This program can insert manifest resource into the final exe file. It's a little odd, but it works very well ;P

    C# csharp com learning

  • Manifest compiled into the EXE file
    S Szymon Pusz

    I've already tried it and it works neither "Embedded Resource" nor "Content".:(( I think it should be compiled as a Win32 resource and C# compiles it a little bit different (resx). But I'm not sure.

    C# tutorial question learning

  • Manifest compiled into the EXE file
    S Szymon Pusz

    I know that this topic was discussed, but no-one wrote how to compile manifest as a resource (into the EXE file). So I ask how to do it?

    C# tutorial question learning

  • Compiling an app in C# with windows dlls STATICALLY linked
    S Szymon Pusz

    Who knows how to link all DLL's which an C# app need into one EXE file staticaly. In VS C++ there is a choice called "Use MFC in a Static Library" and then the c++ app runs on every system, but how to do it in C#???

    C# c++ csharp visual-studio tutorial question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups