main.cpp 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. #include "dialog.h"
  2. #include <QApplication>
  3. //typedef HWND(WINAPI *PROCGETCONSOLEWINDOW)();
  4. //PROCGETCONSOLEWINDOW GetConsoleWindowAPI;
  5. //int iNum = 0;
  6. #define ISAPI_OUT_LEN 3 * 1024 * 1024
  7. #define ISAPI_STATUS_LEN 8*1024
  8. //时间解析宏定义
  9. #define GET_YEAR(_time_) (((_time_)>>26) + 2000)
  10. #define GET_MONTH(_time_) (((_time_)>>22) & 15)
  11. #define GET_DAY(_time_) (((_time_)>>17) & 31)
  12. #define GET_HOUR(_time_) (((_time_)>>12) & 31)
  13. #define GET_MINUTE(_time_) (((_time_)>>6) & 63)
  14. #define GET_SECOND(_time_) (((_time_)>>0) & 63)
  15. int main(int argc, char *argv[])
  16. {
  17. // QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
  18. QApplication a(argc, argv);
  19. Dialog w;
  20. // NET_DVR_Init();
  21. w.show();
  22. w.startInBackground();
  23. //---------------------------------------
  24. // 初始化
  25. // NET_DVR_Init();
  26. // //设置连接时间与重连时间
  27. // NET_DVR_SetConnectTime(2000, 1);
  28. // NET_DVR_SetReconnect(10000, true);
  29. //---------------------------------------
  30. //设置异常消息回调函数
  31. // NET_DVR_SetExceptionCallBack_V30(0, NULL, g_ExceptionCallBack, NULL);
  32. //---------------------------------------
  33. // 获取控制台窗口句柄
  34. //HMODULE hKernel32 = GetModuleHandle("kernel32");
  35. // GetConsoleWindowAPI = (PROCGETCONSOLEWINDOW)GetProcAddress(hKernel32, "GetConsoleWindow");
  36. return a.exec();
  37. }