CenterProtocolF.cpp 910 B

12345678910111213141516171819202122232425262728293031
  1. //---------------------------------------------------------------------------
  2. #pragma hdrstop
  3. //---------------------------------------------------------------------------
  4. #include "CenterCommF.h"
  5. #include "CenterProtocolF.h"
  6. #include "DMNetServerF.h"
  7. //---------------------------------------------------------------------------
  8. #include <winsock2.h>
  9. //---------------------------------------------------------------------------
  10. PROCESS_COMMUNICATION_STRUCT g_Process;
  11. //---------------------------------------------------------------------------
  12. #pragma package(smart_init)
  13. DWORD ip2ulong(char *AIp)
  14. {
  15. return inet_addr(AIp);
  16. }
  17. //---------------------------------------------------------------------------
  18. char *ulong2ip(DWORD AIp)
  19. {
  20. struct in_addr paddr;
  21. paddr.S_un.S_addr = AIp;
  22. return inet_ntoa(paddr);
  23. }
  24. //---------------------------------------------------------------------------