home *** CD-ROM | disk | FTP | other *** search
/ ftp.tcs3.com / ftp.tcs3.com.tar / ftp.tcs3.com / DRIVERS / Audio / Office2010 / InfoPath.en-us / InfLR.cab / FL_CallAWindowsAPI_snippet_142745_ENU____.3643236F_FC70_11D3_A536_0090278A1BB8 < prev    next >
Extensible Markup Language  |  2008-06-12  |  2KB  |  50 lines

  1. ∩╗┐<?xml version="1.0" encoding="UTF-8"?>
  2. <CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
  3.   <CodeSnippet Format="1.0.0">
  4.     <Header>
  5.       <Title>Define a Function to Call a Windows API</Title>
  6.       <Author>Microsoft Corporation</Author>
  7.       <Description>Defines a function to call a Windows API.</Description>
  8.       <Keywords>
  9.           <Keyword>pinvoke</Keyword>
  10.           <Keyword>declare</Keyword>
  11.           <Keyword>win32</Keyword>
  12.       </Keywords>
  13.       <Shortcut>WinApi</Shortcut>
  14.     </Header>
  15.     <Snippet>
  16.       <Imports>
  17.         <Import>
  18.           <Namespace>Microsoft.VisualBasic</Namespace>
  19.         </Import>
  20.       </Imports>
  21.       <Declarations>
  22.         <Literal>
  23.           <ID>dllName</ID>
  24.           <Type />
  25.           <ToolTip>Replace with the name of the .dll file that contains the API method.</ToolTip>
  26.           <Default>"user32.dll"</Default>
  27.         </Literal>
  28.         <Literal>
  29.           <ID>apiName</ID>
  30.           <Type />
  31.           <ToolTip>Replace with the name of the method in the .dll file.</ToolTip>
  32.           <Default>"MessageBox"</Default>
  33.         </Literal>
  34.         <Literal>
  35.           <ID>parameters</ID>
  36.           <Type />
  37.           <ToolTip>Replace with the parameters as declared in the .dll file.</ToolTip>
  38.           <Default>ByVal hWnd As Integer, ByVal txt As String, ByVal caption As String, ByVal Type As Integer</Default>
  39.         </Literal>
  40.         <Literal>
  41.           <ID>matchingCall</ID>
  42.           <Type />
  43.           <ToolTip>Replace with the name you want to call from your project.</ToolTip>
  44.           <Default>Win32MessageBox</Default>
  45.         </Literal>
  46.       </Declarations>
  47.       <Code Language="VB" Kind="method decl"><![CDATA[Declare Function $matchingCall$ Lib $dllName$ Alias $apiName$ ($parameters$) As Integer]]></Code>
  48.     </Snippet>
  49.   </CodeSnippet>
  50. </CodeSnippets>