Hi, > The only way to get them is to build them yourself. You'll have to pull > the source down from the cvs server, with the appropriate tag. > > cvs co -r MOZILLA_1_0_BRANCH mozilla/client.mak
Currently I have Netscape 6.2.3 installed on my PC and have found a tag for Netscape 6.2.2 release, the tag is NETSCAPE_6_2_1_RELEASE. Hence I trying to download the source through CVS for this tag. Will this give me the exact source used to build Netscape 6.2.3? As I will be calling plenty of functions/Interfaces from the DLL's of Netscape. I need to use the nsCOMPtr. Even If I avoid it, the DLL internally uses the smart pointer. Hence I need the source code and I am trying to download the same. Secondly, I have one more query. Can I access the toolbar of Netscape through XPCOM or any other way round? I want to add a DeskBand to the Netscape Window, as per my clients requirement. Thanks, Nitin David Bradley <[EMAIL PROTECTED]> wrote in message news:<[EMAIL PROTECTED]>... > Nitin wrote: > > How and where do I get these Netscape files? > > The only way to get them is to build them yourself. You'll have to pull > the source down from the cvs server, with the appropriate tag. > > cvs co -r MOZILLA_1_0_BRANCH mozilla/client.mak > > I'm not sure that's the branch tag you want, though. I don't remember > off the top of my head what the tag is for 6.2. > > What's most likely happening is that when you link against a DLL it uses > the ordinals instead of the function names. More than like between 6.2 > and the mozilla lib's you have, those numbers have changed. > > > > > >>Here's where you're going to run into problems. Currently the only real > >>way to invoke a method is from C++. What you would need to do is provide > >>a C wrapper around the XPTC_InvokeByIndex function and nsXPTCVariant. > >>Once this is done, you can then manually invoke AddRef and Release > >>methods, to effect what nsCOMPtr is doing. > > > > > > Do you mean I can avoid the nsCOMPtr? > > I have found that there exist a entry point for "XPTC_InvokeByIndex" > > function, but I am unable to use this, can you please give me a sample > > for this, I possible as I am really new for COM. > > XPTC_InvokeByIndex is a C++ function so you won't be able to call it > from C++. You'll have to create a extern "C" function that you export > from a private DLL of your creation and call that. Since you're going to > have to do this for XPTC_InvokeByIndex, you might be better off adding > your own wrapper for NS_InitXPCOM2. > > Here's some very loose psuedo code of what you'll probably need to do > > typedef struct > { > /* your variant union goes here > } MyVariant; > > void ConvertFromMyVariant( > MyVariant const & src, > nsXPTCVariant & dest) > { > // Code that converts the variant > } > > extern "C" { > YOUR_DLL_EXPORT_MACRO unsigned long MY_InvokeByIndex( > void * that, > unsigned long index, > unsigned long paramCount, > MyVariant * params) > { > nsXPTCVariant * paramBuffer = new nsXPTCVariant[paramCount]; > for (unsigned long i = 0; i < index; ++i) > { > ConvertFromMyVariant( > params[i], > paramBuffer[i]); > } > return XPTC_InvokeByIndex( > reinterpret_cast<nsISupports*>that, > index, > paramCount, > paramBuffer); > } > > YOUR_DLL_EXPORT_MACRO void InitializeXPCOM() > { > NS_InitXPCOM2(0, 0, 0); > } > > }
