warning C4244: “return”: 从“WPARAM”转换到“int”,可能丢失数据

mqphk 2007-11-08 11:30:19
vs 2005 编译 windows 程序设计 第三章的简单程序
出现警告
hellowin.cpp(157) : warning C4244: “return”: 从“WPARAM”转换到“int”,可能丢失数据

哪位帮忙一下,感谢!


HELLOWIN.C

/*------------------------------------------------------------------------

HELLOWIN.C -- Displays "Hello, Windows 98!" in client area

(c) Charles Petzold, 1998

-----------------------------------------------------------------------*/

#include <windows.h>


LRESULT CALLBACK WndProc (HWND, UINT, WPARAM, LPARAM) ;


int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance,

PSTR szCmdLine, int iCmdShow)

{

static TCHAR szAppName[] = TEXT ("HelloWin") ;

HWND hwnd ;

MSG msg ;

WNDCLASS wndclass ;


wndclass.style = CS_HREDRAW | CS_VREDRAW ;

wndclass.lpfnWndProc = WndProc ;

wndclass.cbClsExtra = 0 ;

wndclass.cbWndExtra = 0 ;

wndclass.hInstance = hInstance ;

wndclass.hIcon = LoadIcon (NULL, IDI_APPLICATION) ;

wndclass.hCursor = LoadCursor (NULL, IDC_ARROW) ;

wndclass.hbrBackground= (HBRUSH) GetStockObject (WHITE_BRUSH) ;

wndclass.lpszMenuNam = NULL ;

wndclass.lpszClassName= szAppName ;


if (!RegisterClass (&wndclass))

{

MessageBox ( NULL, TEXT ("This program requires Windows NT!"),

szAppName, MB_ICONERROR) ;

return 0 ;

}

hwnd = CreateWindow( szAppName, // window class name

TEXT ("The Hello Program"), // window caption

WS_OVERLAPPEDWINDOW, // window style

CW_USEDEFAULT,// initial x position

CW_USEDEFAULT,// initial y position

CW_USEDEFAULT,// initial x size

CW_USEDEFAULT,// initial y size

NULL, // parent window handle

NULL, // window menu handle

hInstance, // program instance handle

NULL) ; // creation parameters



ShowWindow (hwnd, iCmdShow) ;

UpdateWindow (hwnd) ;



while (GetMessage (&msg, NULL, 0, 0))

{

TranslateMessage (&msg) ;

DispatchMessage (&msg) ;

}

return msg.wParam ;

}


LRESULT CALLBACK WndProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)

{

HDC hdc ;

PAINTSTRUCT ps ;

RECT rect ;



switch (message)

{

case WM_CREATE:

PlaySound (TEXT ("hellowin.wav"), NULL, SND_FILENAME | SND_ASYNC) ;

return 0 ;


case WM_PAINT:

hdc = BeginPaint (hwnd, &ps) ;



GetClientRect (hwnd, &rect) ;



DrawText (hdc, TEXT ("Hello, Windows 98!"), -1, &rect,

DT_SINGLELINE | DT_CENTER | DT_VCENTER) ;

EndPaint (hwnd, &ps) ;

return 0 ;



case WM_DESTROY:

PostQuitMessage (0) ;

return 0 ;

}

return DefWindowProc (hwnd, message, wParam, lParam) ;

}

...全文
1599 12 打赏 收藏 转发到动态 举报
写回复
用AI写文章
12 条回复
切换为时间正序
请发表友善的回复…
发表回复
yuanji1 2011-04-25
  • 打赏
  • 举报
回复
hehe....
kuangdaxz 2011-03-07
  • 打赏
  • 举报
回复
我也遇到同样的问题,希望从这个帖子中找到解决方案!
cyw026 2009-09-22
  • 打赏
  • 举报
回复
同样问题~~~不过平时都没注意这些
mqphk 2007-11-09
  • 打赏
  • 举报
回复
具体怎么改?
mqphk 2007-11-09
  • 打赏
  • 举报
回复
感谢,thisisyjs.问题终于解决了。
菜牛 2007-11-09
  • 打赏
  • 举报
回复
强制转换一下就可以了。
thisisyjs 2007-11-09
  • 打赏
  • 举报
回复


