Solved

formatmessage api

Posted on 2006-11-27
2
309 Views
Last Modified: 2008-02-01
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
Comment
Question by:maxgall
2 Comments
 
LVL 48

Accepted Solution

by:
AlexFM earned 250 total points
Comment Utility
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
 

Author Comment

by:maxgall
Comment Utility
thanks vm
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now