Page 1 of 1
Unable to load RCFProto
Posted: Fri Nov 15, 2013 10:19 am
by 20039001
whem i building client-server C#(csharp) demo application in VS 2008 at RCFProto.Init(); line i am getting "unable to load PCFproto native binding for .Net Attempted to lead RCFProto_NET_impl.dll LoadLibraryEx() error :The specified module could not be found "
i intstalled Microsoft Visual C++ 2008 Redistributables x86 resolve missing msvcr100 dllerror and i changed project properies to x86 . still i am getting the same error still .
can please do needful as possible
Re: Unable to load RCFProto
Posted: Tue Nov 19, 2013 2:42 am
by jarl
Can you give us some more details about your environment? Are you able to build and run the demo that is in the distribution?
I've downloaded RCFProto-win32-0.9.0.6.zip, opened csharp/demo/vs2008/RCFProtoDemo.sln in Visual Studio 2008, built the solution and have verified that I can run the DemoServer and DemoClient projects.
In your own projects, you will need to deploy RCFProto_NET.dll, Google.ProtocolBuffers.dll and RCFProto_NET_impl.dll. You will need to select the correct version of RCFProto_NET_impl.dll (32 bit or 64 bit, depending on the architecture of the loading executable), and RCFProto_NET_impl.dll should generally be in the same directory as the loading executable. If you have RCFProto_NET_impl.dll in a location which the Windows DLL loader can't find, you will need to call RCFProto.SetNativeDllPath() , with the relevant path to RCFProto_NET_impl.dll, before you call RCFProto.Init().
There is more information available in the RCFProto User Guide:
http://www.deltavsoft.com/RCFProto/doc/ ... quirements
Re: Unable to load RCFProto
Posted: Tue Nov 19, 2013 8:48 am
by 20039001
Hi jarl,
Thanks for your suggestion
I followed below mentioned steps to build RCFProtoDemo application
Step1 : I have Downloaded RCFProto-win32-0.9.0.6.zip.
Step2 : opened csharp/demo/vs2008/RCFprotoDemo.sln in visual Studio 2008
Step3 :Before building RCFProtoDemo Solution. I have generated Demo.CS file from ProtoGen.exe which is located csharp\demo\vs2008\bin\Debug using
command ProtoGen.exe Demo.Proto -Service_generator_type=GENERIC __output_directory=.
Step4 :Added Demo.cs file to both DemoClient and DemoServer projects.
Step5 : Deployed(Added) Google.ProtocolBuffers and RCFproto_Net DLLs for both DemoClient and DemoSever Projects.
Step6 :As you suggested set Native DLL path for RCFProto_NET_impl before calling RCFProto.Init() function
as mentioned below
RCFProto.SetNativeDllPath("E:\\Protobuf\\RCFProto-win32-0.9.0.6\\RCFProto-win32-0.9.0.6\\csharp\\demo\\vs2008\\bin\\Debug\\x86\CFProto_NET_impl.dll");
Step7 : Build the RCFProtoDemo solution and Build Succeeded.
Step8 :At RCFProto.Init() i am getting following Exception
"\Unable to load RCFProto native bindings for .NET. Attempted to load:
E:\\Protobuf\\RCFProto-win32-0.9.0.6\\RCFProto-win32-0.9.0.6\\csharp\\demo\\vs2008\\bin\\Debug\\x86\\RCFProto_NET_impl.dll.\nLoadLibraryEx()
error: %1 is not a valid Win32 application\nN...
if any Steps i missed ,please correct me where i am going wrong
Re: Unable to load RCFProto
Posted: Tue Nov 19, 2013 10:34 am
by jarl
You're almost there... The last error ("%1 is not a valid Win32 application") indicates a x86/x64 mismatch between the loading application and RCFProto_NET_impl.dll. It looks like you have provided the path to the x86 version of RCFProto_NET_impl.dll - can you try with the path to the x64 one instead?
Regarding the C# demo in the distribution, you don't need to run ProtoGen.exe yourself, as there are pre-build commands in the project that will do that for you. Once you've built the solution, you don't need to copy any DLL's anywhere - just run DemoServer and DemoClient directly from Visual Studio,and they will locate the DLL's they need.
Re: Unable to load RCFProto
Posted: Wed Nov 20, 2013 6:36 am
by 20039001
Hi jarl,
When i refer x86 DLL i will get exception at RCFProto.Init() saying that
"Unable to load RCFproto native binding for .NET Attempted to load E:\\Protobuf\\RCFProto-win32-0.9.0.6\\RCFProto-win32-0.9.0.6\\csharp\\demo\\vs2008\\bin\\Debug\\x86\CFProto_NET_impl.dll LoadLibraryEx error :the Specified module could not be found "
When i refer x64 DLL i will get exception at RCFProto.Init() saying that
"Unable to load RCFproto native binding for .NET Attempted to load E:\\Protobuf\\RCFProto-win32-0.9.0.6\\RCFProto-win32-0.9.0.6\\csharp\\demo\\vs2008\\bin\\Debug\\x64\CFProto_NET_impl.dll LoadLibraryEx error :the Specified module could not be found "LoadLibraryEx() error: %1 is not a valid Win32 application. Note: This error most likely indicates an x86/x64 architecture mismatch.
Please suggest me how can i fix this issue
-
Re: Unable to load RCFProto
Posted: Thu Nov 21, 2013 2:38 am
by jarl
OK, it looks like you need to be using the x86 DLL them. The error message you're getting ("Specified module could not be found") is most likely due to a missing dependency.
Because we built RCFProto_NET_impl.dll with Visual Studio 2012, you need to have the Visual Studio 2012 runtimes installed. The runtimes can be downloaded here:
http://www.microsoft.com/en-au/download ... x?id=30679
, and you'll want to download vcredist_x86.exe .
Once you've installed that, you should be able to load RCFProto_NET_impl.dll.
Thanks for persisting with this.The dependency on the Visual Studio runtimes is not clearly stated in the documentation, and we'll fix that.
Re: Unable to load RCFProto
Posted: Thu Nov 21, 2013 2:51 am
by jarl
On a further note, if you still get load errors, you can download the Depends utility:
http://www.dependencywalker.com/
, and then run that on x86\RCFProto_NET_impl.dll . If there are any dependencies missing, it will tell you what they are.
Re: Unable to load RCFProto
Posted: Mon Dec 02, 2013 7:15 am
by 20039001
Hi Jarl,
With respect to usage of RCFProto libraries, is it compulsory to have RCFProto both Server and Client sides?
I have written a C# Client with RCFProto library to communicate with already running C++ server (RPC Service with Protbuff implementation).
For this I have used the same .proto(used in Server with C++) file for generating cs files.
Following are the issues I am facing:
Client(C#) Side i am getting RCF Error:Decoder Error.
Server(C++) side i am getting out of memory.
Appreciate any suggestions on this issue:.
Re: Unable to load RCFProto
Posted: Thu Dec 05, 2013 5:33 am
by jarl
Currently RCFProto embeds its Protocol Buffer serialized objects in the RCF protocol, which in practical terms means you will need both server and client to be RCFProto-based. We are however looking at using a HTTP-based protocol instead, to allow for more interoperability.
Re the issues you have - can you reduce your code down to a sample that we can run here? Do you have stack traces for the two errors (client-side and server-side)?
Off hand it looks like there is something wrong with the format of the bytes coming across the wire.