NET_API_STATUS Parse( IN DWORD argc, IN LPTSTR argv[] ) /*++ Routine Description : Wrapper function of the real worker Parse2 function. Arguments : argc : argument count argv : argument string array pointer. Return Value : return NO_ERROR if successfully parse parameter ERROR_INVALID_PARAMETER, otherwise --*/ { NET_API_STATUS ApiStatus; LPNET_CONFIG_HANDLE ConfigHandle; // Get read-write lock for config data. (The lock is for the in-memory // version of the data, which we're going to set.) ACQUIRE_LOCK( ReplGlobalConfigLock ); // Open the config file (nt.cfg) ApiStatus = NetpOpenConfigData( & ConfigHandle, NULL, // local machine SECT_NT_REPLICATOR, // section name TRUE); // read-only if (ApiStatus != NO_ERROR) { NetpKdPrint(( "[REPL] Parse() can't open config section.\n" )); ReplFinish( SERVICE_UIC_CODE( SERVICE_UIC_SYSTEM, ApiStatus), NULL); RELEASE_LOCK( ReplGlobalConfigLock ); return( ApiStatus ); } ApiStatus = Parse2(argc, argv, ConfigHandle); // close config file .. (void) NetpCloseConfigData( ConfigHandle ); RELEASE_LOCK( ReplGlobalConfigLock ); return( ApiStatus ); }
bool cOverrideCat::Parse(char *str) { if((str=Parse2(str))) { if(sscanf(str,"%x:%x",&caid,&pid)==2) { PRINTF(L_CORE_OVER,"cat: %s - caid %04x pid %04x",*Print(),caid,pid); return true; } PRINTF(L_CORE_LOAD,"override: CAT format error"); } return false; }