以下代码,帮我转换一下。。。。 ( 积分: 100 )

  • 主题发起人 主题发起人 sbzldlb
  • 开始时间 开始时间
S

sbzldlb

Unregistered / Unconfirmed
GUEST, unregistred user!
** WINVER values in this file:
** WINVER < 0x400 = Windows NT 3.5, Windows NT 3.51
** WINVER = 0x400 = Windows 95, Windows NT SUR (default)
** WINVER > 0x400 = Windows NT SUR enhancements

#if (WINVER >= 0x400)
#define RAS_MaxEntryName 256
#define RAS_MaxDeviceName 128
#define RAS_MaxCallbackNumber RAS_MaxPhoneNumber
#else
#define RAS_MaxEntryName 20
#define RAS_MaxDeviceName 32
#define RAS_MaxCallbackNumber 48
#endif
 
const
RAS_MaxPhoneNumber = 60; //这个是我随便写的
{$IFDEF WIN32}
RAS_MaxEntryName = 256;
RAS_MaxDeviceName = 128;
RAS_MaxCallbackNumber = RAS_MaxPhoneNumber;
{$ELSE}
RAS_MaxEntryName = 256;
RAS_MaxDeviceName = 128;
RAS_MaxCallbackNumber = 48
{$ENDIF}
 
楼上的兄弟,如果我想判断 win32 是 98 2000 xp 呢?
 
楼主需要的莫非是
http://www.delphibbs.com/delphibbs/dispq.asp?lid=3633513
 
Unit1.INC

// WINVER < 0x400 = Windows NT 3.5, Windows NT 3.51
// WINVER = 0x400 = Windows 95, Windows98, Windows NT4 (default)
// WINVER > 0x400 = Windows NT4 enhancements
// WINVER = 0x500 = Windows 2000

{$DEFINE WINVER_0x400_OR_GREATER}
{.$DEFINE WINVER_0x401_OR_GREATER}
{.$DEFINE WINVER_0x500_OR_GREATER}

-------------------------------------------------------------
Unit1.pas

unit Unit1;

{$I Unit1.INC}

interface

uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs;

type
TForm1 = class(TForm)
private
{ Private declarations }
public
{ Public declarations }
end;

var
Form1: TForm1;

const
RAS_MaxPhoneNumber = 60;
{$IFDEF WINVER_0x400_OR_GREATER}
RAS_MaxEntryName = 256;
RAS_MaxDeviceName = 128;
RAS_MaxCallbackNumber = RAS_MaxPhoneNumber;
{$ELSE}
RAS_MaxEntryName = 256;
RAS_MaxDeviceName = 128;
RAS_MaxCallbackNumber = 48
{$ENDIF}

implementation

{$R *.dfm}

end.
 
// WINVER < 0x400 = Windows NT 3.5, Windows NT 3.51
// WINVER = 0x400 = Windows 95, Windows98, Windows NT4 (default)
// WINVER > 0x400 = Windows NT4 enhancements
// WINVER = 0x500 = Windows 2000

{$DEFINE WINVER_0x400_OR_GREATER}
{.$DEFINE WINVER_0x401_OR_GREATER}
{.$DEFINE WINVER_0x500_OR_GREATER}

这些有什么用途啊,不是很明白哦
现在我的系统是2000 但是
(*RASAPI*) {$IFDEF WINVER_0x500_OR_GREATER}
(*RASAPI*) RASEO_RequireEAP = $00020000;
(*RASAPI*) RASEO_RequirePAP = $00040000;
(*RASAPI*) RASEO_RequireSPAP = $00080000;
(*RASAPI*) RASEO_Custom = $00100000;
(*RASAPI*) RASEO_PreviewPhoneNumber = $00200000;
(*RASAPI*) RASEO_SharedPhoneNumbers = $00800000;
(*RASAPI*) RASEO_PreviewUserPw = $01000000;
(*RASAPI*) RASEO_PreviewDomain = $02000000;
(*RASAPI*) RASEO_ShowDialingProgress = $04000000;
(*RASAPI*) RASEO_RequireCHAP = $08000000;
(*RASAPI*) RASEO_RequireMsCHAP = $10000000;
(*RASAPI*) RASEO_RequireMsCHAP2 = $20000000;
(*RASAPI*) RASEO_RequireW95MSCHAP = $40000000;
(*RASAPI*) RASEO_CustomScript = $80000000;
(*RASAPI*) {$ENDIF}
用不了
这是为什么呢?
 
根据操作系统的版本信息定义的一些属性值
 
多人接受答案了。
 
后退
顶部