ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

infhostget.c
Go to the documentation of this file.
00001 /*
00002  * PROJECT:    .inf file parser
00003  * LICENSE:    GPL - See COPYING in the top level directory
00004  * PROGRAMMER: Royce Mitchell III
00005  *             Eric Kohl
00006  *             Ge van Geldorp <gvg@reactos.org>
00007  */
00008 
00009 /* INCLUDES *****************************************************************/
00010 
00011 #include "inflib.h"
00012 #include "infhost.h"
00013 
00014 #define NDEBUG
00015 #include <debug.h>
00016 
00017 int
00018 InfHostFindFirstLine(HINF InfHandle,
00019                      const WCHAR *Section,
00020                      const WCHAR *Key,
00021                      PINFCONTEXT *Context)
00022 {
00023   INFSTATUS Status;
00024 
00025   Status = InfpFindFirstLine(InfHandle, Section, Key, Context);
00026   if (INF_SUCCESS(Status))
00027     {
00028       return 0;
00029     }
00030   else
00031     {
00032       errno = Status;
00033       return -1;
00034     }
00035 }
00036 
00037 
00038 int
00039 InfHostFindNextLine(PINFCONTEXT ContextIn,
00040                     PINFCONTEXT ContextOut)
00041 {
00042   INFSTATUS Status;
00043 
00044   Status = InfpFindNextLine(ContextIn, ContextOut);
00045   if (INF_SUCCESS(Status))
00046     {
00047       return 0;
00048     }
00049   else
00050     {
00051       errno = Status;
00052       return -1;
00053     }
00054 }
00055 
00056 
00057 int
00058 InfHostFindFirstMatchLine(PINFCONTEXT ContextIn,
00059                           const WCHAR *Key,
00060                           PINFCONTEXT ContextOut)
00061 {
00062   INFSTATUS Status;
00063 
00064   Status = InfpFindFirstMatchLine(ContextIn, Key, ContextOut);
00065   if (INF_SUCCESS(Status))
00066     {
00067       return 0;
00068     }
00069   else
00070     {
00071       errno = Status;
00072       return -1;
00073     }
00074 }
00075 
00076 
00077 int
00078 InfHostFindNextMatchLine(PINFCONTEXT ContextIn,
00079                          const WCHAR *Key,
00080                          PINFCONTEXT ContextOut)
00081 {
00082   INFSTATUS Status;
00083 
00084   Status = InfpFindNextMatchLine(ContextIn, Key, ContextOut);
00085   if (INF_SUCCESS(Status))
00086     {
00087       return 0;
00088     }
00089   else
00090     {
00091       errno = Status;
00092       return -1;
00093     }
00094 }
00095 
00096 
00097 LONG
00098 InfHostGetLineCount(HINF InfHandle,
00099                     PCWSTR Section)
00100 {
00101   return InfpGetLineCount(InfHandle, Section);
00102 }
00103 
00104 
00105 /* InfGetLineText */
00106 
00107 
00108 LONG
00109 InfHostGetFieldCount(PINFCONTEXT Context)
00110 {
00111   return InfpGetFieldCount(Context);
00112 }
00113 
00114 
00115 int
00116 InfHostGetBinaryField(PINFCONTEXT Context,
00117                       ULONG FieldIndex,
00118                       UCHAR *ReturnBuffer,
00119                       ULONG ReturnBufferSize,
00120                       ULONG *RequiredSize)
00121 {
00122   INFSTATUS Status;
00123 
00124   Status = InfpGetBinaryField(Context, FieldIndex, ReturnBuffer,
00125                               ReturnBufferSize, RequiredSize);
00126   if (INF_SUCCESS(Status))
00127     {
00128       return 0;
00129     }
00130   else
00131     {
00132       errno = Status;
00133       return -1;
00134     }
00135 }
00136 
00137 
00138 int
00139 InfHostGetIntField(PINFCONTEXT Context,
00140                    ULONG FieldIndex,
00141                    INT *IntegerValue)
00142 {
00143   INFSTATUS Status;
00144 
00145   Status = InfpGetIntField(Context, FieldIndex, IntegerValue);
00146   if (INF_SUCCESS(Status))
00147     {
00148       return 0;
00149     }
00150   else
00151     {
00152       errno = Status;
00153       return -1;
00154     }
00155 }
00156 
00157 
00158 int
00159 InfHostGetMultiSzField(PINFCONTEXT Context,
00160                        ULONG FieldIndex,
00161                        WCHAR *ReturnBuffer,
00162                        ULONG ReturnBufferSize,
00163                        ULONG *RequiredSize)
00164 {
00165   INFSTATUS Status;
00166 
00167   Status = InfpGetMultiSzField(Context, FieldIndex, ReturnBuffer,
00168                                ReturnBufferSize, RequiredSize);
00169   if (INF_SUCCESS(Status))
00170     {
00171       return 0;
00172     }
00173   else
00174     {
00175       errno = Status;
00176       return -1;
00177     }
00178 }
00179 
00180 
00181 int
00182 InfHostGetStringField(PINFCONTEXT Context,
00183                       ULONG FieldIndex,
00184                       WCHAR *ReturnBuffer,
00185                       ULONG ReturnBufferSize,
00186                       ULONG *RequiredSize)
00187 {
00188   INFSTATUS Status;
00189 
00190   Status = InfpGetStringField(Context, FieldIndex, ReturnBuffer,
00191                               ReturnBufferSize, RequiredSize);
00192   if (INF_SUCCESS(Status))
00193     {
00194       return 0;
00195     }
00196   else
00197     {
00198       errno = Status;
00199       return -1;
00200     }
00201 }
00202 
00203 
00204 int
00205 InfHostGetData(PINFCONTEXT Context,
00206                WCHAR **Key,
00207                WCHAR **Data)
00208 {
00209   INFSTATUS Status;
00210 
00211   Status = InfpGetData(Context, Key, Data);
00212   if (INF_SUCCESS(Status))
00213     {
00214       return 0;
00215     }
00216   else
00217     {
00218       errno = Status;
00219       return -1;
00220     }
00221 }
00222 
00223 
00224 int
00225 InfHostGetDataField(PINFCONTEXT Context,
00226                     ULONG FieldIndex,
00227                     WCHAR **Data)
00228 {
00229   INFSTATUS Status;
00230 
00231   Status = InfpGetDataField(Context, FieldIndex, Data);
00232   if (INF_SUCCESS(Status))
00233     {
00234       return 0;
00235     }
00236   else
00237     {
00238       errno = Status;
00239       return -1;
00240     }
00241 }
00242 
00243 VOID
00244 InfHostFreeContext(PINFCONTEXT Context)
00245 {
00246   InfpFreeContext(Context);
00247 }
00248 
00249 /* EOF */

Generated on Sun May 27 2012 04:36:15 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.