Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem in adding ehlapi.dll reference in VB.NET

Status
Not open for further replies.

smitha10

Technical User
May 20, 2009
2
0
0
IN
Hi

I'm working on a project where we capture the mainframe screens using attachmate EXTRA. So i ve a free version of EXTRA.

I have added extra.tlb as reference in my project but when i try to add any dll within EXTRA then it throws an error saying
"Please make sure that the file is accessible and that it is a valid assembly or COM component."

Does extra.tlb contain all the functions present in DLL's?
could you please help me resolve dis problem?
 
The COM component should be able to do everything that's possible with HLAPI plus have the added functionality of being able to manipulate the Extra and Session settings.

If you want to use ehlapi.dll, then you would call to it the same way you do for any unmanaged DLL (e.g. kernel32).

Code:
Imports System.Runtime.InteropServices

Public Module kernel32

  Private Const MAX_PATH As Integer = 260

  <DllImport("kernel32.dll", CharSet:=CharSet.Auto)> _
  Private Function GetShortPathName( _
    ByVal lpszLongPath As String, _
    ByVal lpszShortPath As Text.StringBuilder, _
    ByVal cchBuffer As Integer) As Integer
  End Function

  Public Function GetShortPathName(ByVal longPath As String) As String
    Dim shortPath As New Text.StringBuilder(MAX_PATH)
    If GetShortPathName(longPath, shortPath, shortPath.Capacity) = 0 Then
      Throw New Kernel32Exception("Unable to GetShortPathName for " & longPath & ", the file or folder may not exist.")
    End If
    Return shortPath.ToString
  End Function

End Module
 
Hi,

Thanks a lot. I have a new problem now. Is there any function in attachmate EXTRA! to get the total field count of the screen or to get only the unprotected fields?

Also I would like to know how to get the unique screen identifier of a screen.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top