Platform Invocation Services (original) (raw)
P/Invoke (aussi appelé Platform Invocation Services) de Microsoft est une spécification de l'implémentation de CLI, qui permet au managed code d'appeler du code natif dans les DLL. Le code natif est référencé via les meta-données qui décrivent les fonctions exportées d'une DLL.
Property | Value |
---|---|
dbo:abstract | P/Invoke (aussi appelé Platform Invocation Services) de Microsoft est une spécification de l'implémentation de CLI, qui permet au managed code d'appeler du code natif dans les DLL. Le code natif est référencé via les meta-données qui décrivent les fonctions exportées d'une DLL. (fr) Platform Invocation Services, commonly referred to as P/Invoke, is a feature of Common Language Infrastructure implementations, like Microsoft's Common Language Runtime, that enables managed code to call native code. Managed code, such as C# or VB.NET, provides native access to classes, methods, and types defined within the libraries that make up the .NET Framework. While the .NET Framework provides an extensive set of functionality, it may lack access to many lower level operating system libraries normally written in unmanaged code or third party libraries also written in unmanaged code. P/Invoke is the technique a programmer can use to access functions in these libraries. Calls to functions within these libraries occur by declaring the signature of the unmanaged function within managed code, which serves as the actual function that can be called like any other managed method. The declaration references the library's file path and defines the function parameters and return in managed types that are most likely to be implicitly marshaled to and from the unmanaged types by the common language run-time (CLR). When the unmanaged data types become too complex for a simple implicit conversion from and to managed types, the framework allows the user to define attributes on the function, return, and/or the parameters to explicitly refine how the data should be marshaled so as not to lead to exceptions in trying to do so implicitly. There are many abstractions of lower level programming concepts available to managed code programmers as compared to programming in unmanaged languages. As a result, a programmer with only managed code experience will need to brush up on programming concepts such as pointers, structures, and passing by reference to overcome some of the more basic, but common obstacles in using P/Invoke. (en) P/Invoke(Platform Invoke、プラットフォーム呼び出し)とは、.NET Frameworkにおける共通言語基盤 (CLI) の機能の一つであり、マネージコードから動的ライブラリ内のネイティブコードを呼び出すことを可能にするものである。受け渡しされるデータ型は、必要であればCLIによって適切に変換されるが、メタデータによってプログラマーが変換方法を指定することもできる。こうしたデータの変換をマーシャリングという。 (ja) Platform Invocation Services, mer känd som P/Invoke, är en funktion i implementationer av Common Language Infrastructure, som till exempel Common Language Runtime, som tillåter hanterad kod att anropa maskinkod i DLL-filer. Maskinkoden refereras av metadata som beskriver funktionen som laddas ifrån DLL-filen. (sv) 平台叫用服務(英語:Platform Invocation Services),或称P/Invoke,通常指微软的公共语言运行时提供的方式。 平台叫用服務是公共语言基础设施相关实现的一个特性。这一特性与微软的公共语言运行时提供的较为类似,因此一般提到P/Invoke多数指微软的.NET实现方案。这一方案能够实现通过托管代码访问原生代码。使用P/Invoke可以通过CLR来控制DLL的加载,以及将非托管代码的数据类型转换为托管数据类型。 (zh) |
dbo:wikiPageExternalLink | http://www.paulyao.com/resources/tools/pinvoke.asp http://www.pinvoke.net/ http://www.xinterop.com/index.php/2013/04/13/introduction-to-c-pinvoke-interop-sdk%23method-overrides http://marshal-as.net http://www.jinvoke.com http://www.pinvoke.net http://www.pinvoker.com http://www.xinterop.com http://www.codeplex.com/clrinterop https://www.red-gate.com/ https://msdn.microsoft.com/en-us/library/ms235282.aspx https://learn.microsoft.com/en-us/archive/blogs/brada/the-pinvoke-problem http://www.red-gate.com/products/PInvoke.net/index.htm |
dbo:wikiPageID | 4183932 (xsd:integer) |
dbo:wikiPageLength | 16959 (xsd:nonNegativeInteger) |
dbo:wikiPageRevisionID | 1114974790 (xsd:integer) |
dbo:wikiPageWikiLink | dbr:Memory_leak dbr:Windows_API dbc:.NET_terminology dbr:Dynamic-link_library dbr:J/Direct dbr:.NET_Framework dbr:Common_Language_Infrastructure dbr:Common_Language_Runtime dbr:CodePlex dbr:Blittable_Types dbr:Object_pinning dbr:Call_stack dbr:Common_Type_System dbr:Microsoft_Java_Virtual_Machine dbr:C++ dbr:C++/CLI dbr:C_(programming_language) dbr:C_Sharp_(programming_language) dbr:Win32_API dbr:Garbage_collection_(computer_science) dbr:Data_structure_alignment dbr:Data_type dbr:Java_Native_Access dbr:Java_Native_Interface dbr:API dbr:Blittable_types dbc:Common_Language_Infrastructure dbr:Metadata_(CLI) dbr:Microsoft dbr:Microsoft_Limited_Public_License dbr:Microsoft_Visual_Studio dbr:Microsoft_Windows dbr:Native_code dbr:Type_safety dbr:Segmentation_fault dbr:Managed_code dbr:Breaking_change dbr:Union_(computer_science) dbr:Win32_api dbr:Windows_library_files |
dbp:wikiPageUsesTemplate | dbt:.NET dbt:Citation_needed dbt:Common_Language_Infrastructure dbt:External_links dbt:Mono dbt:Reflist dbt:Technical |
dcterms:subject | dbc:.NET_terminology dbc:Common_Language_Infrastructure |
gold:hypernym | dbr:Feature |
rdf:type | dbo:Work |
rdfs:comment | P/Invoke (aussi appelé Platform Invocation Services) de Microsoft est une spécification de l'implémentation de CLI, qui permet au managed code d'appeler du code natif dans les DLL. Le code natif est référencé via les meta-données qui décrivent les fonctions exportées d'une DLL. (fr) P/Invoke(Platform Invoke、プラットフォーム呼び出し)とは、.NET Frameworkにおける共通言語基盤 (CLI) の機能の一つであり、マネージコードから動的ライブラリ内のネイティブコードを呼び出すことを可能にするものである。受け渡しされるデータ型は、必要であればCLIによって適切に変換されるが、メタデータによってプログラマーが変換方法を指定することもできる。こうしたデータの変換をマーシャリングという。 (ja) Platform Invocation Services, mer känd som P/Invoke, är en funktion i implementationer av Common Language Infrastructure, som till exempel Common Language Runtime, som tillåter hanterad kod att anropa maskinkod i DLL-filer. Maskinkoden refereras av metadata som beskriver funktionen som laddas ifrån DLL-filen. (sv) 平台叫用服務(英語:Platform Invocation Services),或称P/Invoke,通常指微软的公共语言运行时提供的方式。 平台叫用服務是公共语言基础设施相关实现的一个特性。这一特性与微软的公共语言运行时提供的较为类似,因此一般提到P/Invoke多数指微软的.NET实现方案。这一方案能够实现通过托管代码访问原生代码。使用P/Invoke可以通过CLR来控制DLL的加载,以及将非托管代码的数据类型转换为托管数据类型。 (zh) Platform Invocation Services, commonly referred to as P/Invoke, is a feature of Common Language Infrastructure implementations, like Microsoft's Common Language Runtime, that enables managed code to call native code. (en) |
rdfs:label | P/Invoke (fr) P/Invoke (ja) Platform Invocation Services (en) Platform Invocation Services (sv) 平台叫用服務 (zh) |
owl:sameAs | freebase:Platform Invocation Services wikidata:Platform Invocation Services dbpedia-fr:Platform Invocation Services dbpedia-ja:Platform Invocation Services dbpedia-sv:Platform Invocation Services dbpedia-zh:Platform Invocation Services https://global.dbpedia.org/id/2ZHAD |
prov:wasDerivedFrom | wikipedia-en:Platform_Invocation_Services?oldid=1114974790&ns=0 |
foaf:isPrimaryTopicOf | wikipedia-en:Platform_Invocation_Services |
is dbo:wikiPageDisambiguates of | dbr:Pis_(disambiguation) |
is dbo:wikiPageRedirects of | dbr:P/Invoke dbr:P/invoke dbr:PInvoke dbr:DllImport dbr:Pinvoke dbr:Platform/Invoke |
is dbo:wikiPageWikiLink of | dbr:Visual_J_Sharp dbr:J/Direct dbr:.NET_Framework dbr:Comparison_of_C_Sharp_and_Java dbr:Cosmos_(operating_system) dbr:Pis_(disambiguation) dbr:Java_Native_Access dbr:Java_Native_Interface dbr:Blittable_types dbr:Thunk dbr:Marshalling_(computer_science) dbr:Managed_Extensions_for_C++ dbr:Standard_Libraries_(CLI) dbr:P/Invoke dbr:P/invoke dbr:PInvoke dbr:DllImport dbr:Pinvoke dbr:Platform/Invoke |
is foaf:primaryTopic of | wikipedia-en:Platform_Invocation_Services |