|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
VB6 to VB.NET dllsPublic Declare Function WaitForSingleObject Lib "kernel32" _ (ByVal hHandle As Long, _ ByVal dwMilliseconds As Long) As Long Private Declare Function CloseHandle Lib "kernel32" _ (ByVal hObject As Long) As Long Public Declare Function FindWindow Lib "user32" _ Alias "FindWindowA" _ (ByVal lpClassName As String, _ ByVal lpWindowName As String) As Long Public Declare Function PostMessage Lib "user32" _ Alias "PostMessageA" _ (ByVal hwnd As Long, _ ByVal wMsg As Long, _ ByVal wParam As Long, _ ByVal lParam As Long) As Long Public Declare Function IsWindow Lib "user32" _ (ByVal hwnd As Long) As Long Public Declare Function OpenProcess Lib "kernel32" _ (ByVal dwDesiredAccess As Long, _ ByVal bInheritHandle As Long, _ ByVal dwProcessId As Long) As Long Public Declare Function GetWindowThreadProcessId Lib "user32" _ (ByVal hwnd As Long, _ lpdwProcessId As Long) As Long In article <41ABC346-CC3B-4303-AA01-5F2BC1A2C***@microsoft.com>, Cutlass wrote:
> What is the proper VB.NET way to declare these VB6 dlls? Public Declare Function WaitForSingleObject Lib "kernel32" _> > Public Declare Function WaitForSingleObject Lib "kernel32" _ > (ByVal hHandle As Long, _ > ByVal dwMilliseconds As Long) As Long (ByVal hHandle As System.IntPtr, _ ByVal dwMilliseconds As Integer) As Integer > Private Declare Function CloseHandle Lib "kernel32" _ Private Declare Function CloseHandle Lib "kernel32" _> (ByVal hObject As Long) As Long (ByVal hObject As System.IntPtr) As Boolean > Public Declare Function FindWindow Lib "user32" _ Public Auto Declare Function FindWindow Lib "user32" _> Alias "FindWindowA" _ > (ByVal lpClassName As String, _ > ByVal lpWindowName As String) As Long (ByVal lpClassName As String, _ ByVal lpWindowName As String) As System.IntPtr > Public Declare Function PostMessage Lib "user32" _ Public Declare Auto Function PostMessage Lib "user32" _> Alias "PostMessageA" _ > (ByVal hwnd As Long, _ > ByVal wMsg As Long, _ > ByVal wParam As Long, _ > ByVal lParam As Long) As Long (ByVal hWnd As System.IntPtr, _ ByVal wMsg As Integer, _ ByVal wParam As Integer, _ ByVal lParam As Integer) As Boolean > Public Declare Function IsWindow Lib "user32" _ Public Declare Function IsWindow Lib "user32" _> (ByVal hwnd As Long) As Long (ByVal hWnd As System.IntPtr) As Boolean > Public Declare Function OpenProcess Lib "kernel32" _ Public Declare Function OpenProcess Lib "kernel32" _> (ByVal dwDesiredAccess As Long, _ > ByVal bInheritHandle As Long, _ > ByVal dwProcessId As Long) As Long (ByVal dwDesiredAccess As Integer, _ ByVal bInheritHandle As Boolean, _ ByVal dwProcessId As System.IntPtr) As System.IntPtr > Public Declare Function GetWindowThreadProcessId Lib "user32" _ Public Declare Function GetWindowThreadProcessId Lib "user32" _> (ByVal hwnd As Long, _ > lpdwProcessId As Long) As Long > (ByVal hWnd As System.IntPtr, _ ByRef lpdwProcessId As System.IntPtr) As System.IntPtr -- Tom Shelton [MVP] Can't you just add them as references and act upon them once instantiated?
Show quoteHide quote "Tom Shelton" <t**@YOUKNOWTHEDRILLmtogden.com> wrote in message news:uBAWGZJMFHA.4080@TK2MSFTNGP09.phx.gbl... > In article <41ABC346-CC3B-4303-AA01-5F2BC1A2C***@microsoft.com>, Cutlass > wrote: >> What is the proper VB.NET way to declare these VB6 dlls? >> >> Public Declare Function WaitForSingleObject Lib "kernel32" _ >> (ByVal hHandle As Long, _ >> ByVal dwMilliseconds As Long) As Long > > > Public Declare Function WaitForSingleObject Lib "kernel32" _ > (ByVal hHandle As System.IntPtr, _ > ByVal dwMilliseconds As Integer) As Integer > >> Private Declare Function CloseHandle Lib "kernel32" _ >> (ByVal hObject As Long) As Long > > Private Declare Function CloseHandle Lib "kernel32" _ > (ByVal hObject As System.IntPtr) As Boolean > >> Public Declare Function FindWindow Lib "user32" _ >> Alias "FindWindowA" _ >> (ByVal lpClassName As String, _ >> ByVal lpWindowName As String) As Long > > Public Auto Declare Function FindWindow Lib "user32" _ > (ByVal lpClassName As String, _ > ByVal lpWindowName As String) As System.IntPtr > >> Public Declare Function PostMessage Lib "user32" _ >> Alias "PostMessageA" _ >> (ByVal hwnd As Long, _ >> ByVal wMsg As Long, _ >> ByVal wParam As Long, _ >> ByVal lParam As Long) As Long > > Public Declare Auto Function PostMessage Lib "user32" _ > (ByVal hWnd As System.IntPtr, _ > ByVal wMsg As Integer, _ > ByVal wParam As Integer, _ > ByVal lParam As Integer) As Boolean > >> Public Declare Function IsWindow Lib "user32" _ >> (ByVal hwnd As Long) As Long > > Public Declare Function IsWindow Lib "user32" _ > (ByVal hWnd As System.IntPtr) As Boolean > >> Public Declare Function OpenProcess Lib "kernel32" _ >> (ByVal dwDesiredAccess As Long, _ >> ByVal bInheritHandle As Long, _ >> ByVal dwProcessId As Long) As Long > > Public Declare Function OpenProcess Lib "kernel32" _ > (ByVal dwDesiredAccess As Integer, _ > ByVal bInheritHandle As Boolean, _ > ByVal dwProcessId As System.IntPtr) As System.IntPtr > >> Public Declare Function GetWindowThreadProcessId Lib "user32" _ >> (ByVal hwnd As Long, _ >> lpdwProcessId As Long) As Long >> > > Public Declare Function GetWindowThreadProcessId Lib "user32" _ > (ByVal hWnd As System.IntPtr, _ > ByRef lpdwProcessId As System.IntPtr) As System.IntPtr > > -- > Tom Shelton [MVP]
Anyone tried REALbasic?
ArrayList Strongly Typed VB6 easier than VB.NET? Datagrid colum sorting problem - URGENT How to implement ComboBox.FindValue HELP! Cannot start NEW project vb.net dll Windows Form DataGrid - Need A Color Border Around Only The Selected Row - Will GDI Be Required Cookies working on intranet but NOT working on Internet Can forms be imported from MS Access? |
|||||||||||||||||||||||