machine_adxrxss.rar

  • balrvc
    了解作者
  • Unix_Linux
    开发工具
  • 3KB
    文件大小
  • rar
    文件格式
  • 0
    收藏次数
  • 1 积分
    下载积分
  • 0
    下载次数
  • 2019-05-24 04:24
    上传日期
ComCtl32Ver 这个代码可以返回当前机子中的网卡的以太网地址
machine_adxrxss.rar
  • YResource
  • ComCtl32Ver.rc
    1.9KB
  • ComCtl32Ver.ico
    766B
  • Resource.h
    551B
  • VC5Workspace
  • ComCtl32Ver.dsw
    547B
  • ComCtl32Ver.dsp
    3.8KB
  • e2ComCtl32Ver.c
    3.4KB
内容介绍
// ComCtl32Ver.c : Implementation File // Get Common Control version information. // Mark J. Finocchio (markfi), Microsoft Corporation // THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF // ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A // PARTICULAR PURPOSE. // // Copyright 1994-1996 Microsoft Corporation. All Rights Reserved. // Included files #include <windows.h> #include <winuser.h> #include "Resource\Resource.h" // Typedefs typedef struct _DllVersionInfo { DWORD cbSize; DWORD dwMajorVersion; DWORD dwMinorVersion; DWORD dwBuildNumber; DWORD dwPlatformID; } DLLVERSIONINFO; typedef HRESULT (CALLBACK* DLLGETVERSIONPROC)(DLLVERSIONINFO *); // Function prototypes HRESULT GetComCtlVersion(LPDWORD pdwMajor,LPDWORD pdwMinor); // Main function int WINAPI WinMain(HINSTANCE hInstance,HINSTANCE hPrevInstance,PSTR szCmdLine,int iCmdShow) { DWORD dwMajor; DWORD dwMinor; TCHAR szVer[31]; TCHAR szDisp[81]; // Get common control version GetComCtlVersion(&dwMajor,&dwMinor); wsprintf(szVer,"COMCTL32 Version %d.%d\n",dwMajor,dwMinor); wsprintf(szDisp,"%s\nUnknown distribution method",szVer); switch(dwMajor) { case 4: switch(dwMinor) { case 0: wsprintf(szDisp,"%s\nDistributed via Microsoft Windows 95/Windows NT 4.0",szVer); break; case 70: wsprintf(szDisp,"%s\nDistributed via Microsoft Internet Explorer 3.x",szVer); break; case 71: wsprintf(szDisp,"%s\nDistributed via Microsoft Internet Explorer 4.0",szVer); break; case 72: wsprintf(szDisp,"%s\nDistributed via Microsoft Internet Explorer 4.01/Windows 98",szVer); break; } break; case 5: switch(dwMinor) { case 0: wsprintf(szDisp,"%s\nDistributed via Microsoft Windows NT 5.0",szVer); break; } break; } // Output version information return MessageBox(NULL,szDisp,"Common Control 32 Version",MB_OK|MB_ICONINFORMATION); } // Name: GetComCtlVersion // Description: Retrieves COMCTL32.DLL version information // Parameters: Pointer to major number, pointer to minor number // Returns: E_INVALIDARG or E_FAIL on error, S_OK on success HRESULT GetComCtlVersion(LPDWORD pdwMajor, LPDWORD pdwMinor) { HINSTANCE hComCtl; if(IsBadWritePtr(pdwMajor,sizeof(DWORD)) || IsBadWritePtr(pdwMinor,sizeof(DWORD))) return E_INVALIDARG; // load the DLL hComCtl = LoadLibrary(TEXT("comctl32.dll")); if(hComCtl) { HRESULT hr = S_OK; DLLGETVERSIONPROC pDllGetVersion; // You must get this function explicitly because earlier versions of the DLL // don't implement this function. That makes the lack of implementation of the // function a version marker in itself. pDllGetVersion = (DLLGETVERSIONPROC)GetProcAddress(hComCtl,TEXT("DllGetVersion")); if(pDllGetVersion) { DLLVERSIONINFO dvi; ZeroMemory(&dvi,sizeof(dvi)); dvi.cbSize = sizeof(dvi); hr = (*pDllGetVersion)(&dvi); if(SUCCEEDED(hr)) { *pdwMajor = dvi.dwMajorVersion; *pdwMinor = dvi.dwMinorVersion; } else hr = E_FAIL; } else { // If GetProcAddress failed, then the DLL is a version previous to the one shipped with IE 3.x. *pdwMajor = 4; *pdwMinor = 0; } FreeLibrary(hComCtl); return hr; } return E_FAIL; }
评论
    相关推荐
    • xest.rar
      IOCP测试的例子,不可多得的例子,在visual2005下测试通过
    • base.rar
      C_#数字图像处理算法典型实例源代码,可以下载写写
    • 4679057.rar
      Prototype mode 速度最快的运动检测代码,效果不比C++差
    • ZWTL.rar
      POSIX线程使用Semaphore的通用代码,完美代码
    • schama.rar
      ing工具代码,选择IP地址,发送请求,得到响应
    • 18747679.rar
      Flat Scroll Bar 这个代码可以返回当前机子中的网卡的以太网地址
    • hxjpn.rar
      C#设计模式,桥接模式代码工程下载,很好的源码
    • cdde.rar
      c#做的一个xp_2K下的门禁代码,比如是机房管理系统,学习交流!,
    • the.rar
      C#代码生成器,生成调用SQL存储过程的代码,不错
    • 3DES加密算法源代码.rar
      DES加密源代码,用3DES加密算法。 加密强度高,到目前为止,还无人能够破解!