Click here to Skip to main content
15,886,137 members
Articles / General Programming / File

VB 9.0, C# 3.0 API Viewer

Rate me:
Please Sign up or sign in to vote.
4.35/5 (10 votes)
24 May 2012CPOL5 min read 79.9K   4.2K   42  
This is a remake of Pramod Kumar Sing's 2002 API Viewer.
Imports System.IO
Imports System.Runtime.InteropServices
Imports Microsoft.VisualBasic
Imports System.Threading

Namespace RSP
    Module FileHandling

        Public Const APISEPERATOR As String = " <@> "
        Public Const APISIZEOFARRAY As String = "SIZEOFARRAY"
        Public Const APILONG As String = "Long"
        Public Const APIINTEGER As String = "Integer"
        Public Const APISCOPE As String = "^^SCOPE^^ "
        Public Const APIPUBLIC As String = "Public "
        Public Const APIPRIVATE As String = "Private "
        Public Const APITYPE As String = "<StructLayout(LayoutKind.Sequential)> "
        Public Const APISTRING As String = "<MarshalAs(UnmanagedType.ByValTStr,SizeConst:=SIZEOFARRAY)>"
        Public Const APISTRUCT As String = "<MarshalAs(UnmanagedType.Struct)> ByRef "
        Public Const APIARRAY As String = "<MarshalAs(UnmanagedType.ByValArray,SizeConst:=SIZEOFARRAY)>"
        Public Const APIBYTEVB As String = "Byte"
        Public Const APIFLOATVB As String = "Double"
        Public Const APISTRVB As String = "String"
        Public Const APIANYVB As String = "Any"
        Public Const APISTRUCTUREVB As String = "Structure"
        Public Const APIBYREFVB As String = "ByRef"
        Public Const APIBYVALVB As String = "ByVal"

        Public Const APIDLLIMPORT As String = "<<DLLIMPORT>>"
        Public Const APIDLLIMPORTECSHARP As String = "[DllImport(<<DLLIMPORT>>)]"
        Public Const APITYPECSHARP As String = "[StructLayout(LayoutKind.Sequential)] "
        Public Const APISTRINGCSHARP As String = "[MarshalAs(UnmanagedType.ByValTStr,SizeConst:=SIZEOFARRAY)]"
        Public Const APISTRUCTCSHARP As String = "[MarshalAs(UnmanagedType.Struct)] ref "
        Public Const APIARRAYCSHARP As String = "[MarshalAs(UnmanagedType.ByValArray,SizeConst:=SIZEOFARRAY)]"
        Public Const APISTARTCSHARP As String = "static extern"
        Public Const APIPUBLICCSHARP As String = "public "
        Public Const APIPRIVATECSHARP As String = "private "
        Public Const APIINTEGERCSHARP As String = "int "
        Public Const APILONGCSHARP As String = "long "
        Public Const APIBYTECSHARP As String = "byte "
        Public Const APIFLOATCSHARP As String = "float "
        Public Const APISTRCSHARP As String = "string "
        Public Const APISTRUCTURECSHARP As String = "struct "
        Public Const APISTARTSCOPECSHARP As String = "{" + vbCrLf
        Public Const APIENDSCOPECSHARP As String = "}" + vbCrLf
        Public Const APIENDSTATEMENTCSHARP As String = ";" + vbCrLf
        Public Const APISEPERATORAS As String = " As "

        Public Const APISTARTCONST As String = "Const "
        Public Const APISTARTCOMMENT As String = "'"
        Public Const APISTARTTYPE As String = "Type "
        Public Const APIENDTYPE As String = "End Type"
        Public Const APISTARTDECLARE As String = "Declare "
        Public Const CMB_CONSTANTS As String = "Constants"
        Public Const CMB_TYPES As String = "Types"
        Public Const CMB_SUBS As String = "Subs"
        Public Const CMB_DECLARES As String = "Declares"

        Public Types As CTypes
        Public Constants As CConst
        Public Declares As CDeclare
        Public Torpedoes As CSubs
        Public frm As New frmViewer()

    End Module
End Namespace

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Retired
United States United States
I am currently retired.
I have no degree but I have some programming experience
when I was in college(Cobol, Pascal).

My accomplishments thus far are;
Best VB.Net article for January(2009)
Best VB.Net article for July(2009)

Comments and Discussions