return msg.wParam; --> return (int)msg.wParam;
mqphk 2007-11-09
  • 打赏
  • 举报
回复
WINAPI WinMain
改成
void WINAPI WinMain, 去掉最后的返回



e:\cproj\windows程序设计\3hellowin\3hellowin\3hellowin.cpp(32) : error C2556: “void WinMain(HINSTANCE,HINSTANCE,LPSTR,int)”: 重载函数与“int WinMain(HINSTANCE,HINSTANCE,LPSTR,int)”只是在返回类型上不同
1> d:\program files\microsoft visual studio 8\vc\platformsdk\include\winbase.h(1875) : 参见“WinMain”的声明
1>e:\cproj\windows程序设计\3hellowin\3hellowin\3hellowin.cpp(32) : error C2371: “WinMain”: 重定义;不同的基类型
1> d:\program files\microsoft visual studio 8\vc\platformsdk\include\winbase.h(1875) : 参见“WinMain”的声明

3hellowin.cpp(334) : warning C4715: “WinMain”: 不是所有的控件路径都返回值
WizardK 2007-11-09
  • 打赏
  • 举报
回复
return msg.wParam;这个何意?
凤矶 2007-11-09
  • 打赏
  • 举报
回复
不用管
或int WINAPI WinMain
改成
void WINAPI WinMain, 去掉最后的返回

ccpaishi 2007-11-09
  • 打赏
  • 举报
回复
VS2005对于数据格式的要求变得很高了,前面加上(int)应该就可以了
tracing 2007-11-09
  • 打赏
  • 举报
