Ok this is a bit more complicted than I'd like but I'll do my best to
explain it. I didn't write most of it but I've been tasked with the
last part here which is giving me some trouble.
A developer here has created a DLL library (LibGecko.dll) it is linked
to XUL.lib and some other gecko/xul libraries.
The way we use it is through a stub library that we can link to. we
link to the stub which handles all the dynamic loading so we link to
libgecko_stub in our apps.
The testbed application links to libgecko_stub and called InitGecko
which eventually gets to the dll and calls this code to finially
initialize the gecko subsystem:
nsresult result;
nsCOMPtr<nsILocalFile> xulDir;
result = NS_NewLocalFile(nsString(greBaseDir), PR_TRUE,
getter_AddRefs(xulDir));
if(NS_FAILED(result)) {
Gecko_SetLastError(0x1002);
return(FALSE);
};
nsCOMPtr<nsILocalFile> appDir;
result = NS_NewLocalFile(nsString(appBaseDir), PR_TRUE,
getter_AddRefs(appDir));
if(NS_FAILED(result)) {
Gecko_SetLastError(0x1003);
return(FALSE);
};
result = XRE_InitEmbedding(xulDir, appDir, nsnull, nsnull, 0);
if(NS_FAILED(result)) {
Gecko_SetLastError(0x1004);
return(FALSE);
};
In our testbed app this works fine.
I have created a dll addin and when I initialize the gecko subsystem
it goes through all the same hoops gets to the same block of code and
then never returns from XRE_InitEmbedding. All the arguments to the
function are the same and everything SHOULD work the same. When I
pause the app VS2008 says the process appears deadlocked.
Any help or clues?? Obviously not initing Gecko kind of holds up a lot
of my development. I'm in the process of building a debug version of
the XULSDK and mozilla in the hopes of being able to step into that
function and attempt to figure out what's going wrong. Like I said I
didn't develop most of the code and the developer who did is busy
working on another project and can't figure it out wither so I'm
hoping someone here may have run into this before.. Thanks,
Damon Hopkins
_______________________________________________
dev-embedding mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-embedding