Lines Matching refs:rv

69     nsresult rv;
73 rv = NS_InitXPCOM2(&servMgr, NULL, NULL);
74 if (NS_FAILED(rv))
77 printf("Cannot initialize XPCOM. Exit. [rv=0x%08X]\n", (int)rv);
83 nsCOMPtr<nsIComponentManager> compMgr = do_GetService(kComponentManagerCID, &rv);
84 if (NS_FAILED(rv))
87 printf("Cannot get component manager from service manager.. Exit. [rv=0x%08X]\n", (int)rv);
95 rv = compMgr->CreateInstanceByContractID(NS_REGISTRY_CONTRACTID, NULL,
99 if ( NS_FAILED(rv) )
101 printf( "Error opening registry file %s, rv=0x%08X\n", argv[1] , (int)rv );
102 return rv;
106 rv = NS_NewNativeLocalFile( nsDependentCString(argv[1]), PR_FALSE, getter_AddRefs(regFile) );
107 if ( NS_FAILED(rv) ) {
108 printf( "Error instantiating local file for %s, rv=0x%08X\n", argv[1], (int)rv );
109 return rv;
112 rv = reg->Open( regFile );
114 if ( rv == NS_OK )
129 rv = compMgr->CreateInstanceByContractID(NS_REGISTRY_CONTRACTID, NULL,
134 if ( NS_FAILED(rv) )
136 printf( "Error opening creating registry instance, rv=0x%08X\n", (int)rv );
137 return rv;
139 rv = reg->OpenWellKnownRegistry(nsIRegistry::ApplicationComponentRegistry);
140 if ( rv == NS_ERROR_REG_BADTYPE ) {
143 else if ( rv == NS_OK ) {
156 return rv;
175 nsresult rv = reg->EnumerateSubtrees( root, &keys );
178 if ( rv == NS_OK ) {
180 rv = keys->First();
182 while( NS_SUCCEEDED( rv ) && (NS_OK != keys->IsDone()) ) {
184 rv = keys->CurrentItem( &base );
186 if ( rv == NS_OK ) {
190 rv = base->QueryInterface( nodeIID, (void**)&node );
192 if ( rv == NS_OK ) {
195 rv = node->GetNameUTF8( &name );
197 if ( rv == NS_OK ) {
205 rv = reg->GetSubtreeRaw( root, name, &key );
206 if ( rv == NS_OK ) {
210 printf( "Error getting key, rv=0x%08X\n", (int)rv );
214 printf( "Error getting subtree name, rv=0x%08X\n", (int)rv );
219 printf( "Error converting base node ptr to nsIRegistryNode, rv=0x%08X\n", (int)rv );
225 rv = keys->Next();
227 if ( NS_SUCCEEDED( rv ) ) {
229 printf( "Error advancing enumerator, rv=0x%08X\n", (int)rv );
232 printf( "Error getting current item, rv=0x%08X\n", (int)rv );
238 printf( "Error creating enumerator for %s, root=0x%08X, rv=0x%08X\n",
239 rootName, (int)root, (int)rv );
247 nsresult rv = reg->EnumerateValues( root, &values );
250 if ( rv == NS_OK ) {
252 rv = values->First();
255 while( rv == NS_OK && (NS_OK != values->IsDone()) ) {
257 rv = values->CurrentItem( &base );
259 if ( rv == NS_OK ) {
263 rv = base->QueryInterface( valueIID, (void**)&value );
265 if ( rv == NS_OK ) {
268 rv = value->GetNameUTF8( &name );
270 if ( rv == NS_OK ) {
275 rv = reg->GetValueType( root, name, &type );
276 if ( rv == NS_OK ) {
281 rv = reg->GetStringUTF8( root, name, &strValue );
282 if ( rv == NS_OK ) {
286 printf( "\t Error getting string value, rv=0x%08X", (int)rv );
294 rv = reg->GetInt( root, name, &val );
295 if (NS_SUCCEEDED(rv)) {
299 printf( "\t Error getting int32 value, rv=%08X", (int)rv);
317 printf( "\t= ? (error getting value, rv=0x%08X)", (int)rv );
322 printf( "Error getting value name, rv=0x%08X\n", (int)rv );
327 printf( "Error converting base node ptr to nsIRegistryNode, rv=0x%08X\n", (int)rv );
333 rv = values->Next();
335 if ( NS_SUCCEEDED( rv ) ) {
337 printf( "Error advancing enumerator, rv=0x%08X\n", (int)rv );
341 printf( "Error getting current item, rv=0x%08X\n", (int)rv );
348 printf( "\t\tError enumerating values, rv=0x%08X\n", (int)rv );