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

  1. Home
  2. Community
  3. Development
  4. myReactOS

  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

BOOL WINAPI CryptInstallOIDFunctionAddress ( HMODULE  hModule,
DWORD  dwEncodingType,
LPCSTR  pszFuncName,
DWORD  cFuncEntry,
const CRYPT_OID_FUNC_ENTRY  rgFuncEntry[],
DWORD  dwFlags 
)

Definition at line 224 of file oid.c.

00227 {
00228     BOOL ret = TRUE;
00229     struct OIDFunctionSet *set;
00230 
00231     TRACE("(%p, %d, %s, %d, %p, %08x)\n", hModule, dwEncodingType,
00232      debugstr_a(pszFuncName), cFuncEntry, rgFuncEntry, dwFlags);
00233 
00234     set = CryptInitOIDFunctionSet(pszFuncName, 0);
00235     if (set)
00236     {
00237         DWORD i;
00238 
00239         EnterCriticalSection(&set->cs);
00240         for (i = 0; ret && i < cFuncEntry; i++)
00241         {
00242             struct OIDFunction *func;
00243 
00244             if (!IS_INTOID(rgFuncEntry[i].pszOID))
00245                 func = CryptMemAlloc(sizeof(struct OIDFunction)
00246                  + strlen(rgFuncEntry[i].pszOID) + 1);
00247             else
00248                 func = CryptMemAlloc(sizeof(struct OIDFunction));
00249             if (func)
00250             {
00251                 func->encoding = GET_CERT_ENCODING_TYPE(dwEncodingType);
00252                 if (!IS_INTOID(rgFuncEntry[i].pszOID))
00253                 {
00254                     LPSTR oid;
00255 
00256                     oid = (LPSTR)((LPBYTE)func + sizeof(*func));
00257                     strcpy(oid, rgFuncEntry[i].pszOID);
00258                     func->entry.pszOID = oid;
00259                 }
00260                 else
00261                     func->entry.pszOID = rgFuncEntry[i].pszOID;
00262                 func->entry.pvFuncAddr = rgFuncEntry[i].pvFuncAddr;
00263                 list_add_tail(&set->functions, &func->next);
00264             }
00265             else
00266                 ret = FALSE;
00267         }
00268         LeaveCriticalSection(&set->cs);
00269     }
00270     else
00271         ret = FALSE;
00272     return ret;
00273 }


Generated on Fri Feb 10 05:27:54 2012 for ReactOS by doxygen 1.6.3

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