Solved

formatmessage api

Posted on 2006-11-27
2
343 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Introduction As chip makers focus on adding processor cores over increasing clock speed, developers need to utilize the features of modern CPUs.  One of the ways we can do this is by implementing parallel algorithms in our software.   One recent…
Introduction When many people think of the WebBrowser (http://msdn.microsoft.com/en-us/library/2te2y1x6%28v=VS.85%29.aspx) control, they immediately think of a control which allows the viewing and navigation of web pages. While this is true, it's a…
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…

717 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