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
A

AmitCohen222

@AmitCohen222
About
Posts
14
Topics
8
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Contrast "socket API" and "WSASocket API"
    A AmitCohen222

    Hi bkelly13 ! The "WSASocket API" are Microsoft-specific new functions for handling sockets in Windows. If your code is to run on Windows machines only go with this new API since it provides more flexibility and some functionality benefits when working with types of sockets other than blocking. Here are some qoutes from the Remarks paragraph in the MSDN regarding WSARecv:

    Quote:

    The WSARecv function provides some additional features compared with the standard recv function in three important areas: •It can be used in conjunction with overlapped sockets to perform overlapped recv operations. •It allows multiple receive buffers to be specified making it applicable to the scatter/gather type of I/O. •The lpFlags parameter is used both on input and returned on output, allowing applications to sense the output state of the MSG_PARTIAL flag bit. However, the MSG_PARTIAL flag bit is not supported by all protocols.

    Same goes for WSASend:

    Quote:

    The WSASend function provides functionality over and above the standard send function in two important areas: •It can be used in conjunction with overlapped sockets to perform overlapped send operations. •It allows multiple send buffers to be specified making it applicable to the scatter/gather type of I/O.

    You can also find code examples for working with these API in there. I have created and worked with sockets using this API (Blocking mode and event-based Overlapped mode) and overall it seems to work fine. If relevant, I can send you the code. :cool: Bye, Amit C.

    C / C++ / MFC question csharp c++ visual-studio com

  • Notification of user login
    A AmitCohen222

    Hi all ! I'm writing an MFC application that runs as a Windows Service. I want the application to be notified when a user logs-in or when a user logs-out in order to display icon in the task bar. How can it be done ? Thanks all, Amit c.

    C / C++ / MFC c++ question

  • removing menu in MFC document\view architecture
    A AmitCohen222

    Hi all ! How do i remove (completely) the menu from an existing MFC SDI application ? (I need only the Toolbar) Thanks, Amit

    C / C++ / MFC question c++ architecture

  • 1Gbit UDP
    A AmitCohen222

    Hi Obafemi Martins ! first of all thanks for your answer - it helped me. When sending I now use an exact MTU packet size (of 9k in my network - I use jumbo size frames) and it works great (no fragmentation is needed) without losses even in high bandwidth. But... The sender MUST send messages of 64K size (Hardware Limits) - so I will not be able to avoid ip fragmentation. How to overcome this issue ? Is it possible to be working when ip fregmatation occurs without any losses ? what can be done ? Thanks in advanced, Amit C.

    IT & Infrastructure sysadmin question help

  • 1Gbit UDP
    A AmitCohen222

    Hi all ! I'm trying to send and receive data between 2 computers (Windows 2003 Server OS) using UDP packets through 1Gbit cable. I tried using several UDP packet sizes and compare the data received to the data sent - however it always fails (the comparison) after some time (from few mili's to few minutes). The broadband reaches about 80% - which means it is about 800Mgbit per second data rate. Why it fails ? Is it something to do with UDP ? Maybe the network device driver cannot handle this rate ? How can I know where is the problem ? Thanks in advanced, :confused: amit

    IT & Infrastructure sysadmin question help

  • Use of SetProcessAffinityMask
    A AmitCohen222

    Hi All ! I'm running an application that spwans several processes and threads, it runs on Windows 2003 Server OS and using 8 cpu's machine(Xeon). We are considering the use of SetProcessAffinityMask to allocate heavy processing jobs to a spcific cpu. My question therfore is this: Using SetProcessAffinityMask, is it possible to tell the OS that I want my process to be the only one using that cpu (i.e. no other process, mine or the OS's, is allowed to run on it) ? is it possible ? :~ We wish to get deteministic results when system is working for long periods of time. thanks, Amit :)

    C / C++ / MFC question sysadmin

  • Using MFC's socket within the Process' threads
    A AmitCohen222

    Hi all ! I'm using the MFC sockets mechanism for TCP\IP communication (CSocket, Srialization ability etc.) in a Process that spawns some threads. It works fine until I deliver the socket pointer to one of the threads created by this process so that it can use it to send messages through this socket too - the application then fails, and if I understand correctly it is since the only thread allowed to use this socket is the one created it (in my case the main process). I'm looking for an elegant solution to this limitation (I can go around the problem in several ways but it might affect the complexity and run-time of the program). Any suggestions ??? :doh: Thanks in advanced, Amit

    C / C++ / MFC c++ algorithms help question

  • Hiding a Dialog application on first run
    A AmitCohen222

    No, I used Visual Studio 6.0 Wizard to create a standard Dialog based application. According to what Hamid answered it seems that there is no elegant way to do this, and the solution is to go around it... Amit C.

    C / C++ / MFC c++ question

  • Hiding a Dialog application on first run
    A AmitCohen222

    OK. But where do I turn off the WS_VISIBLE flag ? Since it is a Dialog application there is no PreCreateWindow message. When I try to overwrite the structure in the OnCreate() it seems that it is already turned off. Should do it through OnInitialDialog() ? Or elsewhere ? Thanks, Amit

    C / C++ / MFC c++ question

  • Hiding a Dialog application on first run
    A AmitCohen222

    Hello All ! I wish to hide (not display) the GUI of an MFC Dialog Based application on first run. When I use ShowWindow(SW_HIDE) inside OnInitialDialog() it doesn't seem to work. What should I do ?

    C / C++ / MFC c++ question

  • tooltip for CStatic
    A AmitCohen222

    Hamid Hi ! Thanks for the link - it helped, However, when I try to create it dynamically (using Create function) I get an error... Amit

    C / C++ / MFC question

  • tooltip for CStatic
    A AmitCohen222

    Hi All ! How do I create a tooltip (using CToolTipCtrl) for a CStatic member in a dialog ? for a CButton class member it works just fine but for the CStatic class member I get no tooltip. Thanks, Amit :doh:

    C / C++ / MFC question

  • creating windows services using MFC\c++
    A AmitCohen222

    I searched for articles about it in CodeProject but found only articles using C#\.NET to create windows services - I wish to use C\C++\MFC

    C / C++ / MFC csharp c++ visual-studio question

  • creating windows services using MFC\c++
    A AmitCohen222

    Hello ! I wish to create a windows service using MFC\C\C++ in Visual Studio 6.0 (not using .NET !!). How ? Amit :doh:

    C / C++ / MFC csharp c++ visual-studio 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