Changeset 127

Show
Ignore:
Timestamp:
05/26/06 16:16:57 (6 years ago)
Author:
Don Clugston
Message:

* MAJOR CHANGE: Added a pragma(lib) to all files containing static functions. This should eliminate the need for users to specify Windows libraries, and will deprecate the concept of 'default libraries'. (But it might mean some existing programs will fail to link, because some libraries are currently missing from DMD).
* Added sqlucode.
* Marked win16 NetXXX functions as deprecated. We should consider removing those files from lm.d

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/win32/aclapi.d

    r104 r127  
    1010\***********************************************************************/ 
    1111module win32.aclapi; 
     12pragma(lib, "advapi32.lib"); 
    1213 
    1314import win32.windows, win32.accctrl; 
  • trunk/win32/aclui.d

    r106 r127  
    1010\***********************************************************************/ 
    1111module win32.aclui; 
     12pragma(lib, "aclui.lib"); 
    1213 
    1314import win32.objbase, win32.commctrl, win32.accctrl; 
  • trunk/win32/all.d

    r126 r127  
    3434import win32.sql; 
    3535import win32.sqlext; 
     36import win32.sqlucode; 
  • trunk/win32/commctrl.d

    r123 r127  
    1010\***********************************************************************/ 
    1111module win32.commctrl; 
     12pragma(lib, "comctl32.lib"); 
    1213 
    1314private import win32.w32api; 
  • trunk/win32/commdlg.d

    r91 r127  
    1010 
    1111module win32.commdlg; 
     12pragma(lib, "comdlg32.lib"); 
    1213 
    1314private import win32.w32api; 
  • trunk/win32/dde.d

    r36 r127  
    1010\***********************************************************************/ 
    1111module win32.dde; 
     12pragma(lib, "user32.lib"); 
    1213 
    1314private import win32.windef; 
  • trunk/win32/ddeml.d

    r43 r127  
    1010\***********************************************************************/ 
    1111module win32.ddeml; 
     12pragma(lib, "user32.lib"); 
    1213 
    1314private import win32.winnt, win32.windef, win32.basetsd; 
  • trunk/win32/imm.d

    r99 r127  
    1010 
    1111module win32.imm; 
     12pragma(lib, "imm32.lib"); 
    1213 
    1314private import win32.w32api; 
  • trunk/win32/lm.d

    r121 r127  
    2323import win32.lmalert; 
    2424import win32.lmat; 
    25 import win32.lmaudit; 
    26 import win32.lmchdev; 
    27 import win32.lmconfig; 
    2825import win32.lmerr; 
    2926import win32.lmmsg; 
     
    3330import win32.lmrepl; 
    3431import win32.lmuse; 
    35 import win32.lmerrlog; 
    36 import win32.lmsvc; 
    37 import win32.lmsname; // in MinGW, this was publicly included by lm.lmsvc 
    3832 
    3933version (WIN32_WINNT_ONLY) { 
     
    4236} 
    4337import win32.lmstats; 
     38 
     39// FIXME: Everything in these next files seems to be deprecated! 
     40import win32.lmaudit; 
     41import win32.lmchdev; // can't find many docs for functions from this file. 
     42import win32.lmconfig; 
     43import win32.lmerrlog; 
     44import win32.lmsvc; 
     45import win32.lmsname; // in MinGW, this was publicly included by lm.lmsvc 
  • trunk/win32/lmaccess.d

    r120 r127  
    1515 
    1616module win32.lmaccess; 
     17pragma(lib, "netapi32.lib"); 
    1718private import win32.windef; 
    1819private import win32.lmcons; 
  • trunk/win32/lmalert.d

    r123 r127  
    99\***********************************************************************/ 
    1010module win32.lmalert; 
     11pragma(lib, "netapi32.lib"); 
    1112private import win32.lmcons; 
    1213private import win32.windef; 
  • trunk/win32/lmapibuf.d

    r123 r127  
    99\***********************************************************************/ 
    1010module win32.lmapibuf; 
     11pragma(lib, "netapi32.lib"); 
    1112private import win32.windef; 
    1213private import win32.lmcons; 
  • trunk/win32/lmat.d

    r123 r127  
    99\***********************************************************************/ 
    1010module win32.lmat; 
     11pragma(lib, "netapi32.lib"); 
    1112private import win32.lmcons; 
    1213private import win32.windef; 
  • trunk/win32/lmaudit.d

    r120 r127  
    88*                       Placed into public domain                       * 
    99\***********************************************************************/ 
     10// COMMENT: This file may be deprecated. 
    1011module win32.lmaudit; 
    1112private import win32.lmcons; 
     
    265266 
    266267extern (Windows) { 
     268deprecated { 
    267269NET_API_STATUS NetAuditClear(LPCWSTR,LPCWSTR,LPCWSTR); 
    268270NET_API_STATUS NetAuditRead(LPTSTR,LPTSTR,LPHLOG,DWORD,PDWORD,DWORD,DWORD,PBYTE*,DWORD,PDWORD,PDWORD); 
    269271NET_API_STATUS NetAuditWrite(DWORD,PBYTE,DWORD,LPTSTR,PBYTE); 
     272} 
    270273} 
    271274 
  • trunk/win32/lmchdev.d

    r117 r127  
    88*                       Placed into public domain                       * 
    99\***********************************************************************/ 
     10 
     11// COMMENT: This file might be deprecated. 
    1012module win32.lmchdev; 
    1113private import win32.lmcons; 
  • trunk/win32/lmconfig.d

    r123 r127  
    88*                       Placed into public domain                       * 
    99\***********************************************************************/ 
     10// All functions in this file are deprecated! 
    1011module win32.lmconfig; 
    1112private import win32.windef; 
    1213private import win32.lmcons; 
     14 
     15deprecated { 
    1316 
    1417struct CONFIG_INFO_0 { 
     
    2427      PBYTE, DWORD); 
    2528} 
     29} 
  • trunk/win32/lmerrlog.d

    r117 r127  
    88*                       Placed into public domain                       * 
    99\***********************************************************************/ 
     10// COMMENT: This appears to be only for Win16. All functions are deprecated. 
    1011module win32.lmerrlog; 
    1112private import win32.lmcons; 
     
    211212 
    212213extern (Windows) { 
     214deprecated { 
    213215NET_API_STATUS NetErrorLogClear(LPCWSTR,LPCWSTR,LPBYTE); 
    214216NET_API_STATUS NetErrorLogRead(LPCWSTR,LPWSTR,LPHLOG,DWORD,LPDWORD,DWORD,DWORD,LPBYTE*,DWORD,LPDWORD,LPDWORD); 
    215217NET_API_STATUS NetErrorLogWrite(LPBYTE,DWORD,LPCWSTR,LPBYTE,DWORD,LPBYTE,DWORD,LPBYTE); 
    216218} 
     219} 
  • trunk/win32/lmmsg.d

    r123 r127  
    99\***********************************************************************/ 
    1010module win32.lmmsg; 
     11pragma(lib, "netapi32.lib"); 
    1112private import win32.lmcons; 
    1213private import win32.windef; 
     14 
     15// NOTE: Requires Windows XP or later 
    1316 
    1417const MSGNAME_NOT_FORWARDED  = 0; 
  • trunk/win32/lmremutl.d

    r123 r127  
    1010// D Conversion Note: DESC_CHAR is defined as TCHAR. 
    1111module win32.lmremutl; 
     12pragma(lib, "netapi32.lib"); 
    1213private import win32.lmcons; 
    1314private import win32.windef; 
  • trunk/win32/lmrepl.d

    r117 r127  
    99\***********************************************************************/ 
    1010module win32.lmrepl; 
     11pragma(lib, "netapi32.lib"); 
    1112private import win32.lmcons; 
    1213private import win32.windef; 
  • trunk/win32/lmshare.d

    r121 r127  
    1212private import win32.windef; 
    1313 
    14 /* 
     14 
    1515private import win32.w32api; 
    1616static if (_WIN32_WINNT_ONLY) { 
    17     pragma(lib, "Netapi.lib"); 
    18 } else { 
     17    pragma(lib, "netapi.lib"); 
     18
     19/* else { 
    1920// only for WinME, 98, 95. 
    2021    pragma(lib, "svrapi.lib") 
  • trunk/win32/lmstats.d

    r120 r127  
    99\***********************************************************************/ 
    1010module win32.lmstats; 
     11pragma(lib, "netapi32.lib"); 
    1112private import win32.lmcons; 
    1213private import win32.windef; 
  • trunk/win32/lmsvc.d

    r120 r127  
    88*                       Placed into public domain                       * 
    99\***********************************************************************/ 
     10// FIXME: Is this file deprecated? All of the functions are only for Win16. 
    1011/** 
    1112  Changes relative to MinGW: 
     
    140141 
    141142extern (Windows) { 
     143deprecated { 
    142144NET_API_STATUS NetServiceControl(LPCWSTR,LPCWSTR,DWORD,DWORD,PBYTE*); 
    143145NET_API_STATUS NetServiceEnum(LPCWSTR,DWORD,PBYTE*,DWORD,PDWORD,PDWORD,PDWORD); 
    144146NET_API_STATUS NetServiceGetInfo(LPCWSTR,LPCWSTR,DWORD,PBYTE*); 
    145147NET_API_STATUS NetServiceInstall(LPCWSTR,LPCWSTR,DWORD,LPCWSTR*,PBYTE*); 
     148} 
    146149} 
    147150//MACRO #define SERVICE_IP_CODE(t,n) ((long)SERVICE_IP_QUERY_HINT|(long)(n|(t<<SERVICE_IP_WAITTIME_SHIFT))) 
  • trunk/win32/lmuse.d

    r123 r127  
     1/***********************************************************************\ 
     2*                                lmuse.d                                * 
     3*                                                                       * 
     4*                       Windows API header module                       * 
     5*                                                                       * 
     6*                 Translated from MinGW Windows headers                 * 
     7*                                                                       * 
     8*                       Placed into public domain                       * 
     9\***********************************************************************/ 
    110module win32.lmuse; 
     11pragma(lib, "netapi32.lib"); 
    212import win32.lmuseflg; 
    313private import win32.lmcons; 
  • trunk/win32/lmwksta.d

    r121 r127  
    99\***********************************************************************/ 
    1010module win32.lmwksta; 
     11pragma(lib, "netapi32.lib"); 
    1112private import win32.lmcons; 
    1213import win32.lmuseflg; 
  • trunk/win32/lzexpand.d

    r85 r127  
    99\***********************************************************************/ 
    1010module win32.lzexpand; 
    11  
    12 import win32.windef; 
    13 import win32.winbase; 
     11pragma(lib, "lz32.lib"); 
     12private import win32.windef; 
     13private import win32.winbase; 
    1414 
    1515enum : LONG { 
  • trunk/win32/mmsystem.d

    r99 r127  
    1313 
    1414module win32.mmsystem; 
     15pragma(lib, "winmm.lib"); 
    1516private import win32.w32api; 
    16 import win32.winver; 
    17 import win32.windef; 
     17private import win32.winver; 
     18private import win32.windef; 
    1819 
    1920align(1): 
  • trunk/win32/oaidl.d

    r123 r127  
    88*                       Placed into public domain                       * 
    99\***********************************************************************/ 
    10 // TODO: Sort out LPCREATETYPEINFO etc. 
    11  
    1210module win32.oaidl; 
    1311 
  • trunk/win32/objbase.d

    r123 r127  
    99\***********************************************************************/ 
    1010module win32.objbase; 
     11pragma(lib, "ole32.lib"); 
    1112private import win32.winbase; 
    1213private import win32.basetyps; 
  • trunk/win32/ole2.d

    r108 r127  
    99\***********************************************************************/ 
    1010module win32.ole2; 
    11  
     11pragma(lib, "ole32.lib"); 
    1212import win32.winerror; 
    1313import win32.objbase; 
  • trunk/win32/oleacc.d

    r101 r127  
    1010 
    1111module win32.oleacc; 
     12pragma(lib, "oleacc.lib"); 
    1213private import win32.oaidl; 
    1314private import win32.wtypes; 
  • trunk/win32/oleauto.d

    r120 r127  
    1010 
    1111module win32.oleauto; 
    12  
     12pragma(lib, "oleaut32.lib"); 
    1313import win32.oaidl; 
    1414private import win32.wtypes; 
  • trunk/win32/prsht.d

    r68 r127  
    1010\***********************************************************************/ 
    1111module win32.prsht; 
    12  
     12pragma(lib, "comctl32.lib"); 
    1313private import win32.w32api; 
    1414private import win32.windef;  
  • trunk/win32/richedit.d

    r114 r127  
    1515 
    1616version(Unicode) { 
    17     const wchar [] RICHEDIT_CLASS= "RichEdit20W"; 
     17    const wchar [] RICHEDIT_CLASS = "RichEdit20W"; 
    1818} else { 
    19     const char [] RICHEDIT_CLASS="RichEdit20A"; 
    20 } 
    21  
    22 const RICHEDIT_CLASS10A="RICHEDIT"; 
     19    const char [] RICHEDIT_CLASS  = "RichEdit20A"; 
     20} 
     21 
     22const RICHEDIT_CLASS10A = "RICHEDIT"; 
    2323 
    2424const TCHAR [] 
    25     CF_RTF = "Rich Text Format", 
     25    CF_RTF       = "Rich Text Format", 
    2626    CF_RTFNOOBJS = "Rich Text Format Without Objects", 
    2727    CF_RETEXTOBJ = "RichEdit Text and Objects"; 
    2828 
    29 const CFM_BOLD=1; 
    30 const CFM_ITALIC=2; 
    31 const CFM_UNDERLINE=4; 
    32 const CFM_STRIKEOUT=8; 
    33 const CFM_PROTECTED=16; 
    34 const CFM_LINK=32; 
    35 const CFM_SIZE=0x80000000; 
    36 const CFM_COLOR=0x40000000; 
    37 const CFM_FACE=0x20000000; 
    38 const CFM_OFFSET=0x10000000; 
    39 const CFM_CHARSET=0x08000000; 
    40 const CFM_SUBSCRIPT=0x00030000; 
    41 const CFM_SUPERSCRIPT=0x00030000; 
    42 const CFE_BOLD=1; 
    43 const CFE_ITALIC=2; 
    44 const CFE_UNDERLINE=4; 
    45 const CFE_STRIKEOUT=8; 
    46 const CFE_PROTECTED=16; 
    47 const CFE_AUTOCOLOR=0x40000000; 
    48 const CFE_SUBSCRIPT=0x00010000; 
    49 const CFE_SUPERSCRIPT=0x00020000; 
     29const DWORD  
     30    CFM_BOLD        = 1, 
     31    CFM_ITALIC      = 2, 
     32    CFM_UNDERLINE   = 4, 
     33    CFM_STRIKEOUT   = 8, 
     34    CFM_PROTECTED   = 16, 
     35    CFM_LINK        = 32, 
     36    CFM_SIZE        = 0x80000000, 
     37    CFM_COLOR       = 0x40000000, 
     38    CFM_FACE        = 0x20000000, 
     39    CFM_OFFSET      = 0x10000000, 
     40    CFM_CHARSET     = 0x08000000, 
     41    CFM_SUBSCRIPT   = 0x00030000, 
     42    CFM_SUPERSCRIPT = 0x00030000; 
     43 
     44const DWORD 
     45    CFE_BOLD        = 1, 
     46    CFE_ITALIC      = 2, 
     47    CFE_UNDERLINE   = 4, 
     48    CFE_STRIKEOUT   = 8, 
     49    CFE_PROTECTED   = 16, 
     50    CFE_SUBSCRIPT   = 0x00010000, 
     51    CFE_SUPERSCRIPT = 0x00020000, 
     52    CFE_AUTOCOLOR   = 0x40000000; 
     53     
    5054const CFM_EFFECTS = CFM_BOLD | CFM_ITALIC | CFM_UNDERLINE | CFM_COLOR | CFM_STRIKEOUT | CFE_PROTECTED | CFM_LINK; 
    5155 
    52 const IMF_FORCENONE=1; 
    53 const IMF_FORCEENABLE=2; 
    54 const IMF_FORCEDISABLE=4; 
    55 const IMF_CLOSESTATUSWINDOW=8; 
    56 const IMF_VERTICAL=32; 
    57 const IMF_FORCEACTIVE=64; 
    58 const IMF_FORCEINACTIVE=128; 
    59 const IMF_FORCEREMEMBER=256; 
     56// flags for EM_SETIMEOPTIONS  
     57const LPARAM 
     58    IMF_FORCENONE         = 1, 
     59    IMF_FORCEENABLE       = 2, 
     60    IMF_FORCEDISABLE      = 4, 
     61    IMF_CLOSESTATUSWINDOW = 8, 
     62    IMF_VERTICAL          = 32, 
     63    IMF_FORCEACTIVE       = 64, 
     64    IMF_FORCEINACTIVE     = 128, 
     65    IMF_FORCEREMEMBER     = 256; 
    6066 
    6167const SEL_EMPTY=0; 
  • trunk/win32/rpc.d

    r99 r127  
    1212typedef void *I_RPC_HANDLE; 
    1313alias long RPC_STATUS; 
     14// Moved to rpcdce: 
     15RpcImpersonateClient 
     16RpcRevertToSelf 
     17 
    1418*/ 
    1519 
     
    2832 
    2933extern (Windows) { 
    30 RPC_STATUS RpcImpersonateClient(RPC_BINDING_HANDLE); 
    31 RPC_STATUS RpcRevertToSelf(); 
    3234int I_RpcMapWin32Status(RPC_STATUS); 
    3335} 
  • trunk/win32/rpcdce.d

    r123 r127  
    1111 
    1212module win32.rpcdce; 
    13 import win32.basetyps; 
     13pragma(lib, "Rpcrt4.lib"); 
     14private import win32.basetyps; 
    1415private import win32.w32api; 
    15  
    1616public import win32.rpcdcep; 
    1717 
     
    2222 
    2323alias void RPC_MGR_EPV; 
    24 const RPC_C_BINDING_INFINITE_TIMEOUT=10; 
    25 const RPC_C_BINDING_MIN_TIMEOUT=0; 
    26 const RPC_C_BINDING_DEFAULT_TIMEOUT=5; 
    27 const RPC_C_BINDING_MAX_TIMEOUT=9; 
     24// for RpcMgmtSetComTimeout() 
     25enum : uint { 
     26    RPC_C_BINDING_MIN_TIMEOUT      = 0, 
     27    RPC_C_BINDING_DEFAULT_TIMEOUT  = 5, 
     28    RPC_C_BINDING_MAX_TIMEOUT      = 9, 
     29    RPC_C_BINDING_INFINITE_TIMEOUT = 10 
     30
     31 
    2832const RPC_C_CANCEL_INFINITE_TIMEOUT= -1; 
    2933const RPC_C_LISTEN_MAX_CALLS_DEFAULT=1234; 
     
    3236const RPC_C_USE_INTERNET_PORT=1; 
    3337const RPC_C_USE_INTRANET_PORT=2; 
    34 const RPC_C_STATS_CALLS_IN=0; 
    35 const RPC_C_STATS_CALLS_OUT=1; 
    36 const RPC_C_STATS_PKTS_IN=2; 
    37 const RPC_C_STATS_PKTS_OUT=3; 
     38 
     39// for RPC_STATS_VECTOR, used by RpcMgmyInqStats 
     40enum : uint { 
     41    RPC_C_STATS_CALLS_IN  = 0, 
     42    RPC_C_STATS_CALLS_OUT, 
     43    RPC_C_STATS_PKTS_IN, 
     44    RPC_C_STATS_PKTS_OUT 
     45
     46 
    3847const RPC_IF_AUTOLISTEN=0x0001; 
    3948const RPC_IF_OLE=2; 
     
    4352const RPC_C_MGMT_IS_SERVER_LISTEN=3; 
    4453const RPC_C_MGMT_STOP_SERVER_LISTEN=4; 
    45 const RPC_C_EP_ALL_ELTS=0; 
    46 const RPC_C_EP_MATCH_BY_IF=1; 
    47 const RPC_C_EP_MATCH_BY_OBJ=2; 
    48 const RPC_C_EP_MATCH_BY_BOTH=3; 
    49 const RPC_C_VERS_ALL=1; 
    50 const RPC_C_VERS_COMPATIBLE=2; 
    51 const RPC_C_VERS_EXACT=3; 
    52 const RPC_C_VERS_MAJOR_ONLY=4; 
    53 const RPC_C_VERS_UPTO=5; 
     54 
     55// Inquiry Type for RpcMgmtEpEltInqBegin() 
     56enum : uint { 
     57    RPC_C_EP_ALL_ELTS = 0, 
     58    RPC_C_EP_MATCH_BY_IF, 
     59    RPC_C_EP_MATCH_BY_OBJ, 
     60    RPC_C_EP_MATCH_BY_BOTH 
     61
     62 
     63// for RpcMgmtEpEltInqNext() 
     64enum : uint { 
     65    RPC_C_VERS_ALL = 1, 
     66    RPC_C_VERS_COMPATIBLE, 
     67    RPC_C_VERS_EXACT, 
     68    RPC_C_VERS_MAJOR_ONLY, 
     69    RPC_C_VERS_UPTO 
     70
     71 
    5472const DCE_C_ERROR_STRING_LEN=256; 
    5573const RPC_C_PARM_MAX_PACKET_LENGTH=1; 
     
    255273RPC_STATUS RpcMgmtEpEltInqNextA(RPC_EP_INQ_HANDLE,RPC_IF_ID*,RPC_BINDING_HANDLE*,UUID*,char **); 
    256274RPC_STATUS RpcMgmtEpEltInqNextW(RPC_EP_INQ_HANDLE,RPC_IF_ID*,RPC_BINDING_HANDLE*,UUID*,wchar **); 
     275 
     276// MinGW erroneously had these in rpc.h 
     277RPC_STATUS RpcImpersonateClient(RPC_BINDING_HANDLE); 
     278RPC_STATUS RpcRevertToSelf(); 
     279 
    257280} 
    258281 
  • trunk/win32/rpcnsi.d

    r89 r127  
    33*                                                                       * 
    44*                       Windows API header module                       * 
     5*                     RPC Name Service (RpcNs APIs)                     * 
    56*                                                                       * 
    67*                 Translated from MinGW Windows headers                 * 
     
    910\***********************************************************************/ 
    1011module win32.rpcnsi; 
     12pragma(lib, "rpcns4.lib"); 
    1113private import win32.w32api; 
     14private import win32.basetyps; 
    1215private import win32.rpcdcep; 
    1316private import win32.rpcnsi; 
  • trunk/win32/setupapi.d

    r107 r127  
    1010\***********************************************************************/ 
    1111module win32.setupapi; 
    12  
    13 import win32.w32api; 
     12pragma(lib, "setupapi.lib"); 
     13private import win32.w32api; 
    1414private import win32.windef; 
    1515private import win32.winbase; // for SYSTEMTIME 
  • trunk/win32/shellapi.d

    r75 r127  
    1010\***********************************************************************/ 
    1111module win32.shellapi; 
    12  
     12pragma(lib, "shell32.lib"); 
    1313private import win32.w32api, win32.windef; 
    1414 
  • trunk/win32/shldisp.d

    r123 r127  
    1111private import win32.unknwn; 
    1212 
    13 const ACO_AUTOSUGGEST = 0x01; 
     13// options for IAutoComplete2 
     14const DWORD ACO_AUTOSUGGEST = 0x01; 
    1415 
    1516interface IAutoComplete : public IUnknown { 
  • trunk/win32/shlobj.d

    r123 r127  
    1111// TODO: CMIC_VALID_SEE_FLAGS 
    1212module win32.shlobj; 
     13pragma(lib, "shell32.lib"); 
    1314private import win32.w32api; 
    1415private import win32.unknwn; 
  • trunk/win32/shlwapi.d

    r121 r127  
    88*                       Placed into public domain                       * 
    99\***********************************************************************/ 
     10module win32.shlwapi; 
     11pragma(lib, "shlwapi.lib"); 
     12 
    1013/* Changes compared to MinGW: 
    1114wnsprintf functions are not included. 
  • trunk/win32/sqlext.d

    r122 r127  
    1616*/ 
    1717module win32.sqlext; 
    18 pragma(msg, "sqlext: Some code needs to be moved to sqlucode"); 
    19 /* Moved to sqlucode  
    20 static if (ODBCVER <= 0x0300) { 
    21 const SQL_UNICODE=-95; 
    22 const SQL_UNICODE_VARCHAR=-96; 
    23 const SQL_UNICODE_LONGVARCHAR=-97; 
    24 const SQL_UNICODE_CHAR=SQL_UNICODE; 
    25 } else { 
    26 const SQL_UNICODE=SQL_WCHAR; 
    27 const SQL_UNICODE_VARCHAR=SQL_WVARCHAR; 
    28 const SQL_UNICODE_LONGVARCHAR=SQL_WLONGVARCHAR; 
    29 const SQL_UNICODE_CHAR=SQL_WCHAR; 
    30 } 
    31 */ 
    32  
    3318import win32.sql; 
    3419private import win32.windef; 
    35  
    3620 
    3721const SQL_SPEC_MAJOR = 3; 
     
    242226const SQL_DEFAULT_PARAM = -5; 
    243227const SQL_DELETE = 3; 
     228 
    244229const SQL_DRIVER_COMPLETE = 1; 
    245230const SQL_DRIVER_COMPLETE_REQUIRED = 3; 
     
    253238const SQL_DRIVER_PROMPT = 2; 
    254239const SQL_DRIVER_VER = 7; 
     240 
    255241const SQL_DTC_ENLIST_EXPENSIVE = 1; 
     242const SQL_DTC_UNENLIST_EXPENSIVE = 2; 
    256243const SQL_DTC_TRANSITION_COST = 1750; 
    257 const SQL_DTC_UNENLIST_EXPENSIVE = 2; 
    258244const SQL_ENSURE = 1; 
    259245const SQL_ENTIRE_ROWSET = 0; 
  • trunk/win32/vfw.d

    r116 r127  
    11// Converted from w32api\vfw.h 
    22module win32.vfw; 
     3 
     4pragma(lib, "vfw32.lib"); 
    35 
    46private import win32.windows; 
  • trunk/win32/winbase.d

    r123 r127  
    1414private import win32.w32api; 
    1515private import win32.winnt; 
     16pragma(lib, "kernel32.lib"); 
    1617 
    1718// FIXME: clean up Windows version support 
  • trunk/win32/wincon.d

    r123 r127  
    1313private import win32.w32api; 
    1414private import win32.windef; 
     15pragma(lib, "kernel32.lib"); 
    1516 
    1617// FIXME: clean up Windows version support 
  • trunk/win32/wingdi.d

    r124 r127  
    1313private import win32.winver; 
    1414private import win32.windef; 
     15pragma(lib, "gdi32.lib"); 
    1516 
    1617// FIXME: clean up Windows version support 
  • trunk/win32/winnetwk.d

    r57 r127  
    1313private import win32.winbase, win32.winnt; 
    1414private import win32.winerror; 
     15pragma(lib, "mpr.lib"); 
    1516 
    1617 
  • trunk/win32/winnls.d

    r75 r127  
    1212 
    1313private import win32.w32api, win32.basetsd, win32.windef, win32.winbase; 
     14pragma(lib, "kernel32.lib"); 
    1415 
    1516alias DWORD LCTYPE, CALTYPE, CALID, LGRPID, GEOID, GEOTYPE, GEOCLASS; 
  • trunk/win32/winnt.d

    r123 r127  
    31893189} 
    31903190 
     3191//TODO: These are actually macros, and were introduced with Win98. 
    31913192PVOID GetCurrentFiber(); 
    31923193PVOID GetFiberData(); 
  • trunk/win32/winreg.d

    r57 r127  
    1212 
    1313private import win32.windef, win32.winbase; 
     14pragma(lib, "advapi32.lib"); 
    1415 
    1516const HKEY 
  • trunk/win32/winsock2.d

    r109 r127  
    99module win32.winsock2; 
    1010 
     11pragma(lib, "Ws2_32.lib"); 
    1112/* 
    1213  Definitions for winsock 2 
  • trunk/win32/winspool.d

    r123 r127  
    1313private import win32.wingdi; 
    1414private import win32.winbase; // for SYSTEMTIME 
     15 
     16pragma(lib, "winspool.lib"); 
    1517 
    1618// FIXME: clean up Windows version support 
  • trunk/win32/winsvc.d

    r75 r127  
    1212 
    1313private import win32.w32api; 
     14pragma(lib, "advapi.lib"); 
    1415 
    1516static if (!_WIN32_WINNT_ONLY) { 
  • trunk/win32/winuser.d

    r125 r127  
    99\***********************************************************************/ 
    1010 
     11// Conversion Notes: 
    1112// The following macros were for win16 only, and are not included in this file: 
    1213//#define EnumTaskWindows(h,f,p) EnumThreadWindows((DWORD)h,f,p) 
     
    1920 
    2021module win32.winuser; 
    21  
    2222private import win32.w32api; 
    2323private import win32.winbase; 
    2424private import win32.wingdi; 
    2525private import win32.windef; // for HMONITOR 
     26 
     27pragma(lib, "user32.lib"); 
    2628 
    2729// FIXME: clean up Windows version support 
  • trunk/win32/wtypes.d

    r109 r127  
    1818alias GUID_NULL IID_NULL; 
    1919alias GUID_NULL CLSID_NULL; 
    20 //MACRO #define CBPCLIPDATA(d) ((d).cbSize-sizeof((d).ulClipFmt)) 
    21  
    22 const BYTE DECIMAL_NEG = 0x80; 
    23 //MACRO #define DECIMAL_SETZERO(d) {(d).Lo64=(d).Hi32=(d).signscale=0;} 
    24  
    25 const ROTFLAGS_REGISTRATIONKEEPSALIVE=0x01; 
    26 const ROTFLAGS_ALLOWANYCLIENT=0x02; 
     20 
     21const ROTFLAGS_REGISTRATIONKEEPSALIVE = 0x01; 
     22const ROTFLAGS_ALLOWANYCLIENT         = 0x02; 
    2723 
    2824 /* also in winsock2.h */ 
     
    3430 
    3531enum DVASPECT{ 
    36     DVASPECT_CONTENT=1, 
    37     DVASPECT_THUMBNAIL=2, 
    38     DVASPECT_ICON=4, 
    39     DVASPECT_DOCPRINT=
     32    DVASPECT_CONTENT   = 1, 
     33    DVASPECT_THUMBNAIL = 2, 
     34    DVASPECT_ICON      = 4, 
     35    DVASPECT_DOCPRINT  =
    4036} 
    4137 
    4238enum DVASPECT2{ 
    43     DVASPECT_OPAQUE=16, 
    44     DVASPECT_TRANSPARENT=32 
     39    DVASPECT_OPAQUE      = 16, 
     40    DVASPECT_TRANSPARENT = 32 
    4541} 
    4642 
    4743enum STATFLAG{ 
    48     STATFLAG_DEFAULT=0, 
    49     STATFLAG_NONAME=
     44    STATFLAG_DEFAULT = 0, 
     45    STATFLAG_NONAME  =
    5046} 
    5147 
    5248enum MEMCTX{ 
    53     MEMCTX_LOCAL=0, 
     49    MEMCTX_LOCAL = 0, 
    5450    MEMCTX_TASK, 
    5551    MEMCTX_SHARED, 
    5652    MEMCTX_MACSYSTEM, 
    57     MEMCTX_UNKNOWN=-1, 
    58     MEMCTX_SAME=-2 
     53    MEMCTX_UNKNOWN = -1, 
     54    MEMCTX_SAME = -2 
    5955} 
    6056 
    6157enum MSHCTX{ 
    62     MSHCTX_LOCAL=0, 
     58    MSHCTX_LOCAL = 0, 
    6359    MSHCTX_NOSHAREDMEM, 
    6460    MSHCTX_DIFFERENTMACHINE, 
     
    118114alias BSTRBLOB * LPBSTRBLOB; 
    119115 
     116// Used only in the PROPVARIANT structure 
     117// According to the 2003 SDK, this should be in propidl.h, not here. 
    120118struct CLIPDATA{ 
    121119    ULONG cbSize; 
     
    153151    VT_UNKNOWN, 
    154152    VT_DECIMAL, 
    155     VT_I1=16, 
     153    VT_I1 = 16, 
    156154    VT_UI1, 
    157155    VT_UI2, 
     
    169167    VT_LPSTR, 
    170168    VT_LPWSTR, 
    171     VT_RECORD=36, 
    172     VT_INT_PTR=37, 
    173     VT_UINT_PTR=38, 
    174     VT_FILETIME=64, 
     169    VT_RECORD   = 36, 
     170    VT_INT_PTR  = 37, 
     171    VT_UINT_PTR = 38, 
     172    VT_FILETIME = 64, 
    175173    VT_BLOB, 
    176174    VT_STREAM, 
     
    213211alias double DOUBLE; 
    214212 
     213 
    215214struct DECIMAL{ 
    216215    USHORT wReserved; 
    217216    union { 
    218217        struct { 
    219             BYTE scale; 
    220             BYTE sign; 
     218            ubyte scale; // valid values are 0 to 28 
     219            ubyte sign; // 0 for positive, DECIMAL_NEG for negatives. 
     220            const ubyte DECIMAL_NEG = 0x80; 
    221221        } 
    222222        USHORT signscale; 
     
    230230        ULONGLONG Lo64; 
    231231    } 
    232 
     232    // #define DECIMAL_SETZERO(d) {(d).Lo64=(d).Hi32=(d).signscale=0;} 
     233    void setZero() { Lo64 = 0; Hi32 = 0; signscale = 0; } 
     234