Posts

Showing posts from March, 2006

[Dot Net] Problem when you use interface in a separate source file (usually)

Hi, Lets say you have one interface and one implementation. You build them in one assembly. Then in your other (user)project you use this interface file and reference the assembly built previously. But at runtime your user project will unable to create the object of that interface. Because in this current project this interface is recompiled under this-project's assembly and namespace probably. So it become a separate interface altough identical in source. This gives you some kind of Security, Visibility Level. And perhaps it generates some kind of GUID, so every thing is same but GUID key is different. (And then they wrap it into security and stuff...) What you think? Check out: http://www.yoda.arachsys.com/csharp/plugin.html

VisualBasic.Net unable to see Managed functions returning char*

While working in a managed-unmanaged thing in VC++.Net, I had created an unmanaged (static) function then in the managed (__gc) class I called that function and exposed it through this managed class. I then tried to call that managed function returning char* or an ansi-string but My visual basic .net was unable to see that function from the managed class, and it was able to see other functions that are returning int or other type at the same time. To check the things I then created a C# project and called that dll created by vc++.net and I was able to see and call the function that returns char*, only thing I needed was to apply the conversion of string from ansi to 2-byte string (unicode).