|
|
Question | Answer |
---|---|
How can I make a Windows-style message box, with OK and Cancel buttons, from SAS Software? | This code has been tested under
WinNT 3.51 and 4.0 and
Win2000 only!
First create a flat file, e.g. C:\WINAPI.TXT, to store the following lines of code: routine MessageBoxA module=USER32 returns=SHORT stackpop=CALLED minarg=4 maxarg=4 ; arg 1 input format=pib4. byvalue; arg 2 input format=$cstr200.; arg 3 input format=$cstr200.; arg 4 input format=pib4. byvalue; This flat file needs to be given a fileref of SASCBTBL, and the message box is created using the MessageBox function: filename sascbtbl 'c:\winapi.txt'; data _null_; length rc hWnd style 8 text caption $200; hWnd=0; text='Text'; caption='Caption'; style=(0*4096)+(0*256)+(2*16)+(1*1); * 0021 = Question mark icon + OK/Cancel *; rc=modulen('*e','MessageBoxA',hWnd,text,caption,style); if (rc=0) then put 'ERROR: Cannot create message box'; put rc=; run; The button style values are:
|
How can I find out the version and build level of Windows NT being used from SAS Software? | This code has been tested under
WinNT 3.51 and 4.0 and
Win2000 only!
First create a flat file, e.g. C:\WINAPI.TXT, to store the following lines of code: routine GetVersion module=KERNEL32 returns=ULONG stackpop=CALLED minarg=0 maxarg=0 ; This flat file needs to be given a fileref of SASCBTBL, and the message box is created using the GetVersion function: filename sascbtbl 'c:\winapi.txt'; data _null_; length temp 8 build $4 winver $5; rc=modulen('*e','GetVersion'); temp=rc; build=' '; winver=' . '; substr(winver,1,2)=put(mod(temp,256),2.); temp=int(temp/256); substr(winver,4,2)=put(mod(temp,256),z2.); temp=int(temp/256); build=put(temp,4.); put winver= build=; run; |
Number of visitors = | (since 15th May 2000) |