www.pudn.com > DmyNP_source.rar > WinMain.c, change:2004-11-22,size:854b


/*--> 
Damayi Net-Phone, 2004/11 (damayi.org) 
<--*/ 
 
#include "src\winmain.h" 
 
HINSTANCE g_hInst;   //实例句柄 
char g_pTmp[1025];   //文本缓冲 
GDIOBJ g_GJ;         //全局GDI句柄结构变量 
INIVAR g_IV;         //INI启动配置结构变量 
SYSOTH g_SO;         //全局SYS状态结构变量 
 
static int StartMain(void) 
{ 
   if(Initialize()!=0) goto myExit; 
 
   while(TRUE) 
   { 
      if(EnterMain()!=0) break; 
      if(GetHnameIP()!=0) continue; 
      if(PhoneMain()!=0) break; 
   } 
 
   myExit: 
      Clear(); 
   return 0; 
} 
 
#pragma option -w- 
#ifdef __CONSOLE__ 
int main(int argc, char *argv[], char *envp[]) 
{ 
   g_hInst = GetModuleHandle(NULL); 
   return StartMain(); 
} 
#else 
int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrev, LPSTR lpCmd, int nShow) 
{ 
   g_hInst = hInst; 
   return StartMain(); 
} 
#endif 
#pragma option -w