cicku / libproxy

Automatically exported from code.google.com/p/libproxy
GNU Lesser General Public License v2.1
1 stars 0 forks source link

Unable to Register DLL in Windows Registry when Created with libproxy #187

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I have a C++ browser plugin which was created using the Firebreath plugin 
framework. I wanted to use libproxy to detect the proxies.

What steps will reproduce the problem?
1.Build libproxy.lib in Visual Studio 2008 using the libproxy.sln file created 
in build\libproxy, configuration set for Win32 and Debug, no changes were made 
to the configuration.
2.Modified browser plugin code to make calls to libproxy.
3.Build Firebreath plugin code using Visual Studio 2008, configuration set for 
Win32 and Debug
4.Plugin code compiles and links successfully and created a DLL.
5.Tried to register the plugin DLL using C:\Windows\SysWOW64\regsvr32 but fails 
with error "Make sure the binary is stored at the specified path or debug it to 
check for problems with the binary or dependent .DLL files"

What is the expected output? What do you see instead?
When I build the Firebreath plugin code without libproxy, it registers through 
regsvr32 without any errors and runs in IE, Firefox, and Chrome.

What version of the product are you using? On what operating system?
Windows 7 professional, Service pack 1, 64-bit.
libproxy version 0.4.11
Visual Studio 2008
Firebreath version 1.6.0

Please provide any additional information below.
I created non-plugin c++ test code.
When I linked with libproxy.lib - it compiled and linked, but when I tried to 
run it using the debugger, it gave an error saying that it could not find 
libproxy.dll.
When I linked with libproxy.dll - it compiled but the link failed with the 
error "fatal error LNK1107: invalid or corrupt file: cannot read at 0x2E8"
I suspect this is what is causing regsvr32 to fail.

I added 2 lines of code from libproxy in both the browser plugin and the c++ 
test code:
...
    pxProxyFactory *pf = px_proxy_factory_new();
    char **proxies = px_proxy_factory_get_proxies(pf, "www.google.com");
...

(NOTE: The above code is to run in the debugger and is only to see the list of 
proxies returned, am not doing anything with them yet.)

Dynamic linking is not possible in this case and so I need to use libproxy.lib. 

Original issue reported on code.google.com by keiko.ja...@garmin.com on 19 Dec 2012 at 5:25