home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / com / adosamp / server / adosamp.idl < prev    next >
Encoding:
Text File  |  1998-04-03  |  4.4 KB  |  116 lines

  1. // ADOSamp.idl : IDL source for ADOSamp.dll
  2. //
  3. import "oaidl.idl";
  4.  
  5. // This file will be processed by the MIDL tool to
  6. // produce the type library (ADOSamp.tlb) and marshalling code.
  7.  
  8.  
  9.  
  10. enum DataTypeEnum
  11. {
  12.     adEmpty = 0,
  13.     adTinyInt = 16,
  14.     adSmallInt = 2,
  15.     adInteger = 3,
  16.     adBigInt = 20,
  17.     adUnsignedTinyInt = 17,
  18.     adUnsignedSmallInt = 18,
  19.     adUnsignedInt = 19,
  20.     adUnsignedBigInt = 21,
  21.     adSingle = 4,
  22.     adDouble = 5,
  23.     adCurrency = 6,
  24.     adDecimal = 14,
  25.     adNumeric = 131,
  26.     adBoolean = 11,
  27.     adError = 10,
  28.     adUserDefined = 132,
  29.     adVariant = 12,
  30.     adIDispatch = 9,
  31.     adIUnknown = 13,
  32.     adGUID = 72,
  33.     adDate = 7,
  34.     adDBDate = 133,
  35.     adDBTime = 134,
  36.     adDBTimeStamp = 135,
  37.     adBSTR = 8,
  38.     adChar = 129,
  39.     adVarChar = 200,
  40.     adLongVarChar = 201,
  41.     adWChar = 130,
  42.     adVarWChar = 202,
  43.     adLongVarWChar = 203,
  44.     adBinary = 128,
  45.     adVarBinary = 204,
  46.     adLongVarBinary = 205
  47. };
  48.  
  49. enum ParameterDirectionEnum
  50. {
  51.     adParamUnknown = 0,
  52.     adParamInput = 1,
  53.     adParamOutput = 2,
  54.     adParamInputOutput = 3,
  55.     adParamReturnValue = 4
  56. };
  57.  
  58.     [
  59.         object,
  60.         uuid(7A319993-48C0-11D0-AE70-00C04FD7D06E),
  61.         dual,
  62.         helpstring("IADOTier Interface"),
  63.         pointer_default(unique)
  64.     ]
  65.     interface IADOTier : IDispatch
  66.     {
  67.         [id(1), helpstring("method Open")] HRESULT Open([in] BSTR source, [in] BSTR user, [in] BSTR pwd);
  68.         [id(3), helpstring("method OpenRecordset")] HRESULT OpenRecordset([in] VARIANT query);
  69.         [id(4), helpstring("method CloseRecordset")] HRESULT CloseRecordset(void);
  70.         [id(5), helpstring("method ExecuteConnection")] HRESULT ExecuteConnection([in] BSTR query, [in] VARIANT_BOOL bChangeRec);
  71.         [id(6), helpstring("method ExecuteCommand")] HRESULT ExecuteCommand([in] VARIANT_BOOL bStoredProcedure, [in] VARIANT_BOOL bChangeRec);
  72.         [propget, id(7), helpstring("property CommandText")] HRESULT CommandText([out, retval] BSTR *newVal);
  73.         [propput, id(7), helpstring("property CommandText")] HRESULT CommandText([in] BSTR newVal);
  74.         [id(8), helpstring("method AppendParameter")] HRESULT AppendParameter([in] enum DataTypeEnum type, [in] VARIANT value, [in] enum ParameterDirectionEnum where, [in] long size);
  75.         [id(9), helpstring("method Update")] HRESULT Update();
  76.         [id(10), helpstring("method Delete")] HRESULT Delete();
  77.         [propget, id(11), helpstring("property Field")] HRESULT Field([in] VARIANT idx, [out, retval] VARIANT *newVal);
  78.         [propput, id(11), helpstring("property Field")] HRESULT Field([in] VARIANT idx, [in] VARIANT newVal);
  79.         [propget, id(12), helpstring("property FieldCount")] HRESULT FieldCount([out, retval] long *newVal);
  80.         [id(13), helpstring("method Close")] HRESULT Close();
  81.         [id(14), helpstring("method First")] HRESULT First();
  82.         [id(15), helpstring("method Next")] HRESULT Next();
  83.         [id(16), helpstring("method Last")] HRESULT Last();
  84.         [id(17), helpstring("method Prev")] HRESULT Prev();
  85.         [propget, id(18), helpstring("property EOF")] HRESULT EOF([out, retval] VARIANT_BOOL *newVal);
  86.         [propget, id(19), helpstring("property BOF")] HRESULT BOF([out, retval] VARIANT_BOOL *newVal);
  87.         [id(20), helpstring("method ParamQuery")] HRESULT ParamQuery([in] BSTR query, [in] long idx1, [in] BSTR idx2, [in] BSTR idx3);
  88.         [id(21), helpstring("method CallStoredProc")] HRESULT CallStoredProc([in] long idx1, [in] BSTR idx2, [in] BSTR idx3);
  89.         [propput, id(22), helpstring("property StoredProc")] HRESULT StoredProc([in] BSTR newVal);
  90.         [id(23), helpstring("method ChangeParameter")] HRESULT ChangeParameter([in] long idx, [in] enum DataTypeEnum type, [in] VARIANT value, [in] enum ParameterDirectionEnum where, [in] long size);
  91.         [id(24), helpstring("method Requery")] HRESULT Requery();
  92.         [id(25), helpstring("method ADORelease")] HRESULT ADORelease();
  93.         [propget, id(26), helpstring("property Empty")] HRESULT Empty([out, retval] VARIANT_BOOL* bEmpty);
  94.     };
  95.  
  96.  
  97. [
  98.     uuid(7A319991-48C0-11D0-AE70-00C04FD7D06E),
  99.     version(1.0),
  100.     helpstring("ADOSamp 1.0 Type Library")
  101. ]
  102. library ADOSAMPLib
  103. {
  104.     importlib("stdole32.tlb");
  105.  
  106.     [
  107.         uuid(7A319997-48C0-11D0-AE70-00C04FD7D06E),
  108.         helpstring("ADOTier Class")
  109.     ]
  110.     coclass CADOTier
  111.     {
  112.         [default] interface IADOTier;
  113.     };
  114.  
  115. };
  116.