首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > C++ >

帮忙修改一上vc6代码

2012-08-08 
帮忙修改一下vc6代码这段代码在vc6下面,不能编译通过,请达人帮忙修改一下C/C++ code// notify.cpp : Defin

帮忙修改一下vc6代码
这段代码在vc6下面,不能编译通过,请达人帮忙修改一下

C/C++ code
// notify.cpp : Defines the entry point for the console application.#include "stdafx.h"#define   _WIN32_WINNT   0x0400#include <windows.h>#include <stdlib.h>CRITICAL_SECTION g_cs;VOID WINAPI WaitOrTimerCallBack(PVOID pContext, BOOLEAN bTimeOrWait){ if (NULL == pContext)  return; EnterCriticalSection(&g_cs); wchar_t *pPrintf = (wchar_t *) pContext; wprintf(L"%s /r/n", pPrintf);  LeaveCriticalSection(&g_cs); return;}int main(int argc, char* argv[]){ wchar_t *pContent = (wchar_t *) malloc(sizeof(wchar_t) * 512); InitializeCriticalSection(&g_cs); HANDLE hTimeQueue = CreateTimerQueue(); HANDLE hTimer = NULL; wsprintfW(pContent, L"Hello Worl"); CreateTimerQueueTimer(&hTimer, hTimeQueue, WaitOrTimerCallBack, pContent,   0, 1000, WT_EXECUTEDEFAULT); Sleep(5000); DeleteTimerQueueEx(hTimeQueue, INVALID_HANDLE_VALUE); DeleteCriticalSection(&g_cs); wprintf(L"Game over /r/n");  getchar();  free(pContent); pContent = NULL; return 0;}


[解决办法]
请把错误消息贴出来,并且建议楼主quit VC6吧。太老了,而且bug太多了。

热点排行