' ########################################################################################
' Microsoft Windows
' File: D3DX10Async.inc
' Contents: D3DX10 Asynchronous Effect / Shader loaders / compilers
' Copyright (c) 2011 Jos? Roca
' Portions Copyright (c) Microsoft Corporation.
' All Rights Reserved.
' THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
' EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
' MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
' ########################################################################################
#IF NOT %DEF(PBX_d3dx10async_PBI)
#DEFINE PBX_d3dx10async_PBI
%EQUATE `D3DX10ASYNC_INC = 1
#INCLUDE ONCE "Legacy/Graphics/D3DX10.inc"
'//----------------------------------------------------------------------------
'// D3DX10Compile:
'// ------------------
'// Compiles an effect or shader.
'//
'// Parameters:
'// pSrcFile
'// Source file name.
'// hSrcModule
'// Module handle. if NULL, current module will be used.
'// pSrcResource
'// Resource name in module.
'// pSrcData
'// Pointer to source code.
'// SrcDataLen
'// Size of source code, in bytes.
'// pDefines
'// Optional NULL-terminated array of preprocessor macro definitions.
'// pInclude
'// Optional interface pointer to use for handling #include directives.
'// If this parameter is NULL, #includes will be honored when compiling
'// from file, and will error when compiling from resource or memory.
'// pFunctionName
'// Name of the entrypoint function where execution should begin.
'// pProfile
'// Instruction set to be used when generating code. Currently supported
'// profiles are "vs_1_1", "vs_2_0", "vs_2_a", "vs_2_sw", "ps_2_0",
'// "ps_2_a", "ps_2_sw", "tx_1_0"
'// Flags1
'// See D3D10_SHADER_xxx flags.
'// Flags2
'// See D3D10_EFFECT_xxx flags.
'// ppShader
'// Returns a buffer containing the created shader. This buffer contains
'// the compiled shader code, as well as any embedded debug and symbol
'// table info. (See D3D10GetShaderConstantTable)
'// ppErrorMsgs
'// Returns a buffer containing a listing of errors and warnings that were
'// encountered during the compile. If you are running in a debugger,
'// these are the same messages you will see in your debug output.
'// pHResult
'// Pointer to a memory location to receive the return value upon completion.
'// Maybe NULL if not needed.
'// If pPump != NULL, pHResult must be a valid memory location until the
'// the asynchronous execution completes.
'//----------------------------------------------------------------------------
DECLARE FUNCTION D3DX10CompileFromFileA IMPORT $D3DX10_DLLNAME ALIAS "D3DX10CompileFromFileA" ( BYREF pSrcFile AS ASCIIZ , BYREF pDefines AS D3D10_SHADER_MACRO , BYVAL pInclude AS IUnknown , BYREF pFunctionName AS ASCIIZ , BYREF pProfile AS ASCIIZ , BYVAL Flags1 AS QUAD , BYVAL Flags2 AS QUAD , BYVAL pPump AS ID3DX10ThreadPump , BYREF ppShader AS ID3D10Blob , BYREF ppErrorMsgs AS ID3D10Blob , BYREF pHResult AS LONG ) AS LONG
DECLARE FUNCTION D3DX10CompileFromFileW IMPORT $D3DX10_DLLNAME ALIAS "D3DX10CompileFromFileW" ( BYREF pSrcFile AS WSTRINGZ
 , BYREF pDefines AS D3D10_SHADER_MACRO
 , BYVAL pInclude AS IUnknown
 , BYREF pFunctionName AS ASCIIZ
 , BYREF pProfile AS ASCIIZ
 , BYVAL Flags1 AS DWORD
 , BYVAL Flags2 AS DWORD
 , BYVAL pPump AS ID3DX10ThreadPump
 , BYREF ppShader AS ID3D10Blob
 , BYREF ppErrorMsgs AS ID3D10Blob
 , BYREF pHResult AS LONG
 ) AS LONG
#IF %DEF(%UNICODE)
 MACRO D3DX10CompileFromFile = D3DX10CompileFromFileW
#ELSE
 MACRO D3DX10CompileFromFile = D3DX10CompileFromFileA
#ENDIF
DECLARE FUNCTION D3DX10CompileFromResourceA IMPORT $D3DX10_DLLNAME ALIAS "D3DX10CompileFromResourceA" ( BYVAL hSrcModule AS QUAD , BYREF pSrcResource AS ASCIIZ , BYREF pSrcFileName AS ASCIIZ , BYREF pDefines AS D3D10_SHADER_MACRO , BYVAL pInclude AS IUnknown , BYREF pFunctionName AS ASCIIZ , BYREF pProfile AS ASCIIZ , BYVAL Flags1 AS QUAD , BYVAL Flags2 AS QUAD , BYVAL pPump AS ID3DX10ThreadPump , BYREF ppShader AS ID3D10Blob , BYVAL ppErrorMsgs AS ID3D10Blob , BYREF pHResult AS LONG ) AS LONG
DECLARE FUNCTION D3DX10CompileFromResourceW IMPORT $D3DX10_DLLNAME ALIAS "D3DX10CompileFromResourceW" ( BYVAL hSrcModule AS QUAD
 , BYREF pSrcResource AS WSTRINGZ
 , BYREF pSrcFileName AS WSTRINGZ
 , BYREF pDefines AS D3D10_SHADER_MACRO
 , BYVAL pInclude AS IUnknown
 , BYREF pFunctionName AS ASCIIZ
 , BYREF pProfile AS ASCIIZ
 , BYVAL Flags1 AS DWORD
 , BYVAL Flags2 AS DWORD
 , BYVAL pPump AS ID3DX10ThreadPump
 , BYREF ppShader AS ID3D10Blob
 , BYVAL ppErrorMsgs AS ID3D10Blob
 , BYREF pHResult AS LONG
 ) AS LONG
#IF %DEF(%UNICODE)
 MACRO D3DX10CompileFromResource = D3DX10CompileFromResourceW
#ELSE
 MACRO D3DX10CompileFromResource = D3DX10CompileFromResourceA
#ENDIF
DECLARE FUNCTION D3DX10CompileFromMemory IMPORT $D3DX10_DLLNAME ALIAS "D3DX10CompileFromMemory" ( BYREF pSrcData AS ASCIIZ , BYVAL SrcDataLen AS QUAD , BYREF pFileName AS ASCIIZ , BYREF pDefines AS D3D10_SHADER_MACRO , BYVAL pInclude AS IUnknown , BYREF pFunctionName AS ASCIIZ , BYREF pProfile AS ASCIIZ , BYVAL Flags1 AS QUAD , BYVAL Flags2 AS QUAD , BYVAL pPump AS ID3DX10ThreadPump , BYREF ppShader AS ID3D10Blob , BYVAL ppErrorMsgs AS ID3D10Blob , BYREF pHResult AS LONG ) AS LONG
'//----------------------------------------------------------------------------
'// D3DX10CreateEffectFromXXXX:
'// --------------------------
'// Creates an effect from a binary effect or file
'//
'// Parameters:
'//
'// [in]
'//
'//
'// pFileName
'// Name of the ASCII (uncompiled) or binary (compiled) Effect file to load
'//
'// hModule
'// Handle to the module containing the resource to compile from
'// pResourceName
'// Name of the resource within hModule to compile from
'//
'// pData
'// Blob of effect data, either ASCII (uncompiled) or binary (compiled)
'// DataLength
'// Length of the data blob
'//
'// pDefines
'// Optional NULL-terminated array of preprocessor macro definitions.
'// pInclude
'// Optional interface pointer to use for handling #include directives.
'// If this parameter is NULL, #includes will be honored when compiling
'// from file, and will error when compiling from resource or memory.
'// pProfile
'// Profile to use when compiling the effect.
'// HLSLFlags
'// Compilation flags pertaining to shaders and data types, honored by
'// the HLSL compiler
'// FXFlags
'// Compilation flags pertaining to Effect compilation, honored
'// by the Effect compiler
'// pDevice
'// Pointer to the D3D10 device on which to create Effect resources
'// pEffectPool
'// Pointer to an Effect pool to share variables with or NULL
'//
'// [out]
'//
'// ppEffect
'// Address of the newly created Effect interface
'// ppEffectPool
'// Address of the newly created Effect pool interface
'// ppErrors
'// If non-NULL, address of a buffer with error messages that occurred
'// during parsing or compilation
'// pHResult
'// Pointer to a memory location to receive the return value upon completion.
'// Maybe NULL if not needed.
'// If pPump != NULL, pHResult must be a valid memory location until the
'// the asynchronous execution completes.
'//----------------------------------------------------------------------------
DECLARE FUNCTION D3DX10CreateEffectFromFileA IMPORT $D3DX10_DLLNAME ALIAS "D3DX10CreateEffectFromFileA" ( BYREF pFileName AS ASCIIZ , BYREF pDefines AS D3D10_SHADER_MACRO , BYVAL pInclude AS IUnknown , BYREF pProfile AS ASCIIZ , BYVAL HLSLFlags AS QUAD , BYVAL FXFlags AS QUAD , BYVAL pDevice AS ID3D10Device , BYVAL pEffectPool AS ID3D10EffectPool , BYVAL pPump AS ID3DX10ThreadPump , BYREF ppEffect AS ID3D10Effect , BYREF ppErrors AS ID3D10Blob , BYREF pHResult AS LONG ) AS LONG
DECLARE FUNCTION D3DX10CreateEffectFromFileW IMPORT $D3DX10_DLLNAME ALIAS "D3DX10CreateEffectFromFileW" ( BYREF pFileName AS WSTRINGZ
 , BYREF pDefines AS D3D10_SHADER_MACRO
 , BYVAL pInclude AS IUnknown
 , BYREF pProfile AS ASCIIZ
 , BYVAL HLSLFlags AS DWORD
 , BYVAL FXFlags AS DWORD
 , BYVAL pDevice AS ID3D10Device
 , BYVAL pEffectPool AS ID3D10EffectPool
 , BYVAL pPump AS ID3DX10ThreadPump
 , BYREF ppEffect AS ID3D10Effect
 , BYREF ppErrors AS ID3D10Blob
 , BYREF pHResult AS LONG
 ) AS LONG
#IF %DEF(%UNICODE)
 MACRO D3DX10CreateEffectFromFile = D3DX10CreateEffectFromFileW
#ELSE
 MACRO D3DX10CreateEffectFromFile = D3DX10CreateEffectFromFileA
#ENDIF
DECLARE FUNCTION D3DX10CreateEffectFromMemory IMPORT $D3DX10_DLLNAME ALIAS "D3DX10CreateEffectFromMemory" ( BYVAL pData AS QUAD , BYVAL DataLength AS QUAD , BYREF pSrcFileName AS ASCIIZ , BYREF pDefines AS D3D10_SHADER_MACRO , BYVAL pInclude AS IUnknown , BYREF pProfile AS ASCIIZ , BYVAL HLSLFlags AS QUAD , BYVAL FXFlags AS QUAD , BYVAL pDevice AS ID3D10Device , BYVAL pEffectPool AS ID3D10EffectPool , BYVAL pPump AS ID3DX10ThreadPump , BYREF ppEffect AS ID3D10Effect , BYREF ppErrors AS ID3D10Blob , BYREF pHResult AS LONG ) AS LONG
DECLARE FUNCTION D3DX10CreateEffectFromResourceA IMPORT $D3DX10_DLLNAME ALIAS "D3DX10CreateEffectFromResourceA" ( BYVAL hModule AS QUAD
 , BYREF pResourceName AS ASCIIZ
 , BYREF pSrcFileName AS ASCIIZ
 , BYREF pDefines AS D3D10_SHADER_MACRO
 , BYVAL pInclude AS IUnknown
 , BYREF pProfile AS ASCIIZ
 , BYVAL HLSLFlags AS DWORD
 , BYVAL FXFlags AS DWORD
 , BYVAL pDevice AS ID3D10Device
 , BYVAL pEffectPool AS ID3D10EffectPool
 , BYVAL pPump AS ID3DX10ThreadPump
 , BYREF ppEffect AS ID3D10Effect
 , BYREF ppErrors AS ID3D10Blob
 , BYREF pHResult AS LONG
 ) AS LONG
DECLARE FUNCTION D3DX10CreateEffectFromResourceW IMPORT $D3DX10_DLLNAME ALIAS "D3DX10CreateEffectFromResourceW" ( BYVAL hModule AS DWORD
 , BYREF pResourceName AS WSTRINGZ
 , BYREF pSrcFileName AS WSTRINGZ
 , BYREF pDefines AS D3D10_SHADER_MACRO
 , BYVAL pInclude AS IUnknown
 , BYREF pProfile AS ASCIIZ
 , BYVAL HLSLFlags AS DWORD
 , BYVAL FXFlags AS DWORD
 , BYVAL pDevice AS ID3D10Device
 , BYVAL pEffectPool AS ID3D10EffectPool
 , BYVAL pPump AS ID3DX10ThreadPump
 , BYREF ppEffect AS ID3D10Effect
 , BYREF ppErrors AS ID3D10Blob
 , BYREF pHResult AS LONG
 ) AS LONG
#IF %DEF(%UNICODE)
 MACRO D3DX10CreateEffectFromResource = D3DX10CreateEffectFromResourceW
#ELSE
 MACRO D3DX10CreateEffectFromResource = D3DX10CreateEffectFromResourceA
#ENDIF
DECLARE FUNCTION D3DX10CreateEffectPoolFromFileA IMPORT $D3DX10_DLLNAME ALIAS "D3DX10CreateEffectPoolFromFileA" ( BYREF pFileName AS ASCIIZ , BYREF pDefines AS D3D10_SHADER_MACRO , BYVAL pInclude AS IUnknown , BYREF pProfile AS ASCIIZ , BYVAL HLSLFlags AS QUAD , BYVAL FXFlags AS QUAD , BYVAL pDevice AS ID3D10Device , BYVAL pPump AS ID3DX10ThreadPump , BYREF ppEffectPool AS ID3D10EffectPool , BYREF ppErrors AS ID3D10Blob , BYREF pHResult AS LONG ) AS LONG
DECLARE FUNCTION D3DX10CreateEffectPoolFromFileW IMPORT $D3DX10_DLLNAME ALIAS "D3DX10CreateEffectPoolFromFileW" ( BYREF pFileName AS WSTRINGZ
 , BYREF pDefines AS D3D10_SHADER_MACRO
 , BYVAL pInclude AS IUnknown
 , BYREF pProfile AS ASCIIZ
 , BYVAL HLSLFlags AS DWORD
 , BYVAL FXFlags AS DWORD
 , BYVAL pDevice AS ID3D10Device
 , BYVAL pPump AS ID3DX10ThreadPump
 , BYREF ppEffectPool AS ID3D10EffectPool
 , BYREF ppErrors AS ID3D10Blob
 , BYREF pHResult AS LONG
 ) AS LONG
#IF %DEF(%UNICODE)
 MACRO D3DX10CreateEffectPoolFromFile = D3DX10CreateEffectPoolFromFileW
#ELSE
 MACRO D3DX10CreateEffectPoolFromFile = D3DX10CreateEffectPoolFromFileA
#ENDIF
DECLARE FUNCTION D3DX10CreateEffectPoolFromMemory IMPORT $D3DX10_DLLNAME ALIAS "D3DX10CreateEffectPoolFromMemory" ( BYVAL pData AS QUAD , BYVAL DataLength AS QUAD , BYREF pSrcFileName AS ASCIIZ , BYREF pDefines AS D3D10_SHADER_MACRO , BYVAL pInclude AS IUnknown , BYREF pProfile AS ASCIIZ , BYVAL HLSLFlags AS QUAD , BYVAL FXFlags AS QUAD , BYVAL pDevice AS ID3D10Device , BYVAL pPump AS ID3DX10ThreadPump , BYREF ppEffectPool AS ID3D10EffectPool , BYREF ppErrors AS ID3D10Blob , BYREF pHResult AS LONG ) AS LONG
DECLARE FUNCTION D3DX10CreateEffectPoolFromResourceA IMPORT $D3DX10_DLLNAME ALIAS "D3DX10CreateEffectPoolFromResourceA" ( BYVAL hModule AS QUAD
 , BYREF pResourceName AS ASCIIZ
 , BYREF pSrcFileName AS ASCIIZ
 , BYREF pDefines AS D3D10_SHADER_MACRO
 , BYVAL pInclude AS IUnknown
 , BYREF pProfile AS ASCIIZ
 , BYVAL HLSLFlags AS DWORD
 , BYVAL FXFlags AS DWORD
 , BYVAL pDevice AS ID3D10Device
 , BYVAL pPump AS ID3DX10ThreadPump
 , BYREF ppEffectPool AS ID3D10EffectPool
 , BYREF ppErrors AS ID3D10Blob
 , BYREF pHResult AS LONG
 ) AS LONG
DECLARE FUNCTION D3DX10CreateEffectPoolFromResourceW IMPORT $D3DX10_DLLNAME ALIAS "D3DX10CreateEffectPoolFromResourceW" ( BYVAL hModule AS DWORD
 , BYREF pResourceName AS WSTRINGZ
 , BYREF pSrcFileName AS WSTRINGZ
 , BYREF pDefines AS D3D10_SHADER_MACRO
 , BYVAL pInclude AS IUnknown
 , BYREF pProfile AS ASCIIZ
 , BYVAL HLSLFlags AS DWORD
 , BYVAL FXFlags AS DWORD
 , BYVAL pDevice AS ID3D10Device
 , BYVAL pPump AS ID3DX10ThreadPump
 , BYREF ppEffectPool AS ID3D10EffectPool
 , BYREF ppErrors AS ID3D10Blob
 , BYREF pHResult AS LONG
 ) AS LONG
#IF %DEF(%UNICODE)
 MACRO D3DX10CreateEffectPoolFromResource = D3DX10CreateEffectPoolFromResourceW
#ELSE
 MACRO D3DX10CreateEffectPoolFromResource = D3DX10CreateEffectPoolFromResourceA
#ENDIF
DECLARE FUNCTION D3DX10PreprocessShaderFromFileA IMPORT $D3DX10_DLLNAME ALIAS "D3DX10PreprocessShaderFromFileA" ( BYREF pFileName AS ASCIIZ , BYREF pDefines AS D3D10_SHADER_MACRO , BYVAL pInclude AS IUnknown , BYVAL pPump AS ID3DX10ThreadPump , BYREF ppShaderText AS ID3D10Blob , BYREF ppErrors AS ID3D10Blob , BYREF pHResult AS LONG ) AS LONG
DECLARE FUNCTION D3DX10PreprocessShaderFromFileW IMPORT $D3DX10_DLLNAME ALIAS "D3DX10PreprocessShaderFromFileW" ( BYREF pFileName AS WSTRINGZ
 , BYREF pDefines AS D3D10_SHADER_MACRO
 , BYVAL pInclude AS IUnknown
 , BYVAL pPump AS ID3DX10ThreadPump
 , BYREF ppShaderText AS ID3D10Blob
 , BYREF ppErrors AS ID3D10Blob
 , BYREF pHResult AS LONG
 ) AS LONG
#IF %DEF(%UNICODE)
 MACRO D3DX10PreprocessShaderFromFile = D3DX10PreprocessShaderFromFileW
#ELSE
 MACRO D3DX10PreprocessShaderFromFile = D3DX10PreprocessShaderFromFileA
#ENDIF
DECLARE FUNCTION D3DX10PreprocessShaderFromMemory IMPORT $D3DX10_DLLNAME ALIAS "D3DX10PreprocessShaderFromMemory" ( BYREF pSrcData AS ASCIIZ , BYVAL SrcDataSize AS QUAD , BYREF pFileName AS ASCIIZ , BYREF pDefines AS D3D10_SHADER_MACRO , BYVAL pInclude AS IUnknown , BYVAL pPump AS ID3DX10ThreadPump , BYREF ppShaderText AS ID3D10Blob , BYREF ppErrorMsgs AS ID3D10Blob , BYREF pHResult AS LONG ) AS LONG
DECLARE FUNCTION D3DX10PreprocessShaderFromResourceA IMPORT $D3DX10_DLLNAME ALIAS "D3DX10PreprocessShaderFromResourceA" ( BYVAL hModule AS QUAD
 , BYREF pResourceName AS ASCIIZ
 , BYREF pSrcFileName AS ASCIIZ
 , BYREF pDefines AS D3D10_SHADER_MACRO
 , BYVAL pInclude AS IUnknown
 , BYVAL pPump AS ID3DX10ThreadPump
 , BYREF ppShaderText AS ID3D10Blob
 , BYREF ppErrorMsgs AS ID3D10Blob
 , BYREF pHResult AS LONG
 ) AS LONG
DECLARE FUNCTION D3DX10PreprocessShaderFromResourceW IMPORT $D3DX10_DLLNAME ALIAS "D3DX10PreprocessShaderFromResourceW" ( BYVAL hModule AS DWORD
 , BYREF pResourceName AS WSTRINGZ
 , BYREF pSrcFileName AS WSTRINGZ
 , BYREF pDefines AS D3D10_SHADER_MACRO
 , BYVAL pInclude AS IUnknown
 , BYVAL pPump AS ID3DX10ThreadPump
 , BYREF ppShaderText AS ID3D10Blob
 , BYREF ppErrorMsgs AS ID3D10Blob
 , BYREF pHResult AS LONG
 ) AS LONG
#IF %DEF(%UNICODE)
 MACRO D3DX10PreprocessShaderFromResource = D3DX10PreprocessShaderFromResourceW
#ELSE
 MACRO D3DX10PreprocessShaderFromResource = D3DX10PreprocessShaderFromResourceA
#ENDIF
'//----------------------------------------------------------------------------
'// Async processors
'//----------------------------------------------------------------------------
DECLARE FUNCTION D3DX10CreateAsyncCompilerProcessor IMPORT $D3DX10_DLLNAME ALIAS "D3DX10CreateAsyncCompilerProcessor" ( BYREF pFileName AS ASCIIZ , BYREF pDefines AS D3D10_SHADER_MACRO , BYVAL pInclude AS IUnknown , BYREF pFunctionName AS ASCIIZ , BYREF pProfile AS ASCIIZ , BYVAL Flags1 AS QUAD , BYVAL Flags2 AS QUAD , BYREF ppCompiledShader AS ID3D10Blob , BYREF ppErrorBuffer AS ID3D10Blob , BYREF ppProcessor AS QUAD ) AS LONG
DECLARE FUNCTION D3DX10CreateAsyncEffectCreateProcessor IMPORT $D3DX10_DLLNAME ALIAS "D3DX10CreateAsyncEffectCreateProcessor" ( BYREF pFileName AS ASCIIZ
 , BYREF pDefines AS D3D10_SHADER_MACRO
 , BYVAL pInclude AS IUnknown
 , BYREF pProfile AS ASCIIZ
 , BYVAL Flags1 AS DWORD
 , BYVAL FXFlags AS DWORD
 , BYVAL pDevice AS ID3D10Device
 , BYVAL pPool AS ID3D10EffectPool
 , BYREF ppErrorBuffer AS ID3D10Blob
 , BYREF ppProcessor AS DWORD
 ) AS LONG
DECLARE FUNCTION D3DX10CreateAsyncEffectPoolCreateProcessor IMPORT $D3DX10_DLLNAME ALIAS "D3DX10CreateAsyncEffectPoolCreateProcessor" ( BYREF pFileName AS ASCIIZ
 , BYREF pDefines AS D3D10_SHADER_MACRO
 , BYVAL pInclude AS IUnknown
 , BYREF pProfile AS ASCIIZ
 , BYVAL Flags1 AS DWORD
 , BYVAL FXFlags AS DWORD
 , BYVAL pDevice AS ID3D10Device
 , BYVAL pPool AS ID3D10EffectPool
 , BYREF ppErrorBuffer AS ID3D10Blob
 , BYREF ppProcessor AS DWORD
 ) AS LONG
DECLARE FUNCTION D3DX10CreateAsyncShaderPreprocessProcessor IMPORT $D3DX10_DLLNAME ALIAS "D3DX10CreateAsyncShaderPreprocessProcessor" ( BYREF pFileName AS ASCIIZ
 , BYREF pDefines AS D3D10_SHADER_MACRO
 , BYVAL pInclude AS IUnknown
 , BYREF ppShaderText AS ID3D10Blob
 , BYREF ppErrorBuffer AS ID3D10Blob
 , BYREF ppProcessor AS DWORD
 ) AS LONG
'//----------------------------------------------------------------------------
'// D3DX10 Asynchronous texture I/O (advanced mode)
'//----------------------------------------------------------------------------
DECLARE FUNCTION D3DX10CreateAsyncFileLoaderW IMPORT $D3DX10_DLLNAME ALIAS "D3DX10CreateAsyncFileLoaderW" ( BYREF pFileName AS WSTRINGZ , BYREF ppDataLoader AS QUAD ) AS LONG
DECLARE FUNCTION D3DX10CreateAsyncFileLoaderA IMPORT $D3DX10_DLLNAME ALIAS "D3DX10CreateAsyncFileLoaderA" ( BYREF pFileName AS ASCIIZ
 , BYREF ppDataLoader AS DWORD
 ) AS LONG
#IF %DEF(%UNICODE)
 MACRO D3DX10CreateAsyncFileLoader = D3DX10CreateAsyncFileLoaderW
#ELSE
 MACRO D3DX10CreateAsyncFileLoader = D3DX10CreateAsyncFileLoaderA
#ENDIF
DECLARE FUNCTION D3DX10CreateAsyncMemoryLoader IMPORT $D3DX10_DLLNAME ALIAS "D3DX10CreateAsyncMemoryLoader" ( BYVAL pData AS QUAD , BYVAL cbData AS QUAD , BYREF ppDataLoader AS QUAD ) AS LONG
DECLARE FUNCTION D3DX10CreateAsyncResourceLoaderW IMPORT $D3DX10_DLLNAME ALIAS "D3DX10CreateAsyncResourceLoaderW" ( BYVAL hSrcModule AS QUAD
 , BYREF pSrcResource AS WSTRINGZ
 , BYREF ppDataLoader AS DWORD
 ) AS LONG
DECLARE FUNCTION D3DX10CreateAsyncResourceLoaderA IMPORT $D3DX10_DLLNAME ALIAS "D3DX10CreateAsyncResourceLoaderA" ( BYVAL hSrcModule AS DWORD
 , BYREF pSrcResource AS ASCIIZ
 , BYREF ppDataLoader AS DWORD
 ) AS LONG
#IF %DEF(%UNICODE)
 MACRO D3DX10CreateAsyncResourceLoader = D3DX10CreateAsyncResourceLoaderW
#ELSE
 MACRO D3DX10CreateAsyncResourceLoader = D3DX10CreateAsyncResourceLoaderA
#ENDIF
DECLARE FUNCTION D3DX10CreateAsyncTextureProcessor IMPORT $D3DX10_DLLNAME ALIAS "D3DX10CreateAsyncTextureProcessor" ( BYVAL pDevice AS ID3D10Device , BYREF pLoadInfo AS D3DX10_IMAGE_LOAD_INFO , BYREF ppDataProcessor AS QUAD ) AS LONG
DECLARE FUNCTION D3DX10CreateAsyncTextureInfoProcessor IMPORT $D3DX10_DLLNAME ALIAS "D3DX10CreateAsyncTextureInfoProcessor" ( BYREF pLoadInfo AS D3DX10_IMAGE_LOAD_INFO
 , BYREF ppDataProcessor AS DWORD
 ) AS LONG
DECLARE FUNCTION D3DX10CreateAsyncShaderResourceViewProcessor IMPORT $D3DX10_DLLNAME ALIAS "D3DX10CreateAsyncShaderResourceViewProcessor" ( BYVAL pDevice AS ID3D10Device
 , BYREF pLoadInfo AS D3DX10_IMAGE_LOAD_INFO
 , BYREF ppDataProcessor AS DWORD
 ) AS LONG
#ENDIF
