[
  uuid(DEADBEEF-E37F-11D2-8A2C-444553540000),
  version(1.0),
  helpstring("TypeLibrary by Wpsjr1@syix.com")
]
library FastString
{
    [
      dllname("oleaut32"),
      helpstring("FastString Manipulation")
    ]
    module StringLib {
        [helpstring("This function allocates a new string, copies cch characters from the passed string into it, and then appends a null character."), entry("SysAllocStringLen")]
        BSTR _stdcall SysAllocStringLen(
                        [in] void* pch, 
                        [in] int cch);

        [helpstring(" "), entry("SysAllocStringByteLen")]
        BSTR _stdcall SysAllocStringLenBstr(
                        [in] BSTR pch, 
                        [in] long cch);

	    [helpstring(" "), entry("SysAllocStringByteLen")]
        long _stdcall SysAllocStringLenPtr(
                        [in] void* pch, 
                        [in] long cch);
    };

    [
      dllname("kernel32"),
      helpstring("Unicode Conversion")
    ]
    module WideChar {
        [entry("WideCharToMultiByte"), helpstring("Convert a unicode string to ansi")]
        long _stdcall WideCharToMultiByte(
                        [in] long CodePage, 
                        [in] long dwFlags, 
                        [in] BSTR lpWideCharStr, 
                        [in] long cchWideChar, 
                        [out] void* lpMultiByteStr, 
                        [in] long cchMultiByte, 
                        [in] long lpDefaultChar, 
                        [in] long lpUsedDefaultChar);

		[entry("WideCharToMultiByte"), helpstring("Convert a unicode string to ansi")]
        long _stdcall WideCharToMultiByteLng(
                        [in] long CodePage, 
                        [in] long dwFlags, 
                        [in] void* lpWideCharStr, 
                        [in] long cchWideChar, 
                        [out] void* lpMultiByteStr, 
                        [in] long cchMultiByte, 
                        [in] long lpDefaultChar, 
                        [in] long lpUsedDefaultChar);

		[entry("MultiByteToWideChar"), helpstring("Convert a unicode string to ansi")]
        long _stdcall MultiByteToWideCharLng(
                        [in] long CodePage, 
                        [in] long dwFlags, 
                        [in] void* lpMultiByteStr, 
                        [in] long cchMultiByte, 
                        [out] void* lpWideCharStr, 
                        [in] long cchWideChar);
	};

    [
      dllname("kernel32"),
      helpstring("Kernel Functions")
    ]
    module Kernel {
        [entry("RtlMoveMemory"), helpstring("Copy Memory from one place to another, defaults to 4 bytes")]
        void _stdcall RtlMoveMemory(
                        [in] void* dst, 
                        [in] void* src, 
                        [in] long qty);

        [entry("RtlFillMemory"), helpstring("Copy Memory from one place to another, defaults to 4 bytes")]
        void _stdcall RtlFillMemoryAnsiStr(
                        [in] lpstr dst, 
                        [in] long dwQty, 
                        [in] unsigned char dbNumber);

		[entry("lstrcpynW"), helpstring(" ")]
        void _stdcall lstrcpynWStr(
                        [in] void* dst, 
                        [in] BSTR src, 
                        [in] long dwNumChars);

		[entry("lstrcmpiW"), helpstring(" ")]
        long _stdcall lstrcmpiWBStr(
                        [in] BSTR dst, 
                        [in] BSTR src);

		[entry("CompareStringW"), helpstring(" ")]
		long _stdcall CompareStringW(
						[in] long LCID,
						[in] long dwCmpFlags,
						[in] BSTR lpString1,
						[in] long cchCount,
						[in] BSTR lpSring2,
						[in] long cchCount2);
 
    };

	[
		dllname("ntdll"),
		helpstring("NT Functions")
	]
	module ntdll {
		[entry("RtlFillMemoryUlong"), helpstring("Fill Memory 4 bytes at a time.")]
        void _stdcall RtlFillMemoryUlong(
                        [in] void* dst, 
                        [in] long dwQty, 
                        [in] long dwNumber);

	};

	[
		dllname("msvbvm50"),
		helpstring("VB5 Functions")
	]
	module VB5 {
		[entry("__vbaCopyBytes"), helpstring("Copy a given number of bytes from source to destination.")]
		void _stdcall vbaCopyBytesStr(
						[in] long dwNumBytes,
						[in] void* dst,
						[in] BSTR src);

		[entry("__vbaCopyBytes"), helpstring("Copy a given number of bytes from source to destination.")]
		void _stdcall vbaCopyBytes(
						[in] long dwNumBytes,
						[in] void* dst,
						[in] void* src);

	  [entry("VarPtr")]
      long _stdcall VarPtrStringArray([in] SAFEARRAY (BSTR) *Ptr);

	  [entry("VarPtr")]
      long _stdcall VarPtrLongArray([in] SAFEARRAY (long) *Ptr);

	};

	[
		dllname("msvbvm60"),
		helpstring("VB5 Functions")
	]
	module VB6 {
		[entry("__vbaCopyBytes"), helpstring("Copy a given number of bytes from source to destination.")]
		void _stdcall vbaCopyBytesStr(
						[in] long dwNumBytes,
						[in] void* dst,
						[in] BSTR src);

		[entry("__vbaCopyBytes"), helpstring("Copy a given number of bytes from source to destination.")]
		void _stdcall vbaCopyBytes(
						[in] long dwNumBytes,
						[in] void* dst,
						[in] void* src);


	  [entry("VarPtr")]
      long _stdcall VarPtrStringArray([in] SAFEARRAY (BSTR) *Ptr);

	  [entry("VarPtr")]
      long _stdcall VarPtrLongArray([in] SAFEARRAY (long) *Ptr);
	};
};