I get the error: 'The specified procedure could not be found.' Anyone know why?
I get the error to the call of the function MapViewOfFile():
Private Const FILE_MAP_ALL_ACCESS As Integer = &H1 Or &H2 Or &H4 Or &H8
Or &H10 Or &HF0000
Private Declare Auto Function MapViewOfFile Lib "kernel32" ( _
ByVal hFileMappingObject As IntPtr, _
ByVal dwDesiredAccess As Integer, _
ByVal dwFileOffsetHigh As Integer, _
ByVal dwFileOffsetLow As Integer, _
ByVal dwNumberOfBytesToMap As Integer) As Integer
Function SendCommand(ByVal hwnd As IntPtr, ByVal command As String) As
Boolean
Dim hMapFile As IntPtr
Dim mData As String
Dim result As Boolean = False
Dim errorMessage As String
hMapFile = CreateFileMapping(INVALID_HANDLE_VALUE, 0,
PAGE_READWRITE, 0, 4096, "mIRC")
mData = MapViewOfFile(hMapFile, FILE_MAP_ALL_ACCESS, 0, 0, 0).ToString
errorMessage = New Win32Exception(Marshal.GetLastWin32Error()).Messag e
wsprintf(mData, command)
SendMessage(hwnd, WM_MCOMMAND, vbNull, vbNullString)
If mData = "1" Then
result = True
End If
UnmapViewOfFile(mData)
CloseHandle(hMapFile)
Return result
End Function