• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 372
  • Last Modified:

formatmessage api

I have look everywhere on the internet for api functions. I have come across the following website
http://www.allapi.net/apilist/f.shtml

I have found the api I want to use.
Declare Function FormatMessage Lib "kernel32" Alias "FormatMessageA" (ByVal dwFlags As Long, lpSource As Any, ByVal dwMessageId As Long, ByVal dwLanguageId As Long, ByVal lpBuffer As String, ByVal nSize As Long, Arguments As Long) As Long

Unfortunately i will not work. According visual studio 2005  "as any" is not a valid declare statement.

How do I declare  lbSource in the above function.
I have seen that   on the website above  "as any" is used in many function. I have not come accross this in the programming I do. I only done it for a year.
Could you please also tell me where I can look up uptodate api functions

many thanks

Max
0
maxgall
Asked:
maxgall
1 Solution
 
AlexFMCommented:
http://www.pinvoke.net/default.aspx/kernel32/FormatMessage.html

This page shows FormatMessage declaration in C# and VB, C# sample code which can be easiy translated to VB, and alternative ways to get exception text without using of FormatMessage function.
0
 
maxgallAuthor Commented:
thanks vm
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now