If you would like to interface with VCPSSL.dll from VB.NET you must first create a bridge between VB.NET and VCPSSL.dll. The easiest way to create this bridge is to create an ActiveX Control. We outline how to accomplish this using Visual C++ 6.0: - Bring up Visual C++ 6.0 - Under the "File" menu, click "New" and then click the "Projects" tab - Highlight the "ATL COM Wizard" and enter the name of the project in the "Project name" edit box (for example type in "BridgeToVCPSSL"). Then click the "OK" button, which brings you to the next page of the Wizard - For the "Server Type" choose "Dynamic Link Library (DLL)" and also check the "Support MFC" checkbox. Then click the "Finish" button - At the next page of the Wizard simply click the "OK" button The above creates the project which we need to create our ActiveX control. To actually create the ActiveX control, follow these steps: - Under the "Insert" menu, click "New ATL Object", which will bring up the "ATL Object Wizard" - In the "Category" list highlight "Objects" and in the "Objects" list highlight "Simple Object" and then click the "Next" button - At the "ATL Object Wizard Properties" dialog, in the "Short Name" edit box type in "MyActiveXBridge" and accept the defaults that the Wizard fills in for you. Click the "OK" button The above steps has created an ActiveX control. We now want to link to VCPSSL. This can be accomplished as follows: - Copy VCPSSLImports.h, VCPSSL.dll, and VCPSSL.lib into the project folder - Under the "Projects" menu, click "Settings", and then click the "Link" tab - In the "Object/Library Modules" edit box, type in VCPSSL.lib and then click the "OK" button - In the "FileView" view (which is the left pane in Visual C++), right click "Header Files, click "Add Files to Folder" and then select "VCPSSLImports.h" - In file "StdAfx.h" add the line #include "VCPSSLImports.h" Currently our ActiveX control doesn't do anything. We want to create a function in the ActiveX control that will serve as a bridge from VB.NET to VCPSSL. In my example I will create a bridge from VB.NET to VCSCSIInquiry. Follow these steps: - In the "ClassView" view (which is the left pane in Visual C++), you will see a "lolipop" named "IMyActiveXBridge". Right click this and then click "Add Method" - In the "Method Name" edit box type in BridgeToInquiry - In the "Parameters" edit box type in [in] int nHA,[in] int nTid,[in] int nLun,[out] byte cArray[64] and then click the "OK" button - In "ClassView", under "CMyActiveXBridge", there should now be a function "BridgeToInquiry" function listed. Double click "BridgeToInquiry" to bring up the source code for that function - Add the line VCSCSIInquiry(nHA,nTid,nLun,cArray) One last step: before building your ActiveX control, copy the following files to the debug folder: VCPSSL.dll, VCPSSL.lib, STBVCBase.dll, STBVCBase.lib, ProtoLsi.dll, and ProtoLsi.lib NOW on to VB.NET and calling our "bridge function". Follow these steps: - In your VB.NET application, under the "Project" menu click "Add Reference" - Click the "COM" tab (this can take awhile - 20 seconds on my system) - Scroll down until you see "BridgeToVCPSSL 1.0 Type Library", highlight it, and then click the "Select" button followed by the "OK" button. The above 3 steps made your VB.NET application aware of our new ActiveX control. To call our bridge function in the ActiveX control add the following lines of code: Dim InquiryArray(64) As Byte Dim objBridge As BRIDGETOVCPSSLLib.IMyActiveXBridge Dim nHA As Integer Dim nTid As Integer Dim nLun As Integer 'Replace the below values to your needs nHA = 2 nTid = 5 nLun = 0 objBridge1.BridgeToInquiry(nHA,nTid,nLun, InquiryArray) Whew that was alot to do but we hope the tutorial was helpful and illustrates how one would go about adding a bridge function for our other functions in VCPSSL.