Solved

formatmessage api

Posted on 2006-11-27
2
316 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
ID: 18018624
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
ID: 18020294
thanks vm
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …

910 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

16 Experts available now in Live!

Get 1:1 Help Now