المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : Exporting functions from C# .dll for other programs



C# Programming
04-27-2009, 11:30 PM
Hi
I need to write a C# .dll library which exports functions accessible from good old win32 API applications. (not the usual other way around, calling win API functions from C#) Is this possible?
If so, how do I make them as regular (global) functions, without being nested in some namespace and class?
The win32 api application requires for example "void FunctionA()" and "void FunctionBee()" to be exported in my dll, but as far as I know, C# does not allow for functions to be on their own, without being in a namespace and class. Other than that, I do not know how to mark them as "exported", some attribute or something?

Please point me in the right direction, any help appreciated.
Thanks, H.