Interoperability : [DllImport("MAPI32.DLL", CharSet = CharSet.Ansi)]
if we want to rename the MAPISendMail fn as SendMail within C# , How can we do it ? we can do the following.
[DllImport("MAPI32.DLL", EntryPoint = "MAPISendMail", CharSet = CharSet.Ansi)]
EntryPoint = "MAPISendMail" // specified function address is obtained from the DLL
SendMail( ...) Literally what will happen is the address of the MAPISendMail() fn is assigned to the SendMail() fn. So if we call the SendMail() fn from C#, it will in turn calls the MAPISendMail() functionality from MAPI32.dll |
Tuesday, September 11, 2007
Interoperability Tips
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment