I have a C# wrapper over C library. In C lib I have function which takes callback as input. In C# I have exposed callback like delegate.
Everything works fine in normal mode but when I try to call same function in remoting mode it gives exception like Could not load file or assembly. My scenario for remoting is like
1)SharedLib: I have a c# shared lib which has functions which are wrapper over C functions. All functions are defined in this lib.
2)Server Console Application: Role of server is to get session from Shredlib and open a port so that client ask server for Session
3)Client Console application: Client listen to port opened by server and get session object from server.It defines a functions having same signature as delegate in sharedlib On session object client calls method from sharedLib which take callback as input. Client pass address of method having same signature like delegate to method from sharedLib which expects callback as input.
After this I got exception like "Could not load file or assembly."
If I pass null to parameter which take callback as input then everything works fine in remoting mode also. So can anybody help in using callback in remoting mode.