Connecting Delphi to P/Invoke and .net
The Delphi complier often uses a *.Dll when a special delivery of code info is required to the complier/editor:- example bourland.dll is the memory manager for the Delphi complier, as I remember. And their are many other *.dll's that Embarcoo keep secret that do other things. Is their anything you know that is public information on this subject
.net's un managed code could be declared in a *.pas file as a dec开发者_如何学Celerations but the only way to communicate it out is calling *.dll's like P/Invoke
I have ilasm.exe and ildasm.exe and a decomplier into Delphi asm code now but still getting around to learn how to use them all yet.
I do not have any reference material/editorials on P/invoke at all as I cannot find anything With that I will have a good concrete plan to make a good result I do not know what *.DLL's are in P/Invoke. Do you have any documentation.
I do not have any reference material/editorials on ADO.net. The Dlls that are called and any referqance matrial I could use.
Best regards, J Lex Dean.
I agree with Rob Kennedy, your question lacks specificity a lot. Nevertheless, I'll shed some light on the P/Invoke and topics you've mentioned, hopefully it might help you ask the question more precisely.
Primarily, there are no "secret" DLLs, that Embarcadero uses. The BorlndMM.DLL memory manager is a redistributable DLL, which you may include with your applications (in some specific circumstances). The rest of DLLs are just libraries required for the IDE to work, they are not secret, just tuned specifically for their task and play no role in your application's lifetime (in fact, regular program compiled in Delphi should run anywhere, without need to install any redistributable packages).
Secondly, the P/Invoke is the call being done from the managed environment into the native, not in the opposite direction. The usual scenario looks like this: you have a piece of code, which have to run very quickly. You write your own native DLL library - in Delphi, C++ or any other language. Then you may call the native functions inside the DLL from the managed code - say C#.
Dynamic Link Libraries (DLLs) are not magic, they are just containers for compiled piece of code, which can be reused in many applications. Note, that most of WinAPI routines are enclosed inside several DLLs (for example, User32.dll).
Try to learn more about DLLs, it'll make understanding of P/invoke a lot easier.
精彩评论