回复
编译器的输出还是中文
时分法,真正的三维编程,场景渲染 #pragma warning(disable: 4995) #include #include #include // Scenes 场景 #include "Scene.h" #include "StanfordBunnyScene.h" // Include nvstereo, but only for Dx10. #define NO_STEREO_D3D9 #include "nvstereo.h" // Text rendering ID3DX10Font* gFont10 = NULL; ID3DX10Sprite* gSprite10 = NULL; CDXUTTextHelper* gTxtHelper = NULL; // our global vector of all our scenes. // Make this global because it's easier to work with DXUT this way const int cNoActiveScene = -1; std::vector gScenes; int gActiveScene = cNoActiveScene; // A little UI stuff GUI图形用户界面 //CDXUTDialog这个类负责纪录一个对话框的所有属性以及它上面的所有控件信息 //CDXUTDialogResourceManager,这个类保存了所有注册过的对话框链表,以及这些对话框共享的资源 //CDXUTElement 这个类保存了需要渲染的元素信息,经常会在渲染函数中用到 //CGrowableArray< TYPE >类 可动态增长的链表类。 CDXUTDialogResourceManager gDialogResourceManager; CDXUTDialog gUI; // Our parameters for the stereo parameters texture.纹理立体参数 nv::stereo::ParamTextureManagerD3D10* gStereoTexMgr = NULL; ID3D10Texture2D* gStereoParamTexture = NULL; ID3D10ShaderResourceView* gStereoParamTextureRV = NULL; // Support going back and forth between fullscreen and windowed mode #define IDC_TOGGLEFULLSCREEN 1 #define IDC_MENU 2 // ------------------------------------------------------------------------------------------------ void ClearRenderTargets(ID3D10Device* d3d10) { // Clearing every frame is a good practice for SLI. By clearing surfaces, you indicate to the // driver that information from the previous frame is not needed by the other GPU(s) involved // in rendering. float ClearColor[4] = { 0.0, 0.0, 0.5, 0.0 }; ID3D10RenderTargetView* pRTV = DXUTGetD3D10RenderTargetView(); d3d10->ClearRenderTargetView(pRTV, ClearColor); ID3D10DepthStencilView* pDSV = DXUTGetD3D10DepthStencilView(); d3d10->ClearDepthStencilView(pDSV, D3D10_CLEAR_DEPTH, 1.0, 0); } // ------------------------------------------------------------------------------------------------ void RenderWorld(ID3D10Device* d3d10, double fTime, float fElapsedTime) { // Give the active scene a shot at rendering the world. gScenes[gActiveScene]->Render(d3d10); } // ------------------------------------------------------------------------------------------------ void RenderText() { // Render common text, then give the active scene a chance to display text information // about itself. gTxtHelper->Begin(); gTxtHelper->SetInsertionPos(8, 8); gTxtHelper->SetForegroundColor(D3DXCOLOR(1.0f, 1.0f, 0.0f, 1.0f)); gTxtHelper->DrawTextLine(L""); gTxtHelper->DrawTextLine(L""); gTxtHelper->DrawTextLine(L""); gTxtHelper->DrawTextLine(DXUTGetFrameStats(true)); gTxtHelper->DrawTextLine(DXUTGetDeviceStats()); bool stereoActive = gStereoTexMgr->IsStereoActive(); if (stereoActive) { gTxtHelper->DrawTextLine(L"Stereo Active"); } else { gTxtHelper->SetForegroundColor(D3DXCOLOR(1.0f, 0.2f, 0.2f, 1.0f)); gTxtHelper->DrawTextLine(L"Stereo is currently disabled--you should see no differences between techniques."); gTxtHelper->SetForegroundColor(D3DXCOLOR(1.0f, 0.5f, 0.0f, 1.0f)); } gScenes[gActiveScene]->RenderText(gTxtHelper, stereoActive); gTxtHelper->End(); } // ------------------------------------------------------------------------------------------------ void RenderCursor(ID3D10Device* d3d10) { // Cursor rendering is handled by the active scene. // Cursors need a bit of stereo love, so the scenes handle that. gScenes[gActiveScene]->RenderCursor(d3d10); } // ------------------------------------------------------------------------------------------------ void RenderHUD(ID3D10Device* d3d10, double fTime, float fElapsedTime) { RenderText(); gUI.OnRender( fElapsedTime ); // Render the cursor last for the obvious reason that we want it to appear above everything // else RenderCursor(d3d10); } // ------------------------------------------------------------------------------------------------ HRESULT CreateStereoParamTextureAndView(ID3D10Device* d3d10) { // This function creates a texture that is suitable to be stereoized by the driver. // Note that the parameters primarily come from nvstereo.h using nv::stereo::ParamTextureManagerD3D10; HRESULT hr = D3D_OK; D3D10_TEXTURE2D_DESC desc; desc.Width = ParamTextureManagerD3D10::Parms::StereoTexWidth; desc.Height = ParamTextureManagerD3D10::Parms::StereoTexHeight; desc.MipLevels = 1; desc.ArraySize = 1; desc.Format = ParamTextureManagerD3D10::Parms::StereoTexFormat; desc.SampleDesc.Count = 1; desc.SampleDesc.Quality = 0; desc.Usage = D3D10_USAGE_DYNAMIC; desc.BindFlags = D3D10_BIND_SHADER_RESOURCE; desc.CPUAccessFlags = D3D10_CPU_ACCESS_WRITE; desc.MiscFlags = 0; V_RETURN(d3d10->CreateTexture2D(&desc;, NULL, &gStereoParamTexture;)); // Since we need to bind the texture to a shader input, we also need a resource view. D3D10_SHADER_RESOURCE_VIEW_DESC descRV; descRV.Format = desc.Format; descRV.ViewDimension = D3D10_SRV_DIMENSION_TEXTURE2D; descRV.Texture2D.MipLevels = 1; descRV.Texture2D.MostDetailedMip = 0; descRV.Texture2DArray.MostDetailedMip = 0; descRV.Texture2DArray.MipLevels = 1; descRV.Texture2DArray.FirstArraySlice = 0; descRV.Texture2DArray.ArraySize = desc.ArraySize; V_RETURN(d3d10->CreateShaderResourceView(gStereoParamTexture, &descRV;, &gStereoParamTextureRV;)); return hr; } // ------------------------------------------------------------------------------------------------ bool CALLBACK IsD3D10DeviceAcceptable(UINT Adapter, UINT Output, D3D10_DRIVER_TYPE DeviceType, DXGI_FORMAT BackBufferFormat, bool bWindowed, void* pUserContext) { // Only accept hardware devices return DeviceType == D3D10_DRIVER_TYPE_HARDWARE; } // ------------------------------------------------------------------------------------------------ HRESULT CALLBACK OnD3D10CreateDevice(ID3D10Device* d3d10, const DXGI_SURFACE_DESC* pBackBufferSurfaceDesc, void* pUserContext) { HRESULT hr = D3D_OK; V_RETURN(gDialogResourceManager.OnD3D10CreateDevice(d3d10)); V_RETURN(D3DX10CreateFont(d3d10, 15, 0, FW_BOLD, 1, FALSE, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH | FF_DONTCARE, L"Verdana", &gFont10;)); V_RETURN(D3DX10CreateSprite(d3d10, 512, &gSprite10;)); gTxtHelper = new CDXUTTextHelper(NULL, NULL, gFont10, gSprite10, 15); // Create our stereo parameter texture V_RETURN(CreateStereoParamTextureAndView(d3d10)); // Initialize the stereo texture manager. Note that the StereoTextureManager was created // before the device. This is important, because NvAPI_Stereo_CreateConfigurationProfileRegistryKey // must be called BEFORE device creation. gStereoTexMgr->Init(d3d10); // Give each of our scenes a chance to load their resources. for (std::vector::iterator it = gScenes.begin(); it != gScenes.end(); ++it) { (*it)->SetStereoParamRV(gStereoParamTextureRV); V_RETURN((*it)->LoadResources(d3d10)); } return hr; } // ------------------------------------------------------------------------------------------------ void CALLBACK OnD3D10DestroyDevice(void* pUserContext) { // Clean everything up. gDialogResourceManager.OnD3D10DestroyDevice(); for (std::vector::iterator it = gScenes.begin(); it != gScenes.end(); ++it) { (*it)->UnloadResources(); } SAFE_RELEASE(gStereoParamTextureRV); SAFE_RELEASE(gStereoParamTexture); SAFE_DELETE(gStereoTexMgr); SAFE_RELEASE(gFont10); SAFE_RELEASE(gSprite10); SAFE_DELETE(gTxtHelper); } // ------------------------------------------------------------------------------------------------ HRESULT CALLBACK OnD3D10ResizedSwapChain(ID3D10Device* d3d10, IDXGISwapChain *pSwapChain, const DXGI_SURFACE_DESC* pBackBufferSurfaceDesc, void* pUserContext) { HRESULT hr = D3D_OK; V_RETURN(gDialogResourceManager.OnD3D10ResizedSwapChain(d3d10, pBackBufferSurfaceDesc)); // All scenes need a chance to handle the resize. for (std::vector::iterator it = gScenes.begin(); it != gScenes.end(); ++it) { (*it)->OnD3D10ResizedSwapChain(d3d10, pSwapChain, pBackBufferSurfaceDesc); } gUI.SetLocation( pBackBufferSurfaceDesc->Width - 170, 0 ); gUI.SetSize( 170, 170 ); return hr; } // ------------------------------------------------------------------------------------------------ void CALLBACK Render(ID3D10Device* d3d10, double fTime, float fElapsedTime, void* pUserContext) { // First, we update our stereo texture gStereoTexMgr->UpdateStereoTexture(d3d10, gStereoParamTexture, false); // Then, we tell the scene what the current convergence depth is. Cursor rendering // uses this information to cause the cursor to draw at screen depth if the cursor // isn't currently over an object in the scene. gScenes[gActiveScene]->SetConvergenceDepth(gStereoTexMgr->GetConvergenceDepth()); // Then, clear our render targets, render the world and finish with the hud. ClearRenderTargets(d3d10); RenderWorld(d3d10, fTime, fElapsedTime); RenderHUD(d3d10, fTime, fElapsedTime); } // ------------------------------------------------------------------------------------------------ void CALLBACK OnD3D10ReleasingSwapChain(void* pUserContext) { gDialogResourceManager.OnD3D10ReleasingSwapChain(); } // ------------------------------------------------------------------------------------------------ bool CALLBACK ModifyDeviceSettings(DXUTDeviceSettings* pDeviceSettings, void* pUserContext) { if (pDeviceSettings->ver == DXUT_D3D10_DEVICE) { #if _DEBUG // Set debug if debugging. In debug, run aliased mode because // otherwise DXUT deletes a target while bound, causing many, many // spew messages. pDeviceSettings->d3d10.CreateFlags |= D3D10_CREATE_DEVICE_DEBUG; pDeviceSettings->d3d10.sd.SampleDesc.Count = 1; #else // I like AA, so turn it on here. pDeviceSettings->d3d10.sd.SampleDesc.Count = 4; #endif pDeviceSettings->d3d10.sd.SampleDesc.Quality = 0; } return true; } // ------------------------------------------------------------------------------------------------ LRESULT CALLBACK MsgProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, bool* pbNoFurtherProcessing, void* pUserContext) { // WM_MOUSEMOVE needs to make it to the active scene to draw the cursor in the right place. *pbNoFurtherProcessing = gDialogResourceManager.MsgProc(hWnd, uMsg, wParam, lParam); if( *pbNoFurtherProcessing && uMsg != WM_MOUSEMOVE) return 0; // Again, make sure that WM_MOUSEMOVE makes it to the active scene, otherwise the mouse will // freeze when it's over our GUI elements, making it significantly less useful. *pbNoFurtherProcessing = gUI.MsgProc(hWnd, uMsg, wParam, lParam); if( *pbNoFurtherProcessing && uMsg != WM_MOUSEMOVE) return 0; // Pass all remaining windows messages to camera so it can respond to user input if (gActiveScene != cNoActiveScene) { return gScenes[gActiveScene]->HandleMessages(hWnd, uMsg, wParam, lParam); } return 0; } // ------------------------------------------------------------------------------------------------ void CALLBACK Update(double fTime, float fElapsedTime, void* pUserContext) { // Only the active scene gets the update gScenes[gActiveScene]->Update(fTime, fElapsedTime); } // ------------------------------------------------------------------------------------------------ void CALLBACK OnGUIEvent(UINT nEvent, int nControlID, CDXUTControl* pControl, void* pUserContext) { switch( nControlID ) { case IDC_TOGGLEFULLSCREEN: DXUTToggleFullScreen(); break; case IDC_MENU: default: // All other messages need to be given to all scenes, in case they need to handle // them. for (std::vector::iterator it = gScenes.begin(); it != gScenes.end(); ++it) { (*it)->OnGUIEvent(nEvent, nControlID, pControl, pUserContext); } } } // ------------------------------------------------------------------------------------------------ void InitUI() //UI User Interface 用户界面 { gUI.Init(&gDialogResourceManager;); int y = 10; gUI.SetCallback(OnGUIEvent); gUI.AddButton( IDC_TOGGLEFULLSCREEN, L"Toggle full screen", 35, y, 125, 22 ); gUI.AddButton(IDC_MENU,L"Menu",-1024,y,125,22); y += 24; int startId = IDC_TOGGLEFULLSCREEN + 1; for (std::vector::iterator it = gScenes.begin(); it != gScenes.end(); ++it) { (*it)->InitUI(gUI, 35, y, startId); } } // ------------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------------ INT WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, INT) { HRESULT hr; V_RETURN(DXUTSetMediaSearchPath(L"..\\Source\\StereoIssues")); // Set Direct3D 10 callbacks. This sample won't work with Dx9, so don't bother setting any of // those. 设置 Direct3D 10回调信号 DXUTSetCallbackD3D10DeviceAcceptable(IsD3D10DeviceAcceptable); DXUTSetCallbackD3D10DeviceCreated(OnD3D10CreateDevice); DXUTSetCallbackD3D10SwapChainResized(OnD3D10ResizedSwapChain); DXUTSetCallbackD3D10FrameRender(Render); DXUTSetCallbackD3D10SwapChainReleasing(OnD3D10ReleasingSwapChain); DXUTSetCallbackD3D10DeviceDestroyed(OnD3D10DestroyDevice); // Set the generic callback functions 设置通用的回调函数 DXUTSetCallbackDeviceChanging(ModifyDeviceSettings); DXUTSetCallbackMsgProc(MsgProc); DXUTSetCallbackFrameMove(Update); // We'll deal with our own cursor in fullscreen mode. DXUTSetCursorSettings(false, false); // Needs to be called before any other NVAPI functions, so before device creation is fine. NvAPI_Initialize(); // ParamTextureManager must be created before the device to give our settings-loading code a chance to fire. gStereoTexMgr = new nv::stereo::ParamTextureManagerD3D10; gScenes.push_back(new StanfordBunnyScene); gActiveScene = 0; InitUI(); // UI用户界面 // Initialize DXUT and create the desired Win32 window and Direct3D device for the application DXUTInit(true, true); // Stereo is a Vista/Win7 feature for Dx9 and Dx10. One of the restrictions is that it only works // in fullscreen mode, but it's useful to debug and place breakpoints in windowed mode. // In any event, there is a button in the sample to toggle to fullscreen if needed, this only // controls the starting state of the app. bool windowed = false; #ifdef _DEBUG windowed = true; #endif DXUTCreateWindow(L"Stereo Issues"); DXUTCreateDevice(windowed); // Start the render loop 开始DXUT主要渲染循环 DXUTMainLoop(); int retval = DXUTGetExitCode(); // Clean everything up DXUTShutdown(retval); // We no longer have an active scene. gActiveScene = cNoActiveScene; // No memory leaks! for (std::vector::iterator it = gScenes.begin(); it != gScenes.end(); ++it) { SAFE_DELETE(*it); } return retval; }
网狐6.6 服务器源代码&共享组件&数据库,包括服务器端所有组件(内核除外,现在市面上还没有6.6内核),共享组件(公共服务,界面控件,界面资源),以及全部数据库文件和脚本文件,6.6较6.5有较大改动,是学习研究的上等程序代码。 结合本人上次发布的客户端组件,即为网狐66系统模块全部源代码!!!官方售价几万,网上有人卖几百到几千不等,本程序绝对6.6新版代码(带道具),识货的下。 总共140M,7个解压包:1~7。 #ifndef KERNEL_ENGINE_HEAD_HEAD_FILE #define KERNEL_ENGINE_HEAD_HEAD_FILE ////////////////////////////////////////////////////////////////////////// //包含文件 #include #include #include #include #include //平台文件 #include "..\..\模板库\Template.h" #include "..\..\公共文件\Constant.h" #include "..\..\公共文件\GlobalDef.h" #include "..\..\共享组件\公共服务\ComService.h" ////////////////////////////////////////////////////////////////////////// //ADO 定义 #import "MSADO15.DLL" rename_namespace("ADOCG") rename("EOF","EndOfFile") using namespace ADOCG; typedef _com_error CComError; //COM 错误 typedef _variant_t CDBVarValue; //数据库数值 ////////////////////////////////////////////////////////////////////////// //导出定义 //导出定义 #ifndef KERNEL_ENGINE_CLASS #ifdef KERNEL_ENGINE_DLL #define KERNEL_ENGINE_CLASS _declspec(dllexport) #else #define KERNEL_ENGINE_CLASS _declspec(dllimport) #endif #endif //模块定义 #ifndef _DEBUG #define KERNEL_ENGINE_DLL_NAME TEXT("KernelEngine.dll") //组件 DLL 名字 #else #define KERNEL_ENGINE_DLL_NAME TEXT("KernelEngineD.dll") //组件 DLL 名字 #endif ////////////////////////////////////////////////////////////////////////// //系统常量 //常量定义 #define TIME_CELL 200 //时间单元 #define TIMES_INFINITY DWORD(-1) //无限次数 #define MAX_ASYNCHRONISM_DATA 8192 //异步数据 ////////////////////////////////////////////////////////////////////////// //网络定义 //连接错误 #define CONNECT_SUCCESS 0 //连接成功 #define CONNECT_FAILURE 1 //连接失败 #define CONNECT_EXCEPTION 2 //参数异常 //关闭原因 #define SHUT_REASON_INSIDE 0 //内部原因 #define SHUT_REASON_NORMAL 1 //正常关闭 #define SHUT_REASON_REMOTE 2 //远程关闭 #define SHUT_REASON_TIME_OUT 3 //网络超时
网狐6.6 服务器源代码&共享组件&数据库,包括服务器端所有组件(内核除外,现在市面上还没有6.6内核),共享组件(公共服务,界面控件,界面资源),以及全部数据库文件和脚本文件,6.6较6.5有较大改动,是学习研究的上等程序代码。 结合本人上次发布的客户端组件,即为网狐66系统模块全部源代码!!!官方售价几万,网上有人卖几百到几千不等,本程序绝对6.6新版代码(带道具),识货的下。 总共140M,7个解压包:1~7。 #ifndef KERNEL_ENGINE_HEAD_HEAD_FILE #define KERNEL_ENGINE_HEAD_HEAD_FILE ////////////////////////////////////////////////////////////////////////// //包含文件 #include #include #include #include #include //平台文件 #include "..\..\模板库\Template.h" #include "..\..\公共文件\Constant.h" #include "..\..\公共文件\GlobalDef.h" #include "..\..\共享组件\公共服务\ComService.h" ////////////////////////////////////////////////////////////////////////// //ADO 定义 #import "MSADO15.DLL" rename_namespace("ADOCG") rename("EOF","EndOfFile") using namespace ADOCG; typedef _com_error CComError; //COM 错误 typedef _variant_t CDBVarValue; //数据库数值 ////////////////////////////////////////////////////////////////////////// //导出定义 //导出定义 #ifndef KERNEL_ENGINE_CLASS #ifdef KERNEL_ENGINE_DLL #define KERNEL_ENGINE_CLASS _declspec(dllexport) #else #define KERNEL_ENGINE_CLASS _declspec(dllimport) #endif #endif //模块定义 #ifndef _DEBUG #define KERNEL_ENGINE_DLL_NAME TEXT("KernelEngine.dll") //组件 DLL 名字 #else #define KERNEL_ENGINE_DLL_NAME TEXT("KernelEngineD.dll") //组件 DLL 名字 #endif ////////////////////////////////////////////////////////////////////////// //系统常量 //常量定义 #define TIME_CELL 200 //时间单元 #define TIMES_INFINITY DWORD(-1) //无限次数 #define MAX_ASYNCHRONISM_DATA 8192 //异步数据 ////////////////////////////////////////////////////////////////////////// //网络定义 //连接错误 #define CONNECT_SUCCESS 0 //连接成功 #define CONNECT_FAILURE 1 //连接失败 #define CONNECT_EXCEPTION 2 //参数异常 //关闭原因 #define SHUT_REASON_INSIDE 0 //内部原因 #define SHUT_REASON_NORMAL 1 //正常关闭 #define SHUT_REASON_REMOTE 2 //远程关闭 #define SHUT_REASON_TIME_OUT 3 //网络超时
网狐6.6 服务器源代码&共享组件&数据库,包括服务器端所有组件(内核除外,现在市面上还没有6.6内核),共享组件(公共服务,界面控件,界面资源),以及全部数据库文件和脚本文件,6.6较6.5有较大改动,是学习研究的上等程序代码。 结合本人上次发布的客户端组件,即为网狐66系统模块全部源代码!!!官方售价几万,网上有人卖几百到几千不等,本程序绝对6.6新版代码(带道具),识货的下。 总共140M,7个解压包:1~7。 #ifndef KERNEL_ENGINE_HEAD_HEAD_FILE #define KERNEL_ENGINE_HEAD_HEAD_FILE ////////////////////////////////////////////////////////////////////////// //包含文件 #include #include #include #include #include //平台文件 #include "..\..\模板库\Template.h" #include "..\..\公共文件\Constant.h" #include "..\..\公共文件\GlobalDef.h" #include "..\..\共享组件\公共服务\ComService.h" ////////////////////////////////////////////////////////////////////////// //ADO 定义 #import "MSADO15.DLL" rename_namespace("ADOCG") rename("EOF","EndOfFile") using namespace ADOCG; typedef _com_error CComError; //COM 错误 typedef _variant_t CDBVarValue; //数据库数值 ////////////////////////////////////////////////////////////////////////// //导出定义 //导出定义 #ifndef KERNEL_ENGINE_CLASS #ifdef KERNEL_ENGINE_DLL #define KERNEL_ENGINE_CLASS _declspec(dllexport) #else #define KERNEL_ENGINE_CLASS _declspec(dllimport) #endif #endif //模块定义 #ifndef _DEBUG #define KERNEL_ENGINE_DLL_NAME TEXT("KernelEngine.dll") //组件 DLL 名字 #else #define KERNEL_ENGINE_DLL_NAME TEXT("KernelEngineD.dll") //组件 DLL 名字 #endif ////////////////////////////////////////////////////////////////////////// //系统常量 //常量定义 #define TIME_CELL 200 //时间单元 #define TIMES_INFINITY DWORD(-1) //无限次数 #define MAX_ASYNCHRONISM_DATA 8192 //异步数据 ////////////////////////////////////////////////////////////////////////// //网络定义 //连接错误 #define CONNECT_SUCCESS 0 //连接成功 #define CONNECT_FAILURE 1 //连接失败 #define CONNECT_EXCEPTION 2 //参数异常 //关闭原因 #define SHUT_REASON_INSIDE 0 //内部原因 #define SHUT_REASON_NORMAL 1 //正常关闭 #define SHUT_REASON_REMOTE 2 //远程关闭 #define SHUT_REASON_TIME_OUT 3 //网络超时
网狐6.6 服务器源代码&共享组件&数据库,包括服务器端所有组件(内核除外,现在市面上还没有6.6内核),共享组件(公共服务,界面控件,界面资源),以及全部数据库文件和脚本文件,6.6较6.5有较大改动,是学习研究的上等程序代码。 结合本人上次发布的客户端组件,即为网狐66系统模块全部源代码!!!官方售价几万,网上有人卖几百到几千不等,本程序绝对6.6新版代码(带道具),识货的下。 总共140M,7个解压包:1~7。 #ifndef KERNEL_ENGINE_HEAD_HEAD_FILE #define KERNEL_ENGINE_HEAD_HEAD_FILE ////////////////////////////////////////////////////////////////////////// //包含文件 #include #include #include #include #include //平台文件 #include "..\..\模板库\Template.h" #include "..\..\公共文件\Constant.h" #include "..\..\公共文件\GlobalDef.h" #include "..\..\共享组件\公共服务\ComService.h" ////////////////////////////////////////////////////////////////////////// //ADO 定义 #import "MSADO15.DLL" rename_namespace("ADOCG") rename("EOF","EndOfFile") using namespace ADOCG; typedef _com_error CComError; //COM 错误 typedef _variant_t CDBVarValue; //数据库数值 ////////////////////////////////////////////////////////////////////////// //导出定义 //导出定义 #ifndef KERNEL_ENGINE_CLASS #ifdef KERNEL_ENGINE_DLL #define KERNEL_ENGINE_CLASS _declspec(dllexport) #else #define KERNEL_ENGINE_CLASS _declspec(dllimport) #endif #endif //模块定义 #ifndef _DEBUG #define KERNEL_ENGINE_DLL_NAME TEXT("KernelEngine.dll") //组件 DLL 名字 #else #define KERNEL_ENGINE_DLL_NAME TEXT("KernelEngineD.dll") //组件 DLL 名字 #endif ////////////////////////////////////////////////////////////////////////// //系统常量 //常量定义 #define TIME_CELL 200 //时间单元 #define TIMES_INFINITY DWORD(-1) //无限次数 #define MAX_ASYNCHRONISM_DATA 8192 //异步数据 ////////////////////////////////////////////////////////////////////////// //网络定义 //连接错误 #define CONNECT_SUCCESS 0 //连接成功 #define CONNECT_FAILURE 1 //连接失败 #define CONNECT_EXCEPTION 2 //参数异常 //关闭原因 #define SHUT_REASON_INSIDE 0 //内部原因 #define SHUT_REASON_NORMAL 1 //正常关闭 #define SHUT_REASON_REMOTE 2 //远程关闭 #define SHUT_REASON_TIME_OUT 3 //网络超时

16,472

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC相关问题讨论
社区管理员
  • 基础类社区
  • Web++
  • encoderlee
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

        VC/MFC社区版块或许是CSDN最“古老”的版块了,记忆之中,与CSDN的年龄几乎差不多。随着时间的推移,MFC技术渐渐的偏离了开发主流,若干年之后的今天,当我们面对着微软的这个经典之笔,内心充满着敬意,那些曾经的记忆,可以说代表着二十年前曾经的辉煌……
        向经典致敬,或许是老一代程序员内心里面难以释怀的感受。互联网大行其道的今天,我们期待着MFC技术能够恢复其曾经的辉煌,或许这个期待会永远成为一种“梦想”,或许一切皆有可能……
        我们希望这个版块可以很好的适配Web时代,期待更好的互联网技术能够使得MFC技术框架得以重现活力,……

试试用AI创作助手写篇文章吧