Differences
This shows you the differences between the selected revisions of the page.
2018-11-22 | 2018-11-22 | ||
grammar (martin) (hidden) | Restored revision 1541773427. Undoing revisions 1542880632, 1542880747. (martin) (hidden) | ||
Line 67: | Line 67: | ||
===== [[registering]] Registering for COM ===== | ===== [[registering]] Registering for COM ===== | ||
- | WinSCP .NET assembly exposes its full interface to COM. As a %%COM%% library, it needs to be registered before use. If you are going to use the %%COM%% interface, register the assembly using the command below. You do **not** need to register the assembly, if you are going to use it directly as a .NET assembly, e.g. from C#, VB.NET or [[library_powershell|PowerShell]]. | + | WinSCP .NET assembly exposes its full interface to COM. As a %%COM%% library, it needs to be registered before use. If you are going to use the %%COM%% interface, register the assembly using command below. You do **not** need to register the assembly, if you are going to use it directly as a .NET assembly, e.g. from C#, VB.NET or [[library_powershell|PowerShell]]. |
<code> | <code> | ||
%WINDIR%\Microsoft.NET\Framework\<version>\RegAsm.exe WinSCPnet.dll /codebase /tlb | %WINDIR%\Microsoft.NET\Framework\<version>\RegAsm.exe WinSCPnet.dll /codebase /tlb | ||
</code> | </code> | ||
- | Where the ''%WINDIR%'' is the path to your Windows installation, what is typically ''C:\Windows'' or ''C:\WINNT''. Note that you can keep ''%WINDIR%'' as this environment variable should be set on your system to point to the Windows folder. On Windows Vista and older, &winvista the ''Framework'' needs to be replaced by ''Framework64'' to register the assembly for use from 64-bit &win64 applications.((On 64-bit systems, running Windows Vista and older, you should generally register the assembly both for 32-bit (such as old versions of [[library_vb|Microsoft Excel]]) and 64-bit applications. On Windows 7 and newer, registration is [[https://docs.microsoft.com/en-us/windows/desktop/winprog64/shared-registry-keys#redirected-shared-and-reflected-keys-under-wow64|shared for 32-bit and 64-bit applications]].)) The ''<version>'' is the version of .NET framework to register the assembly with. It is recommended to use the latest available, what currently is ''v4.0.30319''. You may however use any framework version from 2.0 (''v2.0.50727'') up. Note that framework 3.0 and 3.5 do not ship with ''RegAsm.exe''. For these versions use ''RegAsm.exe'' from 2.0. | + | Where the ''%WINDIR%'' is path to your Windows installation, what is typically ''C:\Windows'' or ''C:\WINNT''. Note that you can keep ''%WINDIR%'' as this environment variable should be set on your system to point to the Windows folder. The ''Framework'' needs to be replaced by ''Framework64'' to register the assembly for use from 64-bit &win64 applications.((What is obviously available on 64-bit systems only.)) On 64-bit systems, you should generally register the assembly both for 32-bit (such as old versions of [[library_vb|Microsoft Excel]]) and 64-bit applications. The ''<version>'' is version of .NET framework to register the assembly with. It is recommended to use the latest available, what currently is ''v4.0.30319''. You may however use any framework version from 2.0 (''v2.0.50727'') up. Note that framework 3.0 and 3.5 do not ship with ''RegAsm.exe''. For these versions use ''RegAsm.exe'' from 2.0. |
- | A typical registration command for .NET 4.0 is: | + | Typical registration commands for .NET 4.0 on 64-bit system would be: |
<code> | <code> | ||
- | %WINDIR%\Microsoft.NET\Framework\v4.0.30319\RegAsm.exe WinSCPnet.dll /codebase /tlb | + | %WINDIR%\Microsoft.NET\Framework\v4.0.30319\RegAsm.exe WinSCPnet.dll /codebase /tlb:WinSCPnet32.tlb |
+ | %WINDIR%\Microsoft.NET\Framework64\v4.0.30319\RegAsm.exe WinSCPnet.dll /codebase /tlb:WinSCPnet64.tlb | ||
</code> | </code> | ||
- | The above examples assume that ''WinSCPnet.dll'' is in the current working directory. Otherwise you need to specify an absolute path to the ''.dll''. | + | The above examples assume that ''WinSCPnet.dll'' is in current working directory. Otherwise you need to specify an absolute path to the ''.dll''. |
==== [[side-by-side]] Side-by-Side Registration ==== | ==== [[side-by-side]] Side-by-Side Registration ==== |