Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

formatmessage api

Posted on 2006-11-27
2
Medium Priority
?
366 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 750 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

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

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

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 …
Since .Net 2.0, Visual Basic has made it easy to create a splash screen and set it via the "Splash Screen" drop down in the Project Properties.  A splash screen set in this manner is automatically created, displayed and closed by the framework itsel…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…

618 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