removed manual registration, added autoregistration

This commit is contained in:
andreas.otte%primus-online.de 1999-06-02 11:30:05 +00:00
Родитель ac665a5d66
Коммит de462fd267
1 изменённых файлов: 3 добавлений и 15 удалений

Просмотреть файл

@ -44,18 +44,6 @@ PRBool bLoadAsync;
//#include "nsIPostToServer.h"
#include "nsINetService.h"
#ifdef XP_PC
#define NETLIB_DLL "netwerk.dll"
#define XPCOM_DLL "xpcom32.dll"
#else
#ifdef XP_MAC
#include "nsMacRepository.h"
#else
#define NETLIB_DLL "libnetwerk.so"
#define XPCOM_DLL "libxpcom.so"
#endif
#endif
// Define CIDs...
static NS_DEFINE_IID(kNetServiceCID, NS_NETSERVICE_CID);
static NS_DEFINE_IID(kEventQueueServiceCID, NS_EVENTQUEUESERVICE_CID);
@ -199,9 +187,9 @@ int main(int argc, char **argv)
return 0;
}
nsComponentManager::RegisterComponent(kEventQueueServiceCID, NULL, NULL, XPCOM_DLL, PR_FALSE, PR_FALSE);
nsComponentManager::RegisterComponent(kEventQueueCID, NULL, NULL, XPCOM_DLL, PR_FALSE, PR_FALSE);
nsComponentManager::RegisterComponent(kNetServiceCID, NULL, NULL, NETLIB_DLL, PR_FALSE, PR_FALSE);
result = nsComponentManager::AutoRegister(nsIComponentManager::NS_Startup,
"components");
if (NS_FAILED(result)) return result;
// Create the Event Queue for this thread...
pEventQService = nsnull;