From ad0dab0d4ca1daa09fd22113d33b721f92c9f53c Mon Sep 17 00:00:00 2001 From: LZMPDev Date: Mon, 25 May 2020 20:46:28 +0800 Subject: [PATCH] Revamp Stdcall --- BeefLibs/Beefy2D/src/BFApp.bf | 40 +- BeefLibs/Beefy2D/src/BFWindow.bf | 42 +- BeefLibs/Beefy2D/src/Utils.bf | 4 +- BeefLibs/Beefy2D/src/gfx/DrawLayer.bf | 10 +- BeefLibs/Beefy2D/src/gfx/Font.bf | 10 +- BeefLibs/Beefy2D/src/gfx/Graphics.bf | 22 +- BeefLibs/Beefy2D/src/gfx/Image.bf | 24 +- BeefLibs/Beefy2D/src/gfx/Model.bf | 24 +- BeefLibs/Beefy2D/src/gfx/RenderState.bf | 14 +- BeefLibs/Beefy2D/src/gfx/Shader.bf | 6 +- BeefLibs/Beefy2D/src/gfx/VertexDefinition.bf | 4 +- BeefLibs/Beefy2D/src/res/PSDReader.bf | 20 +- BeefLibs/Beefy2D/src/res/ResourceManager.bf | 2 +- BeefLibs/Beefy2D/src/res/SoundBank.bf | 2 +- BeefLibs/Beefy2D/src/res/SoundEvent.bf | 2 +- BeefLibs/Beefy2D/src/res/SoundParameter.bf | 2 +- BeefLibs/Beefy2D/src/sound/SoundInstance.bf | 6 +- BeefLibs/Beefy2D/src/sound/SoundManager.bf | 4 +- BeefLibs/Beefy2D/src/utils/BeefPerf.bf | 20 +- BeefLibs/Beefy2D/src/utils/HTTP.bf | 6 +- BeefLibs/Beefy2D/src/utils/PerfTimer.bf | 14 +- BeefLibs/FMOD/src/FMod.bf | 644 +++++++++---------- BeefLibs/MiniZ/src/Zip.bf | 36 +- BeefLibs/corlib/src/Console.bf | 6 +- BeefLibs/corlib/src/Double.bf | 2 +- BeefLibs/corlib/src/Float.bf | 2 +- BeefLibs/corlib/src/Net/Socket.bf | 30 +- BeefLibs/corlib/src/OperatingSystem.bf | 22 +- BeefLibs/corlib/src/Platform.bf | 170 ++--- BeefLibs/corlib/src/Windows.bf | 278 ++++---- BeefTools/DocPrep/src/Program.bf | 26 +- BeefTools/MemProfiler/FMod.bf | 644 +++++++++---------- IDE/mintest/minlib/src/System/Object.bf | 2 +- IDE/mintest/minlib/src/System/Platform.bf | 140 ++-- IDE/mintest/src/main.bf | 16 +- IDE/src/Clang/ClangCompiler.bf | 28 +- IDE/src/Clang/ClangHelper.bf | 10 +- IDE/src/Compiler/BfCompiler.bf | 60 +- IDE/src/Compiler/BfParser.bf | 36 +- IDE/src/Compiler/BfPassInstance.bf | 14 +- IDE/src/Compiler/BfProject.bf | 10 +- IDE/src/Compiler/BfResolvePassData.bf | 20 +- IDE/src/Compiler/BfSystem.bf | 48 +- IDE/src/Debugger/Breakpoint.bf | 40 +- IDE/src/Debugger/Callbacks.bf | 2 +- IDE/src/Debugger/DebugManager.bf | 156 ++--- IDE/src/Debugger/Profiler.bf | 14 +- IDE/src/Debugger/StepFilter.bf | 2 +- IDE/src/IDEApp.bf | 6 +- IDE/src/Settings.bf | 2 +- IDE/src/SpellChecker.bf | 10 +- IDE/src/Targets.bf | 4 +- IDE/src/ui/SourceEditWidgetContent.bf | 2 +- IDE/src/ui/SourceViewPanel.bf | 2 +- IDE/src/util/BfLog.bf | 4 +- IDE/src/util/Curl.bf | 14 +- IDE/src/util/Git.bf | 12 +- IDE/src/util/Transfer.bf | 4 +- 58 files changed, 1398 insertions(+), 1398 deletions(-) diff --git a/BeefLibs/Beefy2D/src/BFApp.bf b/BeefLibs/Beefy2D/src/BFApp.bf index 20835a1b..80f8107d 100644 --- a/BeefLibs/Beefy2D/src/BFApp.bf +++ b/BeefLibs/Beefy2D/src/BFApp.bf @@ -72,64 +72,64 @@ namespace Beefy public Matrix4? mColorMatrix; public ConstantDataDefinition mColorMatrixDataDef = new ConstantDataDefinition(16, new ConstantDataDefinition.DataType[] { ConstantDataDefinition.DataType.Matrix | ConstantDataDefinition.DataType.PixelShaderUsage }) ~ delete _; - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void Lib_Startup(int32 argc, char8** argv, void* startupCallback); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void BFApp_GetDesktopResolution(out int32 width, out int32 height); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void BFApp_GetWorkspaceRect(out int32 x, out int32 y, out int32 width, out int32 height); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void BFApp_GetWorkspaceRectFrom(int32 x, int32 y, int32 width, int32 height, out int32 outX, out int32 outY, out int32 outWidth, out int32 outHeight); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void BFApp_Create(); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void BFApp_Delete(); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void BFApp_SetRefreshRate(int32 rate); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern void BFApp_SetDrawEnabled(int32 enabled); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void BFApp_Init(); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void BFApp_Run(); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void BFApp_Shutdown(); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void BFApp_SetCallbacks(void* updateDelegate, void* drawDelegate); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern char8* BFApp_GetInstallDir(); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void BFApp_SetCursor(int32 cursor); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void* BFApp_GetClipboardData(char8* format, out int32 size); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void BFApp_ReleaseClipboardData(void* ptr); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void BFApp_SetClipboardData(char8* format, void* ptr, int32 size, int32 resetClipboard); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern void BFApp_CheckMemory(); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern void BFApp_RehupMouse(); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern void* BFApp_GetSoundManager(); UpdateDelegate mUpdateDelegate ~ delete _; diff --git a/BeefLibs/Beefy2D/src/BFWindow.bf b/BeefLibs/Beefy2D/src/BFWindow.bf index 7d55044c..51f01cb5 100644 --- a/BeefLibs/Beefy2D/src/BFWindow.bf +++ b/BeefLibs/Beefy2D/src/BFWindow.bf @@ -179,71 +179,71 @@ namespace Beefy static NativeMouseLeaveDelegate sNativeMouseLeaveDelegate ~ delete _; static NativeMenuItemSelectedDelegate sNativeMenuItemSelectedDelegate ~ delete _; - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void* BFApp_CreateWindow(void* parent, char8* title, int32 x, int32 y, int32 width, int32 height, int32 windowFlags); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void* BFWindow_GetNativeUnderlying(void* window); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void BFWindow_SetCallbacks(void* window, void* movedDelegate, void* closeQueryDelegate, void* closedDelegate, void* gotFocusDelegate, void* lostFocusDelegate, void* keyCharDelegate, void* keyDownDelegate, void* keyUpDelegate, void* hitTestDelegate, void* mouseMoveDelegate, void* mouseProxyMoveDelegate, void* mouseDownDelegate, void* mouseUpDelegate, void* mouseWheelDelegate, void* mouseLeaveDelegate, void* menuItemSelectedDelegate); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void BFWindow_SetTitle(void* window, char8* title); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void BFWindow_SetMinimumSize(void* window, int32 minWidth, int32 minHeight, bool clientSized); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void BFWindow_GetPosition(void* window, out int32 x, out int32 y, out int32 width, out int32 height, out int32 clientX, out int32 clientY, out int32 clientWidth, out int32 clientHeight); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void BFWindow_GetPlacement(void* window, out int32 normX, out int32 normY, out int32 normWidth, out int32 normHeight, out int32 showKind); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void BFWindow_Resize(void* window, int32 x, int32 y, int32 width, int32 height, int showKind); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void BFWindow_Close(void* window, int32 force); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void BFWindow_SetForeground(void* window); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void BFWindow_LostFocus(void* window, void* newFocus); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void BFWindow_SetNonExclusiveMouseCapture(void* window); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void BFWindow_SetClientPosition(void* window, int32 x, int32 y); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void BFWindow_SetAlpha(void* window, float alpha, uint32 destAlphaSrcMask, int32 mouseVisible); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void BFWindow_SetMouseVisible(void* window, bool mouseVisible); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void BFWindow_CaptureMouse(void* window); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern bool BFWindow_IsMouseCaptured(void* window); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void* BFWindow_AddMenuItem(void* window, void* parent, int32 insertIdx, char8* text, char8* hotKey, void* bitmap, int32 enabled, int32 checkState, int32 radioCheck); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void* BFWindow_ModifyMenuItem(void* window, void* item, char8* text, char8* hotKey, void* bitmap, int32 enabled, int32 checkState, int32 radioCheck); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void* BFWindow_DeleteMenuItem(void* window, void* item); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern int BFWindow_GetDPI(void* window); public static BFWindow GetBFWindow(void* window) diff --git a/BeefLibs/Beefy2D/src/Utils.bf b/BeefLibs/Beefy2D/src/Utils.bf index e10c46e0..b858b290 100644 --- a/BeefLibs/Beefy2D/src/Utils.bf +++ b/BeefLibs/Beefy2D/src/Utils.bf @@ -13,10 +13,10 @@ namespace Beefy { static Random mRandom = new Random() ~ delete _; - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern int32 BF_TickCount(); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern int32 BF_TickCountMicroFast(); public static float Deg2Rad = Math.PI_f / 180.0f; diff --git a/BeefLibs/Beefy2D/src/gfx/DrawLayer.bf b/BeefLibs/Beefy2D/src/gfx/DrawLayer.bf index 296b697b..ea9d6448 100644 --- a/BeefLibs/Beefy2D/src/gfx/DrawLayer.bf +++ b/BeefLibs/Beefy2D/src/gfx/DrawLayer.bf @@ -13,19 +13,19 @@ namespace Beefy.gfx #if !STUDIO_CLIENT public class DrawLayer { - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void* DrawLayer_Create(void* window); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void DrawLayer_Delete(void* drawLayer); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void DrawLayer_Clear(void* drawLayer); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void DrawLayer_Activate(void* drawLayer); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void DrawLayer_DrawToRenderTarget(void* drawLayer, void* texture); public void* mNativeDrawLayer; diff --git a/BeefLibs/Beefy2D/src/gfx/Font.bf b/BeefLibs/Beefy2D/src/gfx/Font.bf index 6828fcad..01105adc 100644 --- a/BeefLibs/Beefy2D/src/gfx/Font.bf +++ b/BeefLibs/Beefy2D/src/gfx/Font.bf @@ -38,19 +38,19 @@ namespace Beefy.gfx public class Font { - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern FTFont* FTFont_Load(char8* fileName, float pointSize); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void FTFont_Delete(FTFont* ftFont, bool cacheRetain); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void FTFont_ClearCache(); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern FTGlyph* FTFont_AllocGlyph(FTFont* ftFont, int32 char8Code, bool allowDefault); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern int32 FTFont_GetKerning(FTFont* font, int32 char8CodeA, int32 char8CodeB); static Dictionary sFontNameMap ~ DeleteDictionaryAndKeysAndItems!(_); diff --git a/BeefLibs/Beefy2D/src/gfx/Graphics.bf b/BeefLibs/Beefy2D/src/gfx/Graphics.bf index f9c0f23d..06ccb0c0 100644 --- a/BeefLibs/Beefy2D/src/gfx/Graphics.bf +++ b/BeefLibs/Beefy2D/src/gfx/Graphics.bf @@ -400,37 +400,37 @@ namespace Beefy.gfx #if !STUDIO_CLIENT public class Graphics : GraphicsBase { - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void Gfx_SetRenderState(void* renderState); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void Gfx_AllocTris(void* textureSegment, int32 vtxCount); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void Gfx_SetDrawVertex(int32 idx, float x, float y, float z, float u, float v, uint32 color); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void Gfx_CopyDrawVertex(int32 destIdx, int32 srcIdx); - //[StdCall, CLink] + //[CallingConvention(.Stdcall), CLink] //static unsafe extern void Gfx_DrawIndexedVertices2D(void* vtxData, int vtxCount, int* idxData, int idxCount, float a, float b, float c, float d, float tx, float ty, float z); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void Gfx_DrawIndexedVertices2D(int32 vertexSize, void* vtxData, int32 vtxCount, uint16* idxData, int32 idxCount, float a, float b, float c, float d, float tx, float ty, float z); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void Gfx_SetShaderConstantData(int32 slotIdx, void* data, int32 size); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void Gfx_SetShaderConstantDataTyped(int32 slotIdx, void* data, int32 size, int32* typeData, int32 typeCount); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void Gfx_DrawQuads(void* textureSegment, Vertex3D* vertices, int32 vtxCount); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] extern static void* Gfx_QueueRenderCmd(void* nativeRenderCmd); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] extern static void Gfx_SetTexture_TextureSegment(int32 textureIdx, void* textureSegment); public this() diff --git a/BeefLibs/Beefy2D/src/gfx/Image.bf b/BeefLibs/Beefy2D/src/gfx/Image.bf index 8a9eaff6..0835d251 100644 --- a/BeefLibs/Beefy2D/src/gfx/Image.bf +++ b/BeefLibs/Beefy2D/src/gfx/Image.bf @@ -33,40 +33,40 @@ namespace Beefy.gfx public void* mNativeTextureSegment; public PixelSnapping mPixelSnapping = PixelSnapping.Auto; - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern void Gfx_DrawTextureSegment(void* textureSegment, float a, float b, float c, float d, float tx, float ty, float z, uint32 color, int32 pixelSnapping); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void* Gfx_LoadTexture(char8* fileName, int32 flags); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void* Gfx_CreateDynTexture(int32 width, int32 height); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void* Gfx_CreateRenderTarget(int32 width, int32 height, int32 destAlpha); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void* Gfx_ModifyTextureSegment(void* destSegment, void* srcTextureSegment, int32 srcX, int32 srcY, int32 srcWidth, int32 srcHeight); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void* Gfx_CreateTextureSegment(void* textureSegment, int32 srcX, int32 srcY, int32 srcWidth, int32 srcHeight); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern void Gfx_SetDrawSize(void* textureSegment, int32 width, int32 height); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void Gfx_Texture_SetBits(void* textureSegment, int32 destX, int32 destY, int32 destWidth, int32 destHeight, int32 srcPitch, uint32* bits); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void Gfx_Texture_GetBits(void* textureSegment, int32 srcX, int32 srcY, int32 srcWidth, int32 srcHeight, int32 destPitch, uint32* bits); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void Gfx_Texture_Delete(void* textureSegment); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern int32 Gfx_Texture_GetWidth(void* textureSegment); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern int32 Gfx_Texture_GetHeight(void* textureSegment); public this() diff --git a/BeefLibs/Beefy2D/src/gfx/Model.bf b/BeefLibs/Beefy2D/src/gfx/Model.bf index ecc51926..591d2780 100644 --- a/BeefLibs/Beefy2D/src/gfx/Model.bf +++ b/BeefLibs/Beefy2D/src/gfx/Model.bf @@ -56,16 +56,16 @@ namespace Beefy.gfx public String mName; public int32 mAnimIdx; - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] extern static void ModelDefAnimation_GetJointTranslation(void* nativeAnimation, int32 jointIdx, float frame, out JointTranslation jointTranslation); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] extern static int32 ModelDefAnimation_GetFrameCount(void* nativeAnimation); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] extern static char8* ModelDefAnimation_GetName(void* nativeAnimation); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] extern static void ModelDefAnimation_Clip(void* nativeAnimation, int32 startFrame, int32 numFrames); public this(void* nativeModelDefAnimation) @@ -93,22 +93,22 @@ namespace Beefy.gfx public Animation[] mAnims; public Dictionary mAnimMap = new Dictionary(); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] extern static void* Res_OpenFBX(String fileName, void* nativeVertexDef); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] extern static void* ModelDef_CreateModelInstance(void* nativeModel); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] extern static float ModelDef_GetFrameRate(void* nativeModel); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] extern static int32 ModelDef_GetJointCount(void* nativeModel); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] extern static int32 ModelDef_GetAnimCount(void* nativeModel); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] extern static void* ModelDef_GetAnimation(void* nativeModel, int32 animIdx); this(void* nativeModelDef) @@ -154,10 +154,10 @@ namespace Beefy.gfx public class ModelInstance : RenderCmd { - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] extern static void ModelInstance_SetJointTranslation(void* nativeModelInstance, int32 jointIdx, ref ModelDef.JointTranslation jointTranslation); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] extern static void ModelInstance_SetMeshVisibility(void* nativeModelInstance, int32 jointIdx, int32 visibility); public ModelDef mModelDef; diff --git a/BeefLibs/Beefy2D/src/gfx/RenderState.bf b/BeefLibs/Beefy2D/src/gfx/RenderState.bf index b8a622e6..b467da1d 100644 --- a/BeefLibs/Beefy2D/src/gfx/RenderState.bf +++ b/BeefLibs/Beefy2D/src/gfx/RenderState.bf @@ -22,25 +22,25 @@ namespace Beefy.gfx #if !STUDIO_CLIENT public class RenderState { - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void* Gfx_CreateRenderState(void* srcNativeRenderState); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void RenderState_Delete(void* renderState); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void RenderState_SetClip(void* renderState, float x, float y, float width, float height); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void RenderState_DisableClip(void* renderState); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void RenderState_SetShader(void* nativeRenderState, void* nativeShader); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void RenderState_SetDepthFunc(void* nativeRenderState, int32 depthFunc); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void RenderState_SetDepthWrite(void* nativeRenderState, int32 depthWrite); public void* mNativeRenderState; diff --git a/BeefLibs/Beefy2D/src/gfx/Shader.bf b/BeefLibs/Beefy2D/src/gfx/Shader.bf index 0d47892f..25e0de6a 100644 --- a/BeefLibs/Beefy2D/src/gfx/Shader.bf +++ b/BeefLibs/Beefy2D/src/gfx/Shader.bf @@ -19,13 +19,13 @@ namespace Beefy.gfx public void* mNativeShader; public Dictionary mShaderParamMap; - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void* Gfx_LoadShader(char8* fileName, void* vertexDefinition); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void* Gfx_Shader_Delete(void* shader); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void* Gfx_GetShaderParam(void* shader, String paramName); public static Shader CreateFromFile(String fileName, VertexDefinition vertexDefinition) diff --git a/BeefLibs/Beefy2D/src/gfx/VertexDefinition.bf b/BeefLibs/Beefy2D/src/gfx/VertexDefinition.bf index 31fe029d..7ca4632b 100644 --- a/BeefLibs/Beefy2D/src/gfx/VertexDefinition.bf +++ b/BeefLibs/Beefy2D/src/gfx/VertexDefinition.bf @@ -34,10 +34,10 @@ namespace Beefy.gfx } #if !STUDIO_CLIENT - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void* Gfx_CreateVertexDefinition(VertexDefData* elementData, int32 numElements); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void Gfx_VertexDefinition_Delete(void* nativeVertexDefinition); public void* mNativeVertexDefinition; diff --git a/BeefLibs/Beefy2D/src/res/PSDReader.bf b/BeefLibs/Beefy2D/src/res/PSDReader.bf index 9169508b..14080ef2 100644 --- a/BeefLibs/Beefy2D/src/res/PSDReader.bf +++ b/BeefLibs/Beefy2D/src/res/PSDReader.bf @@ -8,13 +8,13 @@ namespace Beefy.res #if !STUDIO_CLIENT public class PSDLayer { - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] extern static void Res_PSDLayer_GetSize(void* layerInfo, out int32 x, out int32 y, out int32 width, out int32 height); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] extern static int32 Res_PSDLayer_GetLayerId(void* layerInfo); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] extern static char8* Res_PSDLayer_GetName(void* layerInfo); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] extern static int32 Res_PSDLayer_IsVisible(void* layerInfo); public void* mNativeLayerInfo; @@ -49,22 +49,22 @@ namespace Beefy.res public class PSDReader { - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] extern static void* Res_OpenPSD(String fileName); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] extern static void Res_DeletePSDReader(void* pSDReader); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] extern static int32 Res_PSD_GetLayerCount(void* pSDReader); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] extern static void* Res_PSD_GetLayerTexture(void* pSDReader, int32 layerIdx, out int32 xOfs, out int32 yOfs); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] extern static void* Res_PSD_GetMergedLayerTexture(void* pSDReader, void* layerIndices, int32 count, out int32 xOfs, out int32 yOfs); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] extern static void* Res_PSD_GetLayerInfo(void* pSDReader, int32 layerIdx); void* mNativePSDReader; diff --git a/BeefLibs/Beefy2D/src/res/ResourceManager.bf b/BeefLibs/Beefy2D/src/res/ResourceManager.bf index 18649c82..dfe9786c 100644 --- a/BeefLibs/Beefy2D/src/res/ResourceManager.bf +++ b/BeefLibs/Beefy2D/src/res/ResourceManager.bf @@ -28,7 +28,7 @@ namespace Beefy.res public class ResourceManager { - /*[StdCall, CLink] + /*[CallingConvention(.Stdcall), CLink] static extern void Wwise_Shutdown();*/ public Dictionary mResGroupMap = new Dictionary() ~ delete _; diff --git a/BeefLibs/Beefy2D/src/res/SoundBank.bf b/BeefLibs/Beefy2D/src/res/SoundBank.bf index fd90a9c2..a0c41584 100644 --- a/BeefLibs/Beefy2D/src/res/SoundBank.bf +++ b/BeefLibs/Beefy2D/src/res/SoundBank.bf @@ -7,7 +7,7 @@ namespace Beefy.res { /*public class SoundBank { - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void Wwise_LoadBankByName(String name); public String mName; diff --git a/BeefLibs/Beefy2D/src/res/SoundEvent.bf b/BeefLibs/Beefy2D/src/res/SoundEvent.bf index 5bacdcb2..1e0712d6 100644 --- a/BeefLibs/Beefy2D/src/res/SoundEvent.bf +++ b/BeefLibs/Beefy2D/src/res/SoundEvent.bf @@ -7,7 +7,7 @@ namespace Beefy.res { /*public class SoundEvent { - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void Wwise_SendEvent(uint32 eventId, void* objectId); public uint32 mWwiseEventId; diff --git a/BeefLibs/Beefy2D/src/res/SoundParameter.bf b/BeefLibs/Beefy2D/src/res/SoundParameter.bf index 02c65b84..69b293b9 100644 --- a/BeefLibs/Beefy2D/src/res/SoundParameter.bf +++ b/BeefLibs/Beefy2D/src/res/SoundParameter.bf @@ -7,7 +7,7 @@ namespace Beefy.res { /*public class SoundParameter { - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern int32 Wwise_SetRTPCValue(uint32 paramId, float value, void* soundGameObject); public uint32 mWwiseParamId; diff --git a/BeefLibs/Beefy2D/src/sound/SoundInstance.bf b/BeefLibs/Beefy2D/src/sound/SoundInstance.bf index b4b4a859..9bb71b5b 100644 --- a/BeefLibs/Beefy2D/src/sound/SoundInstance.bf +++ b/BeefLibs/Beefy2D/src/sound/SoundInstance.bf @@ -4,13 +4,13 @@ namespace Beefy.sound { struct SoundInstance { - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern void* BFSoundInstance_Play(void* nativeSoundInstance, bool looping, bool autoRelease); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern void BFSoundInstance_Release(void* nativeSoundInstance); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern bool BFSoundInstance_IsPlaying(void* nativeSoundInstance); void* mNativeSoundInstance; diff --git a/BeefLibs/Beefy2D/src/sound/SoundManager.bf b/BeefLibs/Beefy2D/src/sound/SoundManager.bf index 6fc9bb44..02324eaf 100644 --- a/BeefLibs/Beefy2D/src/sound/SoundManager.bf +++ b/BeefLibs/Beefy2D/src/sound/SoundManager.bf @@ -17,10 +17,10 @@ namespace Beefy.sound { void* mNativeSoundManager; - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern int32 BFSoundManager_LoadSound(void* nativeSoundManager, char8* fileName); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern void* BFSoundManager_GetSoundInstance(void* nativeSoundManager, int32 sfxId); public SoundSource LoadSound(StringView fileName) diff --git a/BeefLibs/Beefy2D/src/utils/BeefPerf.bf b/BeefLibs/Beefy2D/src/utils/BeefPerf.bf index dba781ea..da0bb8b6 100644 --- a/BeefLibs/Beefy2D/src/utils/BeefPerf.bf +++ b/BeefLibs/Beefy2D/src/utils/BeefPerf.bf @@ -4,34 +4,34 @@ namespace Beefy.utils { static class BeefPerf { - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] extern static void BpInit(char8* severName, char8* sessionName); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] extern static void BpShutdown(); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] extern static void BpRetryConnect(); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] extern static void BpPause(); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] extern static void BpUnpause(); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] extern static void BpSetThreadName(char8* threadName); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] extern static void BpEnter(char8* name); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] extern static void BpLeave(); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] extern static void BpEvent(char8* name, char8* details); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] extern static char8* BpDynStr(char8* string); public static void Init(StringView serverName, StringView sessionName) diff --git a/BeefLibs/Beefy2D/src/utils/HTTP.bf b/BeefLibs/Beefy2D/src/utils/HTTP.bf index cbf0455b..ed0dd848 100644 --- a/BeefLibs/Beefy2D/src/utils/HTTP.bf +++ b/BeefLibs/Beefy2D/src/utils/HTTP.bf @@ -13,13 +13,13 @@ namespace Beefy2D.utils void* mNativeNetRequest; - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void* HTTP_GetFile(char8* url, char8* destPath); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern int32 HTTP_GetResult(void* netRequest, int32 waitMS); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void HTTP_Delete(void* netRequest); public ~this() diff --git a/BeefLibs/Beefy2D/src/utils/PerfTimer.bf b/BeefLibs/Beefy2D/src/utils/PerfTimer.bf index 1fc18465..e3fe9ae7 100644 --- a/BeefLibs/Beefy2D/src/utils/PerfTimer.bf +++ b/BeefLibs/Beefy2D/src/utils/PerfTimer.bf @@ -6,25 +6,25 @@ namespace Beefy.utils { public abstract class PerfTimer { - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] extern static void PerfTimer_ZoneStart(char8* name); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] extern static void PerfTimer_ZoneEnd(); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] extern static void PerfTimer_Message(char8* theString); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] extern static int32 PerfTimer_IsRecording(); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] extern static void PerfTimer_StartRecording(); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] extern static void PerfTimer_StopRecording(); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] extern static void PerfTimer_DbgPrint(); static DisposeProxy mZoneEndDisposeProxy ~ delete _; diff --git a/BeefLibs/FMOD/src/FMod.bf b/BeefLibs/FMOD/src/FMod.bf index d2e3e17f..4218e5f2 100644 --- a/BeefLibs/FMOD/src/FMod.bf +++ b/BeefLibs/FMOD/src/FMod.bf @@ -1601,7 +1601,7 @@ namespace FMOD #region importfunctions - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_Create (out int system); #endregion @@ -1627,9 +1627,9 @@ namespace FMOD #region importfunctions - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_Memory_Initialize(int poolmem, int32 poollen, MEMORY_ALLOC_CALLBACK useralloc, MEMORY_REALLOC_CALLBACK userrealloc, MEMORY_FREE_CALLBACK userfree, MEMORY_TYPE memtypeflags); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_Memory_GetStats(out int32 currentalloced, out int32 maxalloced, bool blocking); #endregion @@ -1645,7 +1645,7 @@ namespace FMOD #region importfunctions - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_Debug_Initialize(DEBUG_FLAGS flags, DEBUG_MODE mode, DEBUG_CALLBACK callback, String filename); #endregion @@ -2313,189 +2313,189 @@ namespace FMOD #region importfunctions - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_Release (int system); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_SetOutput (int system, OUTPUTTYPE output); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_GetOutput (int system, out OUTPUTTYPE output); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_GetNumDrivers (int system, out int32 numdrivers); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_GetDriverInfo (int system, int32 id, char8* name, int32 namelen, out Guid guid, out int32 systemrate, out SPEAKERMODE speakermode, out int32 speakermodechannels); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_SetDriver (int system, int32 driver); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_GetDriver (int system, out int32 driver); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_SetSoftwareChannels (int system, int32 numsoftwarechannels); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_GetSoftwareChannels (int system, out int32 numsoftwarechannels); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_SetSoftwareFormat (int system, int32 samplerate, SPEAKERMODE speakermode, int32 numrawspeakers); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_GetSoftwareFormat (int system, out int32 samplerate, out SPEAKERMODE speakermode, out int32 numrawspeakers); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_SetDSPBufferSize (int system, uint32 bufferlength, int32 numbuffers); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_GetDSPBufferSize (int system, out uint32 bufferlength, out int32 numbuffers); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_SetFileSystem (int system, FILE_OPENCALLBACK useropen, FILE_CLOSECALLBACK userclose, FILE_READCALLBACK userread, FILE_SEEKCALLBACK userseek, FILE_ASYNCREADCALLBACK userasyncread, FILE_ASYNCCANCELCALLBACK userasynccancel, int32 blockalign); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_AttachFileSystem (int system, FILE_OPENCALLBACK useropen, FILE_CLOSECALLBACK userclose, FILE_READCALLBACK userread, FILE_SEEKCALLBACK userseek); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_SetPluginPath (int system, char8* path); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_LoadPlugin (int system, char8* filename, out uint32 handle, uint32 priority); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_UnloadPlugin (int system, uint32 handle); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_GetNumNestedPlugins (int system, uint32 handle, out int32 count); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_GetNestedPlugin (int system, uint32 handle, int32 index, out uint32 nestedhandle); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_GetNumPlugins (int system, PLUGINTYPE plugintype, out int32 numplugins); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_GetPluginHandle (int system, PLUGINTYPE plugintype, int32 index, out uint32 handle); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_GetPluginInfo (int system, uint32 handle, out PLUGINTYPE plugintype, char8* name, int32 namelen, out uint32 version); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_CreateDSPByPlugin (int system, uint32 handle, out int dsp); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_SetOutputByPlugin (int system, uint32 handle); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_GetOutputByPlugin (int system, out uint32 handle); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_GetDSPInfoByPlugin (int system, uint32 handle, out int description); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] //private static extern RESULT FMOD_System_RegisterCodec (int system, out CODEC_DESCRIPTION description, out uint32 handle, uint32 priority); - //[Import(VERSION.dll), CLink, StdCall] + //[Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_RegisterDSP (int system, ref DSP_DESCRIPTION description, out uint32 handle); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] //private static extern RESULT FMOD_System_RegisterOutput (int system, ref OUTPUT_DESCRIPTION description, out uint32 handle); - //[Import(VERSION.dll), CLink, StdCall] + //[Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_Init (int system, int32 maxchannels, INITFLAGS flags, int extradriverdata); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_Close (int system); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_Update (int system); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_SetAdvancedSettings (int system, ref ADVANCEDSETTINGS settings); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_GetAdvancedSettings (int system, ref ADVANCEDSETTINGS settings); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_Set3DRolloffCallback (int system, CB_3D_ROLLOFFCALLBACK callback); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_MixerSuspend (int system); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_MixerResume (int system); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_GetDefaultMixMatrix (int system, SPEAKERMODE sourcespeakermode, SPEAKERMODE targetspeakermode, float[] matrix, int32 matrixhop); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_GetSpeakerModeChannels (int system, SPEAKERMODE mode, out int32 channels); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_SetCallback (int system, SYSTEM_CALLBACK callback, SYSTEM_CALLBACK_TYPE callbackmask); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_SetSpeakerPosition (int system, SPEAKER speaker, float x, float y, bool active); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_GetSpeakerPosition (int system, SPEAKER speaker, out float x, out float y, out bool active); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_Set3DSettings (int system, float dopplerscale, float distancefactor, float rolloffscale); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_Get3DSettings (int system, out float dopplerscale, out float distancefactor, out float rolloffscale); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_Set3DNumListeners (int system, int32 numlisteners); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_Get3DNumListeners (int system, out int32 numlisteners); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_Set3DListenerAttributes(int system, int32 listener, ref VECTOR pos, ref VECTOR vel, ref VECTOR forward, ref VECTOR up); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_Get3DListenerAttributes(int system, int32 listener, out VECTOR pos, out VECTOR vel, out VECTOR forward, out VECTOR up); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_SetStreamBufferSize (int system, uint32 filebuffersize, TIMEUNIT filebuffersizetype); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_GetStreamBufferSize (int system, out uint32 filebuffersize, out TIMEUNIT filebuffersizetype); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_GetVersion (int system, out uint32 version); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_GetOutputHandle (int system, out int handle); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_GetChannelsPlaying (int system, out int32 channels, out int32 realchannels); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_GetCPUUsage (int system, out float dsp, out float stream, out float geometry, out float update, out float total); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_GetFileUsage (int system, out Int64 sampleuint8sRead, out Int64 streamuint8sRead, out Int64 otheruint8sRead); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_GetSoundRAM (int system, out int32 currentalloced, out int32 maxalloced, out int32 total); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_CreateSound (int system, char8* name_or_data, MODE mode, ref CREATESOUNDEXINFO exinfo, out int sound); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_CreateStream (int system, char8* name_or_data, MODE mode, ref CREATESOUNDEXINFO exinfo, out int sound); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_CreateDSP (int system, ref DSP_DESCRIPTION description, out int dsp); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_CreateDSPByType (int system, DSP_TYPE type, out int dsp); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_CreateChannelGroup (int system, char8* name, out int channelgroup); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_CreateSoundGroup (int system, char8* name, out int soundgroup); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_CreateReverb3D (int system, out int reverb); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_PlaySound (int system, int sound, int channelGroup, bool paused, out int channel); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_PlayDSP (int system, int dsp, int channelGroup, bool paused, out int channel); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_GetChannel (int system, int32 channelid, out int channel); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_GetMasterChannelGroup (int system, out int channelgroup); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_GetMasterSoundGroup (int system, out int soundgroup); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_AttachChannelGroupToPort (int system, uint32 portType, uint64 portIndex, int channelgroup, bool passThru); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_DetachChannelGroupFromPort(int system, int channelgroup); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_SetReverbProperties (int system, int32 instance, ref REVERB_PROPERTIES prop); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_GetReverbProperties (int system, int32 instance, out REVERB_PROPERTIES prop); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_LockDSP (int system); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_UnlockDSP (int system); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_GetRecordNumDrivers (int system, out int32 numdrivers, out int32 numconnected); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_GetRecordDriverInfo (int system, int32 id, char8* name, int32 namelen, out Guid guid, out int32 systemrate, out SPEAKERMODE speakermode, out int32 speakermodechannels, out DRIVER_STATE state); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_GetRecordPosition (int system, int32 id, out uint32 position); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_RecordStart (int system, int32 id, int sound, bool loop); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_RecordStop (int system, int32 id); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_IsRecording (int system, int32 id, out bool recording); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_CreateGeometry (int system, int32 maxpolygons, int32 maxvertices, out int geometry); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_SetGeometrySettings (int system, float maxworldsize); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_GetGeometrySettings (int system, out float maxworldsize); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_LoadGeometry (int system, int data, int32 datasize, out int geometry); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_GetGeometryOcclusion (int system, ref VECTOR listener, ref VECTOR source, out float direct, out float reverb); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_SetNetworkProxy (int system, char8* proxy); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_GetNetworkProxy (int system, char8* proxy, int32 proxylen); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_SetNetworkTimeout (int system, int32 timeout); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_GetNetworkTimeout (int system, out int32 timeout); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_SetUserData (int system, int userdata); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_GetUserData (int system, out int userdata); #endregion @@ -2747,91 +2747,91 @@ namespace FMOD #region importfunctions - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_Sound_Release (int sound); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_Sound_GetSystemObject (int sound, out int system); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_Sound_Lock (int sound, uint32 offset, uint32 length, out int ptr1, out int ptr2, out uint32 len1, out uint32 len2); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_Sound_Unlock (int sound, int ptr1, int ptr2, uint32 len1, uint32 len2); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_Sound_SetDefaults (int sound, float frequency, int32 priority); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_Sound_GetDefaults (int sound, out float frequency, out int32 priority); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_Sound_Set3DMinMaxDistance (int sound, float min, float max); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_Sound_Get3DMinMaxDistance (int sound, out float min, out float max); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_Sound_Set3DConeSettings (int sound, float insideconeangle, float outsideconeangle, float outsidevolume); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_Sound_Get3DConeSettings (int sound, out float insideconeangle, out float outsideconeangle, out float outsidevolume); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_Sound_Set3DCustomRolloff (int sound, ref VECTOR points, int32 numpoints); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_Sound_Get3DCustomRolloff (int sound, out int points, out int32 numpoints); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_Sound_GetSubSound (int sound, int32 index, out int subsound); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_Sound_GetSubSoundParent (int sound, out int parentsound); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_Sound_GetName (int sound, char8* name, int32 namelen); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_Sound_GetLength (int sound, out uint32 length, TIMEUNIT lengthtype); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_Sound_GetFormat (int sound, out SOUND_TYPE type, out SOUND_FORMAT format, out int32 channels, out int32 bits); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_Sound_GetNumSubSounds (int sound, out int32 numsubsounds); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_Sound_GetNumTags (int sound, out int32 numtags, out int32 numtagsupdated); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_Sound_GetTag (int sound, char8* name, int32 index, out TAG tag); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_Sound_GetOpenState (int sound, out OPENSTATE openstate, out uint32 percentbuffered, out bool starving, out bool diskbusy); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_Sound_ReadData (int sound, int buffer, uint32 lenuint8s, out uint32 read); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_Sound_SeekData (int sound, uint32 pcm); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_Sound_SetSoundGroup (int sound, int soundgroup); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_Sound_GetSoundGroup (int sound, out int soundgroup); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_Sound_GetNumSyncPoints (int sound, out int32 numsyncpoints); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_Sound_GetSyncPoint (int sound, int32 index, out int point); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_Sound_GetSyncPointInfo (int sound, int point, char8* name, int32 namelen, out uint32 offset, TIMEUNIT offsettype); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_Sound_AddSyncPoint (int sound, uint32 offset, TIMEUNIT offsettype, char8* name, out int point); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_Sound_DeleteSyncPoint (int sound, int point); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_Sound_SetMode (int sound, MODE mode); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_Sound_GetMode (int sound, out MODE mode); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_Sound_SetLoopCount (int sound, int32 loopcount); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_Sound_GetLoopCount (int sound, out int32 loopcount); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_Sound_SetLoopPoints (int sound, uint32 loopstart, TIMEUNIT loopstarttype, uint32 loopend, TIMEUNIT loopendtype); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_Sound_GetLoopPoints (int sound, out uint32 loopstart, TIMEUNIT loopstarttype, out uint32 loopend, TIMEUNIT loopendtype); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_Sound_GetMusicNumChannels (int sound, out int32 numchannels); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_Sound_SetMusicChannelVolume (int sound, int32 channel, float volume); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_Sound_GetMusicChannelVolume (int sound, int32 channel, out float volume); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_Sound_SetMusicSpeed (int sound, float speed); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_Sound_GetMusicSpeed (int sound, out float speed); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_Sound_SetUserData (int sound, int userdata); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_Sound_GetUserData (int sound, out int userdata); #endregion @@ -3127,129 +3127,129 @@ namespace FMOD #region importfunctions - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_Stop(int channelgroup); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_SetPaused(int channelgroup, bool paused); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_GetPaused(int channelgroup, out bool paused); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_GetVolume(int channelgroup, out float volume); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_SetVolumeRamp(int channelgroup, bool ramp); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_GetVolumeRamp(int channelgroup, out bool ramp); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_GetAudibility(int channelgroup, out float audibility); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_SetPitch(int channelgroup, float pitch); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_GetPitch(int channelgroup, out float pitch); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_SetMute(int channelgroup, bool mute); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_GetMute(int channelgroup, out bool mute); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_SetReverbProperties(int channelgroup, int32 instance, float wet); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_GetReverbProperties(int channelgroup, int32 instance, out float wet); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_SetLowPassGain(int channelgroup, float gain); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_GetLowPassGain(int channelgroup, out float gain); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_SetMode(int channelgroup, MODE mode); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_GetMode(int channelgroup, out MODE mode); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_SetCallback(int channelgroup, CHANNEL_CALLBACK callback); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_IsPlaying(int channelgroup, out bool isplaying); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_SetPan(int channelgroup, float pan); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_SetMixLevelsOutput(int channelgroup, float frontleft, float frontright, float center, float lfe, float surroundleft, float surroundright, float backleft, float backright); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_SetMixLevelsInput(int channelgroup, float[] levels, int32 numlevels); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_SetMixMatrix(int channelgroup, float[] matrix, int32 outchannels, int32 inchannels, int32 inchannel_hop); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_GetMixMatrix(int channelgroup, float[] matrix, out int32 outchannels, out int32 inchannels, int32 inchannel_hop); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_GetDSPClock(int channelgroup, out uint64 dspclock, out uint64 parentclock); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_SetDelay(int channelgroup, uint64 dspclock_start, uint64 dspclock_end, bool stopchannels); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_GetDelay(int channelgroup, out uint64 dspclock_start, out uint64 dspclock_end, out bool stopchannels); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_AddFadePoint(int channelgroup, uint64 dspclock, float volume); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_SetFadePointRamp(int channelgroup, uint64 dspclock, float volume); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_RemoveFadePoints(int channelgroup, uint64 dspclock_start, uint64 dspclock_end); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_GetFadePoints(int channelgroup, ref uint32 numpoints, uint64[] point_dspclock, float[] point_volume); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_Set3DAttributes(int channelgroup, ref VECTOR pos, ref VECTOR vel, ref VECTOR alt_pan_pos); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_Get3DAttributes(int channelgroup, out VECTOR pos, out VECTOR vel, out VECTOR alt_pan_pos); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_Set3DMinMaxDistance(int channelgroup, float mindistance, float maxdistance); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_Get3DMinMaxDistance(int channelgroup, out float mindistance, out float maxdistance); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_Set3DConeSettings(int channelgroup, float insideconeangle, float outsideconeangle, float outsidevolume); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_Get3DConeSettings(int channelgroup, out float insideconeangle, out float outsideconeangle, out float outsidevolume); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_Set3DConeOrientation(int channelgroup, ref VECTOR orientation); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_Get3DConeOrientation(int channelgroup, out VECTOR orientation); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_Set3DCustomRolloff(int channelgroup, ref VECTOR points, int32 numpoints); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_Get3DCustomRolloff(int channelgroup, out int points, out int32 numpoints); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_Set3DOcclusion(int channelgroup, float directocclusion, float reverbocclusion); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_Get3DOcclusion(int channelgroup, out float directocclusion, out float reverbocclusion); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_Set3DSpread(int channelgroup, float angle); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_Get3DSpread(int channelgroup, out float angle); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_Set3DLevel(int channelgroup, float level); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_Get3DLevel(int channelgroup, out float level); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_Set3DDopplerLevel(int channelgroup, float level); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_Get3DDopplerLevel(int channelgroup, out float level); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_Set3DDistanceFilter(int channelgroup, bool custom, float customLevel, float centerFreq); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_Get3DDistanceFilter(int channelgroup, out bool custom, out float customLevel, out float centerFreq); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_GetSystemObject(int channelgroup, out int system); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_SetVolume(int channelgroup, float volume); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_GetDSP(int channelgroup, int32 index, out int dsp); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_AddDSP(int channelgroup, int32 index, int dsp); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_RemoveDSP(int channelgroup, int dsp); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_GetNumDSPs(int channelgroup, out int32 numdsps); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_SetDSPIndex(int channelgroup, int dsp, int32 index); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_GetDSPIndex(int channelgroup, int dsp, out int32 index); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_OverridePanDSP(int channelgroup, int pan); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_SetUserData(int channelgroup, int userdata); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_GetUserData(int channelgroup, out int userdata); #endregion @@ -3348,43 +3348,43 @@ namespace FMOD #region importfunctions - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_Channel_SetFrequency (int channel, float frequency); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_Channel_GetFrequency (int channel, out float frequency); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_Channel_SetPriority (int channel, int32 priority); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_Channel_GetPriority (int channel, out int32 priority); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_Channel_SetChannelGroup (int channel, int channelgroup); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_Channel_GetChannelGroup (int channel, out int channelgroup); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_Channel_IsVirtual (int channel, out bool isvirtual); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_Channel_GetCurrentSound (int channel, out int sound); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_Channel_GetIndex (int channel, out int32 index); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_Channel_SetPosition (int channel, uint32 position, TIMEUNIT postype); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_Channel_GetPosition (int channel, out uint32 position, TIMEUNIT postype); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_Channel_SetMode (int channel, MODE mode); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_Channel_GetMode (int channel, out MODE mode); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_Channel_SetLoopCount (int channel, int32 loopcount); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_Channel_GetLoopCount (int channel, out int32 loopcount); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_Channel_SetLoopPoints (int channel, uint32 loopstart, TIMEUNIT loopstarttype, uint32 loopend, TIMEUNIT loopendtype); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_Channel_GetLoopPoints (int channel, out uint32 loopstart, TIMEUNIT loopstarttype, out uint32 loopend, TIMEUNIT loopendtype); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_Channel_SetUserData (int channel, int userdata); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_Channel_GetUserData (int channel, out int userdata); #endregion @@ -3480,21 +3480,21 @@ namespace FMOD } #region importfunctions - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_Release (int channelgroup); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_AddGroup (int channelgroup, int group, bool propagatedspclock, out int connection); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_GetNumGroups (int channelgroup, out int32 numgroups); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_GetGroup (int channelgroup, int32 index, out int group); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_GetParentGroup (int channelgroup, out int group); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_GetName (int channelgroup, char8* name, int32 namelen); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_GetNumChannels (int channelgroup, out int32 numchannels); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_GetChannel (int channelgroup, int32 index, out int channel); #endregion @@ -3618,39 +3618,39 @@ namespace FMOD } #region importfunctions - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_SoundGroup_Release (int soundgroup); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_SoundGroup_GetSystemObject (int soundgroup, out int system); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_SoundGroup_SetMaxAudible (int soundgroup, int32 maxaudible); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_SoundGroup_GetMaxAudible (int soundgroup, out int32 maxaudible); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_SoundGroup_SetMaxAudibleBehavior(int soundgroup, SOUNDGROUP_BEHAVIOR behavior); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_SoundGroup_GetMaxAudibleBehavior(int soundgroup, out SOUNDGROUP_BEHAVIOR behavior); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_SoundGroup_SetMuteFadeSpeed (int soundgroup, float speed); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_SoundGroup_GetMuteFadeSpeed (int soundgroup, out float speed); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_SoundGroup_SetVolume (int soundgroup, float volume); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_SoundGroup_GetVolume (int soundgroup, out float volume); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_SoundGroup_Stop (int soundgroup); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_SoundGroup_GetName (int soundgroup, char8* name, int32 namelen); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_SoundGroup_GetNumSounds (int soundgroup, out int32 numsounds); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_SoundGroup_GetSound (int soundgroup, int32 index, out int sound); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_SoundGroup_GetNumPlaying (int soundgroup, out int32 numplaying); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_SoundGroup_SetUserData (int soundgroup, int userdata); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_SoundGroup_GetUserData (int soundgroup, out int userdata); #endregion @@ -3895,83 +3895,83 @@ namespace FMOD #region importfunctions - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_DSP_Release (int dsp); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_DSP_GetSystemObject (int dsp, out int system); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_DSP_AddInput (int dsp, int target, out int connection, DSPCONNECTION_TYPE type); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_DSP_DisconnectFrom (int dsp, int target, int connection); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_DSP_DisconnectAll (int dsp, bool inputs, bool outputs); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_DSP_GetNumInputs (int dsp, out int32 numinputs); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_DSP_GetNumOutputs (int dsp, out int32 numoutputs); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_DSP_GetInput (int dsp, int32 index, out int input, out int inputconnection); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_DSP_GetOutput (int dsp, int32 index, out int output, out int outputconnection); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_DSP_SetActive (int dsp, bool active); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_DSP_GetActive (int dsp, out bool active); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_DSP_SetBypass (int dsp, bool bypass); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_DSP_GetBypass (int dsp, out bool bypass); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_DSP_SetWetDryMix (int dsp, float prewet, float postwet, float dry); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_DSP_GetWetDryMix (int dsp, out float prewet, out float postwet, out float dry); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_DSP_SetChannelFormat (int dsp, CHANNELMASK channelmask, int32 numchannels, SPEAKERMODE source_speakermode); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_DSP_GetChannelFormat (int dsp, out CHANNELMASK channelmask, out int32 numchannels, out SPEAKERMODE source_speakermode); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_DSP_GetOutputChannelFormat (int dsp, CHANNELMASK inmask, int32 inchannels, SPEAKERMODE inspeakermode, out CHANNELMASK outmask, out int32 outchannels, out SPEAKERMODE outspeakermode); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_DSP_Reset (int dsp); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_DSP_SetParameterFloat (int dsp, int32 index, float value); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_DSP_SetParameterInt (int dsp, int32 index, int32 value); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_DSP_SetParameterBool (int dsp, int32 index, bool value); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_DSP_SetParameterData (int dsp, int32 index, uint8* data, uint32 length); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_DSP_GetParameterFloat (int dsp, int32 index, out float value, int valuestr, int32 valuestrlen); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_DSP_GetParameterInt (int dsp, int32 index, out int32 value, int valuestr, int32 valuestrlen); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_DSP_GetParameterBool (int dsp, int32 index, out bool value, int valuestr, int32 valuestrlen); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_DSP_GetParameterData (int dsp, int32 index, out int data, out uint32 length, int valuestr, int32 valuestrlen); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_DSP_GetNumParameters (int dsp, out int32 numparams); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_DSP_GetParameterInfo (int dsp, int32 index, out int desc); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_DSP_GetDataParameterIndex (int dsp, int32 datatype, out int32 index); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_DSP_ShowConfigDialog (int dsp, int hwnd, bool show); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_DSP_GetInfo (int dsp, char8* name, out uint32 version, out int32 channels, out int32 configwidth, out int32 configheight); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_DSP_GetType (int dsp, out DSP_TYPE type); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_DSP_GetIdle (int dsp, out bool idle); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_DSP_SetUserData (int dsp, int userdata); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_DSP_GetUserData (int dsp, out int userdata); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] public static extern RESULT FMOD_DSP_SetMeteringEnabled (int dsp, bool inputEnabled, bool outputEnabled); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] public static extern RESULT FMOD_DSP_GetMeteringEnabled (int dsp, out bool inputEnabled, out bool outputEnabled); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] public static extern RESULT FMOD_DSP_GetMeteringInfo (int dsp, DSP_METERING_INFO inputInfo, DSP_METERING_INFO outputInfo); #endregion @@ -4043,23 +4043,23 @@ namespace FMOD } #region importfunctions - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_DSPConnection_GetInput (int dspconnection, out int input); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_DSPConnection_GetOutput (int dspconnection, out int output); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_DSPConnection_SetMix (int dspconnection, float volume); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_DSPConnection_GetMix (int dspconnection, out float volume); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_DSPConnection_SetMixMatrix (int dspconnection, float[] matrix, int32 outchannels, int32 inchannels, int32 inchannel_hop); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_DSPConnection_GetMixMatrix (int dspconnection, float[] matrix, out int32 outchannels, out int32 inchannels, int32 inchannel_hop); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_DSPConnection_GetType (int dspconnection, out DSPCONNECTION_TYPE type); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_DSPConnection_SetUserData (int dspconnection, int userdata); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_DSPConnection_GetUserData (int dspconnection, out int userdata); #endregion @@ -4171,45 +4171,45 @@ namespace FMOD } #region importfunctions - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_Geometry_Release (int geometry); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_Geometry_AddPolygon (int geometry, float directocclusion, float reverbocclusion, bool doublesided, int32 numvertices, VECTOR[] vertices, out int32 polygonindex); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_Geometry_GetNumPolygons (int geometry, out int32 numpolygons); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_Geometry_GetMaxPolygons (int geometry, out int32 maxpolygons, out int32 maxvertices); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_Geometry_GetPolygonNumVertices(int geometry, int32 index, out int32 numvertices); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_Geometry_SetPolygonVertex (int geometry, int32 index, int32 vertexindex, ref VECTOR vertex); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_Geometry_GetPolygonVertex (int geometry, int32 index, int32 vertexindex, out VECTOR vertex); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_Geometry_SetPolygonAttributes (int geometry, int32 index, float directocclusion, float reverbocclusion, bool doublesided); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_Geometry_GetPolygonAttributes (int geometry, int32 index, out float directocclusion, out float reverbocclusion, out bool doublesided); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_Geometry_SetActive (int geometry, bool active); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_Geometry_GetActive (int geometry, out bool active); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_Geometry_SetRotation (int geometry, ref VECTOR forward, ref VECTOR up); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_Geometry_GetRotation (int geometry, out VECTOR forward, out VECTOR up); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_Geometry_SetPosition (int geometry, ref VECTOR position); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_Geometry_GetPosition (int geometry, out VECTOR position); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_Geometry_SetScale (int geometry, ref VECTOR scale); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_Geometry_GetScale (int geometry, out VECTOR scale); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_Geometry_Save (int geometry, int data, out int32 datasize); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_Geometry_SetUserData (int geometry, int userdata); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_Geometry_GetUserData (int geometry, out int userdata); #endregion @@ -4276,23 +4276,23 @@ namespace FMOD } #region importfunctions - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_Reverb3D_Release(int reverb); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_Reverb3D_Set3DAttributes(int reverb, ref VECTOR position, float mindistance, float maxdistance); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_Reverb3D_Get3DAttributes(int reverb, ref VECTOR position, ref float mindistance, ref float maxdistance); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_Reverb3D_SetProperties(int reverb, ref REVERB_PROPERTIES properties); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_Reverb3D_GetProperties(int reverb, ref REVERB_PROPERTIES properties); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_Reverb3D_SetActive(int reverb, bool active); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_Reverb3D_GetActive(int reverb, out bool active); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_Reverb3D_SetUserData(int reverb, int userdata); - [Import(VERSION.dll), CLink, StdCall] + [Import(VERSION.dll), CLink, CallingConvention(.Stdcall)] private static extern RESULT FMOD_Reverb3D_GetUserData(int reverb, out int userdata); #endregion diff --git a/BeefLibs/MiniZ/src/Zip.bf b/BeefLibs/MiniZ/src/Zip.bf index 7c82c826..1f8cb678 100644 --- a/BeefLibs/MiniZ/src/Zip.bf +++ b/BeefLibs/MiniZ/src/Zip.bf @@ -285,11 +285,11 @@ namespace MiniZ DoNotSortCentralDirectory = 0x0800 } - [CLink, StdCall] + [CLink, CallingConvention(.Stdcall)] static extern void* malloc(int size); - [CLink, StdCall] + [CLink, CallingConvention(.Stdcall)] static extern void free(void* ptr); - [CLink, StdCall] + [CLink, CallingConvention(.Stdcall)] static extern void* realloc(void* ptr, int newSize); static void* def_alloc_func(void* opaque, int items, int size) @@ -2726,42 +2726,42 @@ namespace MiniZ const int32 SEEK_END = 2; const int32 SEEK_SET = 0; - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern FILE* fopen(char8* fileName, char8* mode); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern FILE* freopen(char8* fileName, char8* mode, FILE* stream); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern int32 fclose(FILE* stream); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern int32 fflush(FILE* stream); - //[StdCall, CLink] + //[CallingConvention(.Stdcall), CLink] //static extern int64 ftell64(FILE* stream); static int64 ftell64(FILE* stream) { return _ftelli64(stream); } - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern int64 _ftelli64(FILE* stream); - //[StdCall, CLink] + //[CallingConvention(.Stdcall), CLink] //static extern int64 fseek64(FILE* stream, int64 offset, int32 origin); static int32 fseek64(FILE* stream, int64 offset, int32 origin) { return _fseeki64(stream, offset, origin); } - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern int32 _fseeki64(FILE* stream, int64 offset, int32 origin); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern int fread(void* buf, int elementSize, int elementCount, FILE* stream); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern int fwrite(void* buf, int elementSize, int elementCount, FILE* stream); public struct ZipInternalState @@ -2840,13 +2840,13 @@ namespace MiniZ public int32 tm_isdst; // daylight savings time flag }; - [CLink, StdCall] + [CLink, CallingConvention(.Stdcall)] static extern time_t time(out time_t time); - [CLink, StdCall] + [CLink, CallingConvention(.Stdcall)] static extern time_t mktime(tm* time); - [CLink, StdCall] + [CLink, CallingConvention(.Stdcall)] static extern tm* localtime(time_t* time); static time_t zip_dos_to_time_t(int32 dos_time, int32 dos_date) @@ -2895,7 +2895,7 @@ namespace MiniZ public time_t modtime; // modification time }; - [CLink, StdCall] + [CLink, CallingConvention(.Stdcall)] static extern int32 _utime64(char8* fileName, utimbuf* t); static bool zip_set_file_times(char8* pFilename, time_t access_time, time_t modified_time) @@ -4663,7 +4663,7 @@ namespace MiniZ public time_t st_ctime; }; - [CLink, StdCall] + [CLink, CallingConvention(.Stdcall)] static extern int32 _fstat64i32(char8* fileName, FILE_STAT_STRUCT* stat); bool zip_add_mem_to_archive_file_in_place(char8* pZip_filename, char8* pArchive_name, void* pBuf, int buf_size, void* pComment, uint16 comment_size, ZipFlags level_and_flags_in) diff --git a/BeefLibs/corlib/src/Console.bf b/BeefLibs/corlib/src/Console.bf index 08bd998a..2c993d96 100644 --- a/BeefLibs/corlib/src/Console.bf +++ b/BeefLibs/corlib/src/Console.bf @@ -42,13 +42,13 @@ namespace System public uint16[2] mMaximumWindowSize; } - [CLink, StdCall] + [CLink, CallingConvention(.Stdcall)] static extern int SetConsoleTextAttribute(void* hConsoleOutput, uint16 wAttributes); - [CLink, StdCall] + [CLink, CallingConvention(.Stdcall)] static extern int GetConsoleScreenBufferInfo(void* hConsoleOutput, out CONSOLE_SCREEN_BUFFER_INFO lpConsoleScreenBufferInfo); - [CLink, StdCall] + [CLink, CallingConvention(.Stdcall)] static extern void* GetStdHandle(uint32 nStdHandle); #if BF_PLATFORM_WINDOWS diff --git a/BeefLibs/corlib/src/Double.bf b/BeefLibs/corlib/src/Double.bf index 8bd3df41..0b3acecc 100644 --- a/BeefLibs/corlib/src/Double.bf +++ b/BeefLibs/corlib/src/Double.bf @@ -148,7 +148,7 @@ namespace System return .Ok(strtod(tempStr, null)); } - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern int32 ftoa(float val, char8* str); static extern int32 ToString(double val, char8* str); diff --git a/BeefLibs/corlib/src/Float.bf b/BeefLibs/corlib/src/Float.bf index f7c9ae2c..1c829fe6 100644 --- a/BeefLibs/corlib/src/Float.bf +++ b/BeefLibs/corlib/src/Float.bf @@ -130,7 +130,7 @@ namespace System return 1; } - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern int32 ftoa(float val, char8* str); static extern int32 ToString(float val, char8* str); diff --git a/BeefLibs/corlib/src/Net/Socket.bf b/BeefLibs/corlib/src/Net/Socket.bf index a01b14b7..38885333 100644 --- a/BeefLibs/corlib/src/Net/Socket.bf +++ b/BeefLibs/corlib/src/Net/Socket.bf @@ -128,57 +128,57 @@ namespace System.Net } #if BF_PLATFORM_WINDOWS - [Import("wsock32.lib"), CLink, StdCall] + [Import("wsock32.lib"), CLink, CallingConvention(.Stdcall)] static extern int32 WSAStartup(uint16 versionRequired, WSAData* wsaData); - [Import("wsock32.lib"), CLink, StdCall] + [Import("wsock32.lib"), CLink, CallingConvention(.Stdcall)] static extern int32 WSAGetLastError(); #else [CLink] static int32 errno; #endif - [CLink, StdCall] + [CLink, CallingConvention(.Stdcall)] static extern HostEnt* gethostbyname(char8* name); - [CLink, StdCall] + [CLink, CallingConvention(.Stdcall)] static extern HSocket socket(int32 af, int32 type, int32 protocol); - [CLink, StdCall] + [CLink, CallingConvention(.Stdcall)] static extern int32 connect(HSocket s, SockAddr* name, int32 nameLen); #if BF_PLATFORM_WINDOWS - [Import("wsock32.lib"), CLink, StdCall] + [Import("wsock32.lib"), CLink, CallingConvention(.Stdcall)] static extern int32 closesocket(HSocket s); #else - [CLink, StdCall] + [CLink, CallingConvention(.Stdcall)] static extern int32 close(HSocket s); #endif - [CLink, StdCall] + [CLink, CallingConvention(.Stdcall)] static extern int32 bind(HSocket s, SockAddr* name, int32 nameLen); - [CLink, StdCall] + [CLink, CallingConvention(.Stdcall)] static extern int32 listen(HSocket s, int32 backlog); - [CLink, StdCall] + [CLink, CallingConvention(.Stdcall)] static extern HSocket accept(HSocket s, SockAddr* addr, int32* addrLen); #if BF_PLATFORM_WINDOWS - [CLink, StdCall] + [CLink, CallingConvention(.Stdcall)] static extern int32 ioctlsocket(HSocket s, int cmd, int* argp); #else - [CLink, StdCall] + [CLink, CallingConvention(.Stdcall)] static extern int32 ioctl(HSocket s, int cmd, int* argp); #endif - [CLink, StdCall] + [CLink, CallingConvention(.Stdcall)] static extern int32 select(int nfds, FDSet* readFDS, FDSet* writeFDS, FDSet* exceptFDS, TimeVal* timeVal); - [CLink, StdCall] + [CLink, CallingConvention(.Stdcall)] static extern int32 recv(HSocket s, void* ptr, int32 len, int32 flags); - [CLink, StdCall] + [CLink, CallingConvention(.Stdcall)] static extern int32 send(HSocket s, void* ptr, int32 len, int32 flags); public ~this() diff --git a/BeefLibs/corlib/src/OperatingSystem.bf b/BeefLibs/corlib/src/OperatingSystem.bf index 8fe20ecc..eb1d578b 100644 --- a/BeefLibs/corlib/src/OperatingSystem.bf +++ b/BeefLibs/corlib/src/OperatingSystem.bf @@ -78,34 +78,34 @@ namespace System public uint32 dwFileDateLS; // e.g. 0 } - [CLink, StdCall] + [CLink, CallingConvention(.Stdcall)] extern static bool GetVersionExA(OSVersionInfoExA* lpVersionInformation); - [CLink, StdCall] + [CLink, CallingConvention(.Stdcall)] extern static bool VerifyVersionInfoA(OSVersionInfoExA* lpVersionInformation, uint32 dwTypeMask, uint64 dwlConditionMask); - [CLink, StdCall] + [CLink, CallingConvention(.Stdcall)] extern static uint64 VerSetConditionMask(uint64 dwlConditionMask, uint32 dwTypeBitMask, uint8 dwConditionMask); - [CLink, StdCall] + [CLink, CallingConvention(.Stdcall)] extern static void GetNativeSystemInfo(SystemInfo* lpSystemInformation); - [CLink, StdCall] + [CLink, CallingConvention(.Stdcall)] extern static void GetSystemInfo(SystemInfo* lpSystemInfo); - [Import("netapi32.lib"), CLink, StdCall] + [Import("netapi32.lib"), CLink, CallingConvention(.Stdcall)] extern static uint32 NetWkstaGetInfo(char16* ServerName, uint32 Level, LPWKSTA_INFO_100* BufPtr); - [Import("netapi32.lib"), CLink, StdCall] + [Import("netapi32.lib"), CLink, CallingConvention(.Stdcall)] extern static int32 NetApiBufferFree(LPWKSTA_INFO_100 BufPtr); - [CLink, StdCall] + [CLink, CallingConvention(.Stdcall)] extern static uint32 GetFileVersionInfoSizeA(char8* lptstrFilename, uint32* lpdwHandle); - [Import("version.lib"), CLink, StdCall] + [Import("version.lib"), CLink, CallingConvention(.Stdcall)] extern static bool GetFileVersionInfoA(char8* lptstrFilename, uint32* dwHandle, uint32 dwLen, void* lpData); - [Import("version.lib"), CLink, StdCall] + [Import("version.lib"), CLink, CallingConvention(.Stdcall)] extern static bool VerQueryValueA(void* pBlock, char8* lpSubBlock, void** lplpBuffer, uint32* puLen); - [Import("user32.lib"), CLink, StdCall] + [Import("user32.lib"), CLink, CallingConvention(.Stdcall)] extern static int GetSystemMetrics(int nIndex); #endif diff --git a/BeefLibs/corlib/src/Platform.bf b/BeefLibs/corlib/src/Platform.bf index 8e31db6a..443e6604 100644 --- a/BeefLibs/corlib/src/Platform.bf +++ b/BeefLibs/corlib/src/Platform.bf @@ -50,47 +50,47 @@ namespace System TempFileError = (int)Result.TempFileError } - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern uint32 BfpSystem_TickCount(); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern BfpTimeStamp BfpSystem_GetTimeStamp(); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern uint8 BfpSystem_InterlockedExchange8(uint8* ptr, uint8 val); /// Returns the initial value in 'ptr' - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern uint16 BfpSystem_InterlockedExchange16(uint16* ptr, uint16 val); /// Returns the initial value in 'ptr' - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern uint32 BfpSystem_InterlockedExchange32(uint32* ptr, uint32 val); /// Returns the initial value in 'ptr' - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern uint64 BfpSystem_InterlockedExchange64(uint64* ptr, uint64 val); /// Returns the initial value in 'ptr' - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern uint8 BfpSystem_InterlockedExchangeAdd8(uint8* ptr, uint8 val); /// Returns the initial value in 'ptr' - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern uint16 BfpSystem_InterlockedExchangeAdd16(uint16* ptr, uint16 val); /// Returns the initial value in 'ptr' - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern uint32 BfpSystem_InterlockedExchangeAdd32(uint32* ptr, uint32 val); /// Returns the initial value in 'ptr' - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern uint64 BfpSystem_InterlockedExchangeAdd64(uint64* ptr, uint64 val); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern uint8 BfpSystem_InterlockedCompareExchange8(uint8* ptr, uint8 oldVal, uint8 newVal); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern uint16 BfpSystem_InterlockedCompareExchange16(uint16* ptr, uint16 oldVal, uint16 newVal); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern uint32 BfpSystem_InterlockedCompareExchange32(uint32* ptr, uint32 oldVal, uint32 newVal); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern uint64 BfpSystem_InterlockedCompareExchange64(uint64* ptr, uint64 oldVal, uint64 newVal); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern void BfpSystem_GetExecutablePath(char8* outStr, int32* inOutStrSize, BfpSystemResult* outResult); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern void BfpSystem_GetEnvironmentStrings(char8* outStr, int32* inOutStrSize, BfpSystemResult* outResult); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern int32 BfpSystem_GetNumLogicalCPUs(BfpSystemResult* outResult); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern int64 BfpSystem_GetCPUTick(); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern int64 BfpSystem_GetCPUTickFreq(); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern void BfpSystem_CreateGUID(Guid* outGuid); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern void BfpSystem_GetComputerName(char8* outStr, int32* inOutStrSize, BfpSystemResult* outResult); public enum BfpFileWatcherFlags : int32 @@ -110,9 +110,9 @@ namespace System public function void BfpDirectoryChangeFunc(BfpFileWatcher* watcher, void* userData, BfpFileChangeKind changeKind, char8* directory, char8* fileName, char8* oldName); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern BfpFileWatcher* BfpFileWatcher_WatchDirectory(char8* path, BfpDirectoryChangeFunc callback, BfpFileWatcherFlags flags, void* userData, BfpFileResult* outResult); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern void BfpFileWatcher_Release(BfpFileWatcher* fileWatcher); public enum BfpProcessResult : int32 @@ -121,19 +121,19 @@ namespace System InsufficientBuffer = (int)Result.InsufficientBuffer } - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern bool BfpProcess_IsRemoteMachine(char8* machineName); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern BfpProcess* BfpProcess_GetById(char8* machineName, int32 processId, BfpProcessResult* outResult); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern void BfpProcess_Enumerate(char8* machineName, BfpProcess** outProcesses, int32* inOutProcessesSize, BfpProcessResult* outResult); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern void BfpProcess_Release(BfpProcess* process); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern void BfpProcess_GetMainWindowTitle(BfpProcess* process, char8* outTitle, int32* inOutTitleSize, BfpProcessResult* outResult); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern void BfpProcess_GetProcessName(BfpProcess* process, char8* outName, int32* inOutNameSize, BfpProcessResult* outResult); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern int32 BfpProcess_GetProcessId(BfpProcess* process); public enum BfpSpawnFlags : int32 @@ -166,29 +166,29 @@ namespace System UnknownError = (int)Result.UnknownError }; - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern BfpSpawn* BfpSpawn_Create(char8* targetPath, char8* args, char8* workingDir, char8* env, BfpSpawnFlags flags, BfpSpawnResult* outResult); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern void BfpSpawn_Release(BfpSpawn* spawn); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern void BfpSpawn_Kill(BfpSpawn* spawn, int32 exitCode, BfpKillFlags killFlags, BfpSpawnResult* outResult); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern bool BfpSpawn_WaitFor(BfpSpawn* spawn, int waitMS, int* outExitCode, BfpSpawnResult* outResult); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern void BfpSpawn_GetStdHandles(BfpSpawn* spawn, BfpFile** outStdIn, BfpFile** outStdOut, BfpFile** outStdErr); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern int BfpProcess_GetCurrentId(); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern BfpCritSect* BfpCritSect_Create(); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern void BfpCritSect_Release(BfpCritSect* critSect); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern void BfpCritSect_Enter(BfpCritSect* critSect); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern bool BfpCritSect_TryEnter(BfpCritSect* critSect, int32 waitMS); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern void BfpCritSect_Leave(BfpCritSect* critSect); public enum BfpEventFlags : int32 @@ -206,15 +206,15 @@ namespace System BfpEventResult_NotSupported = (int)Result.NotSupported }; - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern BfpEvent* BfpEvent_Create(BfpEventFlags flags); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern void BfpEvent_Release(BfpEvent* event); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern void BfpEvent_Set(BfpEvent* event, bool requireManualReset); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern void BfpEvent_Reset(BfpEvent* event, BfpEventResult* outResult); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern bool BfpEvent_WaitFor(BfpEvent* event, int32 waitMS); public enum BfpLibResult : int32 @@ -224,13 +224,13 @@ namespace System InsufficientBuffer = (int)Result.InsufficientBuffer }; - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern BfpDynLib* BfpDynLib_Load(char8* fileName); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern void BfpDynLib_Release(BfpDynLib* lib); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern void BfpDynLib_GetFilePath(BfpDynLib* lib, char8* outPath, int32* inOutPathSize, BfpLibResult* outResult); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern void* BfpDynLib_GetProcAddress(BfpDynLib* lib, char8* name); public enum BfpFileResult : int32 @@ -249,19 +249,19 @@ namespace System NotEmpty = (int)Result.NotEmpty }; - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern void BfpDirectory_Create(char8* name, BfpFileResult* outResult); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern void BfpDirectory_Rename(char8* oldName, char8* newName, BfpFileResult* outResult); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern void BfpDirectory_Delete(char8* name, BfpFileResult* outResult); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern void BfpDirectory_GetCurrent(char8* outPath, int32* inOutPathSize, BfpFileResult* outResult); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern void BfpDirectory_SetCurrent(char8* path, BfpFileResult* outResult); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern bool BfpDirectory_Exists(char8* path); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern void BfpDirectory_GetSysDirectory(BfpSysDirectoryKind sysDirKind, char8* outPath, int32* inOutPathLen, BfpFileResult* outResult); public enum BfpFileCreateKind : int32 @@ -330,45 +330,45 @@ namespace System In } - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern BfpFile* BfpFile_Create(char8* name, BfpFileCreateKind createKind, BfpFileCreateFlags createFlags, BfpFileAttributes createdFileAttrs, BfpFileResult* outResult); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern BfpFile* BfpFile_GetStd(BfpFileStdKind kind, BfpFileResult* outResult); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern void BfpFile_Release(BfpFile* file); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern int BfpFile_Write(BfpFile* file, void* buffer, int size, int timeoutMS, BfpFileResult* outResult); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern int BfpFile_Read(BfpFile* file, void* buffer, int size, int timeoutMS, BfpFileResult* outResult); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern void BfpFile_Flush(BfpFile* file); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern int64 BfpFile_GetFileSize(BfpFile* file); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern int64 BfpFile_Seek(BfpFile* file, int64 offset, BfpFileSeekKind seekKind); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern void BfpFile_Truncate(BfpFile* file); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern BfpTimeStamp BfpFile_GetTime_LastWrite(char8* path); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern BfpFileAttributes BfpFile_GetAttributes(char8* path, BfpFileResult* outResult); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern void BfpFile_SetAttributes(char8* path, BfpFileAttributes attribs, BfpFileResult* outResult); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern void BfpFile_Copy(char8* oldPath, char8* newPath, BfpFileCopyKind copyKind, BfpFileResult* outResult); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern void BfpFile_Rename(char8* oldPath, char8* newPath, BfpFileResult* outResult); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern void BfpFile_Delete(char8* path, BfpFileResult* outResult); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern bool BfpFile_Exists(char8* path); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern void BfpFile_GetTempPath(char8* outPath, int32* inOutPathSize, BfpFileResult* outResult); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern void BfpFile_GetTempFileName(char8* outName, int32* inOutNameSize, BfpFileResult* outResult); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern void BfpFile_GetFullPath(char8* inPath, char8* outPath, int32* inOutPathSize, BfpFileResult* outResult); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern void BfpFile_GetActualPath(char8* inPath, char8* outPath, int32* inOutPathSize, BfpFileResult* outResult); public enum BfpFindFileFlags : int32 @@ -378,21 +378,21 @@ namespace System Directories = 2, }; - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern BfpFindFileData* BfpFindFileData_FindFirstFile(char8* path, BfpFindFileFlags flags, BfpFileResult* outResult); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern bool BfpFindFileData_FindNextFile(BfpFindFileData* findData); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern void BfpFindFileData_GetFileName(BfpFindFileData* findData, char8* outName, int32* inOutNameSize, BfpFileResult* outResult); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern BfpTimeStamp BfpFindFileData_GetTime_LastWrite(BfpFindFileData* findData); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern BfpTimeStamp BfpFindFileData_GetTime_Created(BfpFindFileData* findData); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern BfpTimeStamp BfpFindFileData_GetTime_Access(BfpFindFileData* findData); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern BfpFileAttributes BfpFindFileData_GetFileAttributes(BfpFindFileData* findData); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern void BfpFindFileData_Release(BfpFindFileData* findData); public enum BfpSysDirectoryKind : int32 diff --git a/BeefLibs/corlib/src/Windows.bf b/BeefLibs/corlib/src/Windows.bf index 8cc6b5a1..3102b72d 100644 --- a/BeefLibs/corlib/src/Windows.bf +++ b/BeefLibs/corlib/src/Windows.bf @@ -79,7 +79,7 @@ namespace System } } - [Import("ole32.lib"), CLink, StdCall] + [Import("ole32.lib"), CLink, CallingConvention(.Stdcall)] public static extern HResult CoCreateInstanceFromApp(ref Guid clsid, COM_IUnknown* unkOuter, ClsContext clsCtx, void* reserved, uint32 count, MULTI_QI* result); struct MULTI_QI @@ -89,10 +89,10 @@ namespace System public HResult mHR; } - [Import("ole32.lib"), CLink, StdCall] + [Import("ole32.lib"), CLink, CallingConvention(.Stdcall)] public static extern HResult CoCreateInstance(ref Guid clsId, COM_IUnknown* unkOuter, ClsContext clsCtx, ref Guid iid, void** result); - [Import("ole32.lib"), CLink, StdCall] + [Import("ole32.lib"), CLink, CallingConvention(.Stdcall)] public static extern void CoTaskMemFree(void* ptr); } @@ -1107,19 +1107,19 @@ namespace System TRUSTEE_W Trustee; } - [Import("version.lib"), CLink, StdCall] + [Import("version.lib"), CLink, CallingConvention(.Stdcall)] public static extern IntBool GetFileVersionInfoW(char16* lptstrFilename, uint32 dwHandle, uint32 dwLen, void* lpData); - [Import("version.lib"), CLink, StdCall] + [Import("version.lib"), CLink, CallingConvention(.Stdcall)] public static extern uint32 GetFileVersionInfoSizeW(char16* lptstrFilename, out uint32 lpdwHandle); - [Import("version.lib"), CLink, StdCall] + [Import("version.lib"), CLink, CallingConvention(.Stdcall)] public static extern IntBool VerQueryValueW(void* pBlock, char16* lpSubBlock, ref void* lplpBuffer, out int32 puLen); - [Import("version.lib"), CLink, StdCall] + [Import("version.lib"), CLink, CallingConvention(.Stdcall)] public static extern uint32 VerLanguageNameW(uint32 wLang, char16* szLang, uint32 cchLang); - [Import("advapi32.lib"), CLink, StdCall] + [Import("advapi32.lib"), CLink, CallingConvention(.Stdcall)] public static extern uint32 GetNamedSecurityInfoW( char16* pObjectName, SE_OBJECT_TYPE ObjectType, @@ -1131,7 +1131,7 @@ namespace System SECURITY_DESCRIPTOR* *ppSecurityDescriptor ); - [Import("advapi32.lib"), CLink, StdCall] + [Import("advapi32.lib"), CLink, CallingConvention(.Stdcall)] public static extern void BuildExplicitAccessWithNameW( EXPLICIT_ACCESS_W* pExplicitAccess, char16* pTrusteeName, @@ -1140,7 +1140,7 @@ namespace System uint32 Inheritance ); - [Import("advapi32.lib"), CLink, StdCall] + [Import("advapi32.lib"), CLink, CallingConvention(.Stdcall)] public static extern uint32 SetEntriesInAclW( uint32 cCountOfExplicitEntries, EXPLICIT_ACCESS_W* pListOfExplicitEntries, @@ -1148,7 +1148,7 @@ namespace System ACL** NewAcl ); - [Import("advapi32.lib"), CLink, StdCall] + [Import("advapi32.lib"), CLink, CallingConvention(.Stdcall)] public static extern uint32 SetNamedSecurityInfoW( char16* pObjectName, SE_OBJECT_TYPE ObjectType, @@ -1159,282 +1159,282 @@ namespace System ACL* pSacl ); - [CLink, StdCall] + [CLink, CallingConvention(.Stdcall)] public static extern void LocalFree(void* ptr); - [CLink, StdCall] + [CLink, CallingConvention(.Stdcall)] public static extern int32 GetTimeZoneInformation(out TimeZoneInformation dynamicTimeZoneInformation); - [CLink, StdCall] + [CLink, CallingConvention(.Stdcall)] public static extern int32 GetDynamicTimeZoneInformation(out DynamicTimeZoneInformation dynamicTimeZoneInformation); - [Import("advapi32.lib"), CLink, StdCall] + [Import("advapi32.lib"), CLink, CallingConvention(.Stdcall)] public static extern int32 RegOpenKeyExW(HKey hKey, char16* lpSubKey, uint32 ulOptions, uint32 samDesired, out HKey phkResult); - [Import("advapi32.lib"), CLink, StdCall] + [Import("advapi32.lib"), CLink, CallingConvention(.Stdcall)] public static extern int32 RegOpenKeyExA(HKey hKey, char8* lpSubKey, uint32 ulOptions, uint32 samDesired, out HKey phkResult); - [Import("advapi32.lib"), CLink, StdCall] + [Import("advapi32.lib"), CLink, CallingConvention(.Stdcall)] public static extern int32 RegCreateKeyExW(HKey hKey, char16* lpSubKey, uint32 reserved, char16* lpClass, uint32 dwOptions, uint32 samDesired, SecurityAttributes* lpSecurityAttributes, out HKey phkResult, uint32* lpdwDisposition); - [Import("advapi32.lib"), CLink, StdCall] + [Import("advapi32.lib"), CLink, CallingConvention(.Stdcall)] public static extern int32 RegCreateKeyExA(HKey hKey, char8* lpSubKey, uint32 reserved, char8* lpClass, uint32 dwOptions, uint32 samDesired, SecurityAttributes* lpSecurityAttributes, out HKey phkResult, uint32* lpdwDisposition); - [Import("advapi32.lib"), CLink, StdCall] + [Import("advapi32.lib"), CLink, CallingConvention(.Stdcall)] public static extern int32 RegCloseKey(HKey hKey); - [Import("advapi32.lib"), CLink, StdCall] + [Import("advapi32.lib"), CLink, CallingConvention(.Stdcall)] public static extern int32 RegDeleteKeyW(HKey hKey, char16* lpSubKey); - [Import("advapi32.lib"), CLink, StdCall] + [Import("advapi32.lib"), CLink, CallingConvention(.Stdcall)] public static extern int32 RegDeleteKeyA(HKey hKey, char8* lpSubKey); - [Import("advapi32.lib"), CLink, StdCall] + [Import("advapi32.lib"), CLink, CallingConvention(.Stdcall)] public static extern int32 RegDeleteValueW(HKey hKey, char16* lpSubKey); - [Import("advapi32.lib"), CLink, StdCall] + [Import("advapi32.lib"), CLink, CallingConvention(.Stdcall)] public static extern int32 RegDeleteValueA(HKey hKey, char8* lpSubKey); - [Import("advapi32.lib"), CLink, StdCall] + [Import("advapi32.lib"), CLink, CallingConvention(.Stdcall)] public static extern int32 RegQueryValueExW(HKey hKey, char16* lpValueName, uint32* lpReserved, uint32* lpType, void* lpData, uint32* lpcbData); - [Import("advapi32.lib"), CLink, StdCall] + [Import("advapi32.lib"), CLink, CallingConvention(.Stdcall)] public static extern int32 RegQueryValueExA(HKey hKey, char8* lpValueName, uint32* lpReserved, uint32* lpType, void* lpData, uint32* lpcbData); - [Import("advapi32.lib"), CLink, StdCall] + [Import("advapi32.lib"), CLink, CallingConvention(.Stdcall)] public static extern int32 RegEnumValueW(HKey hKey, int32 dwIndex, char16* lpValueName, uint32* lpcchValueName, uint32* lpReserved, uint32* lpType, void* lpData, uint32* lpcbData); - [Import("advapi32.lib"), CLink, StdCall] + [Import("advapi32.lib"), CLink, CallingConvention(.Stdcall)] public static extern int32 RegEnumValueA(HKey hKey, int32 dwIndex, char8* lpValueName, uint32* lpcchValueName, uint32* lpReserved, uint32* lpType, void* lpData, uint32* lpcbData); - [Import("advapi32.lib"), CLink, StdCall] + [Import("advapi32.lib"), CLink, CallingConvention(.Stdcall)] public static extern int32 RegGetValueW(HKey hkey, char16* lpSubKey, char16* lpValue, uint32 dwFlags, uint32* pdwType, void* pvData, uint32* pcbData); - [Import("advapi32.lib"), CLink, StdCall] + [Import("advapi32.lib"), CLink, CallingConvention(.Stdcall)] public static extern int32 RegGetValueA(HKey hkey, char8* lpSubKey, char8* lpValue, uint32 dwFlags, uint32* pdwType, void* pvData, uint32* pcbData); - [Import("advapi32.lib"), CLink, StdCall] + [Import("advapi32.lib"), CLink, CallingConvention(.Stdcall)] public static extern int32 RegSetValueExW(HKey hkey, char16* lpValue, uint32 reserved, uint32 dwType, void* pvData, uint32 cbData); - [Import("advapi32.lib"), CLink, StdCall] + [Import("advapi32.lib"), CLink, CallingConvention(.Stdcall)] public static extern int32 RegSetValueExA(HKey hkey, char8* lpValue, uint32 reserved, uint32 dwType, void* pvData, uint32 cbData); - [Import("shell32.lib"), CLink, StdCall] + [Import("shell32.lib"), CLink, CallingConvention(.Stdcall)] public static extern int32 SHGetSpecialFolderLocation(HWnd hwnd, int32 csidl, ref int ppidl); - [Import("shell32.lib"), CLink, StdCall] + [Import("shell32.lib"), CLink, CallingConvention(.Stdcall)] public static extern bool SHGetPathFromIDList(int pidl, char8* path); - [Import("shell32.lib"), CLink, StdCall] + [Import("shell32.lib"), CLink, CallingConvention(.Stdcall)] public static extern int SHBrowseForFolder(ref BrowseInfo bi); - [Import("shell32.lib"), CLink, StdCall] + [Import("shell32.lib"), CLink, CallingConvention(.Stdcall)] public static extern COM_IUnknown.HResult SHCreateItemFromParsingName(char16* pszPath, COM_IBindCtx *pbc, Guid riid, void **ppv); - [CLink, StdCall] + [CLink, CallingConvention(.Stdcall)] public static extern int32 GetLastError(); - [CLink, StdCall] + [CLink, CallingConvention(.Stdcall)] public static extern IntBool GetExitCodeProcess(ProcessHandle process, out int32 exitCode); - [CLink, StdCall] + [CLink, CallingConvention(.Stdcall)] public static extern IntBool GetExitCodeThread(Handle process, out int32 exitCode); - [CLink, StdCall] + [CLink, CallingConvention(.Stdcall)] public static extern int32 ResumeThread(Handle thread); - [CLink, StdCall] + [CLink, CallingConvention(.Stdcall)] public static extern ProcessHandle GetCurrentProcess(); - [CLink, StdCall] + [CLink, CallingConvention(.Stdcall)] public static extern int32 GetCurrentProcessId(); - [CLink, StdCall] + [CLink, CallingConvention(.Stdcall)] public static extern ProcessHandle OpenProcess(int32 desiredAccess, IntBool inheritHandle, int32 processId); - [CLink, StdCall] + [CLink, CallingConvention(.Stdcall)] public static extern Handle CreateRemoteThread(ProcessHandle process, SecurityAttributes* threadAttributes, int stackSize, void* startAddress, void* parameter, int32 creationFlags, int32* threadId); - [CLink, StdCall] + [CLink, CallingConvention(.Stdcall)] public static extern IntBool WriteProcessMemory(ProcessHandle process, void* baseAddress, void* buffer, int size, int* numberOfBytesWritten); - [CLink, StdCall] + [CLink, CallingConvention(.Stdcall)] public static extern void* GetProcAddress(HModule module, char8* procName); - [CLink, StdCall] + [CLink, CallingConvention(.Stdcall)] public static extern void* VirtualAllocEx(ProcessHandle process, void* address, int size, int32 allocationType, int32 protect); - [CLink, StdCall] + [CLink, CallingConvention(.Stdcall)] public static extern void* VirtualFreeEx(ProcessHandle process, void* address, int size, int32 allocationType); - [CLink, StdCall] + [CLink, CallingConvention(.Stdcall)] public static extern FileHandle GetStdHandle(int32 stdHandle); - [CLink, StdCall] + [CLink, CallingConvention(.Stdcall)] public static extern Handle ShellExecuteW(Handle hwnd, char16* operation, char16* file, char16* parameters, char16* directory, int32 showCmd); - [CLink, StdCall] + [CLink, CallingConvention(.Stdcall)] public static extern Handle ShellExecuteA(Handle hwnd, char8* operation, char8* file, char8* parameters, char8* directory, int32 showCmd); - [CLink, StdCall] + [CLink, CallingConvention(.Stdcall)] public static extern IntBool ShellExecuteExA(ShellExecuteInfo* shellExecuteInfo); - [CLink, StdCall] + [CLink, CallingConvention(.Stdcall)] public static extern void GetStartupInfoA(StartupInfo* startupInfo); - [CLink, StdCall] + [CLink, CallingConvention(.Stdcall)] public static extern IntBool CreateProcessW(char16* applicationName, char16* commandLine, SecurityAttributes* processAttributes, SecurityAttributes* threadAttributes, IntBool inheritHandles, int32 creationFlags, void* environment, char16* currentDirectory, StartupInfo* startupInfo, ProcessInformation* processInformation); - [CLink, StdCall] + [CLink, CallingConvention(.Stdcall)] public static extern IntBool CreateProcessA(char8* applicationName, char8* commandLine, SecurityAttributes* processAttributes, SecurityAttributes* threadAttributes, IntBool inheritHandles, int32 creationFlags, void* environment, char8* currentDirectory, StartupInfo* startupInfo, ProcessInformation* processInformation); - [CLink, StdCall] + [CLink, CallingConvention(.Stdcall)] public static extern IntBool TerminateProcess(ProcessHandle process); - [CLink, StdCall] + [CLink, CallingConvention(.Stdcall)] public static extern IntBool CreatePipe(out Handle readPipe, out Handle writePipe, SecurityAttributes* pipeAttributes, int32 size); - [CLink, StdCall] + [CLink, CallingConvention(.Stdcall)] public static extern Handle CreateNamedPipeA(char8* lpName, uint32 dwOpenMode, uint32 dwPipeMode, uint32 nMaxInstances, uint32 nOutBufferSize, uint32 nInBufferSize, uint32 nDefaultTimeOut, SecurityAttributes* lpSecurityAttributes); - [CLink, StdCall] + [CLink, CallingConvention(.Stdcall)] public static extern IntBool ConnectNamedPipe(Handle handle, Overlapped* overlapped); - [CLink, StdCall] + [CLink, CallingConvention(.Stdcall)] public static extern IntBool CallNamedPipeA(char8* name, void* inBuffer, int32 inBufferSize, void* outBuffer, int32 outBufferSize, int32* bytesRead, int32 timeOut); - [CLink, StdCall] + [CLink, CallingConvention(.Stdcall)] public static extern IntBool DisconnectNamedPipe(Handle handle); - [CLink, StdCall] + [CLink, CallingConvention(.Stdcall)] public static extern EventHandle CreateEventA(SecurityAttributes* eventAttribuetes, IntBool manualReset, IntBool initialState, char8* name); - [CLink, StdCall] + [CLink, CallingConvention(.Stdcall)] public static extern IntBool SetEvent(EventHandle eventHandle); - [CLink, StdCall] + [CLink, CallingConvention(.Stdcall)] public static extern IntBool ResetEvent(EventHandle eventHandle); - [CLink, StdCall] + [CLink, CallingConvention(.Stdcall)] public static extern int32 WaitForSingleObject(Handle handle, int32 milliseconds); - [CLink, StdCall] + [CLink, CallingConvention(.Stdcall)] public static extern int32 WaitForMultipleObjects(int32 count, Handle* handles, IntBool waitAll, int32 milliseconds); - [CLink, StdCall] + [CLink, CallingConvention(.Stdcall)] public static extern IOCompletionHandle CreateIoCompletionPort(FileHandle fileHandle, IOCompletionHandle existingCompletionPort, int completionKey, int32 numberOfConcurrentThreads); - [CLink, StdCall] + [CLink, CallingConvention(.Stdcall)] public static extern IntBool GetQueuedCompletionStatus(IOCompletionHandle completionPort, out int32 numberOfBytes, out int completionKey, out Overlapped* overlapped, int32 milliseconds); - [CLink, StdCall] + [CLink, CallingConvention(.Stdcall)] public static extern IntBool PostQueuedCompletionStatus(IOCompletionHandle completionPort, int32 numberOfBytes, int completionKey, Overlapped* overlapped); - [CLink, StdCall] + [CLink, CallingConvention(.Stdcall)] public static extern IntBool DuplicateHandle(Handle sourceProcessHandle, Handle sourceHandle, Handle targetProcessHandle, Handle* targetHandle, int32 desiredAccess, IntBool inheritHandle, int32 options); - [CLink, StdCall] + [CLink, CallingConvention(.Stdcall)] public static extern IntBool CloseHandle(Handle handle); - [CLink, StdCall] + [CLink, CallingConvention(.Stdcall)] public static extern int32 GetFileType(FileHandle handle); - [CLink, StdCall] + [CLink, CallingConvention(.Stdcall)] public static extern int32 GetFileSize(FileHandle handle, int32* sizeHigh); - [CLink, StdCall] + [CLink, CallingConvention(.Stdcall)] public static extern FileHandle CreateFileA(char8* lpFileName, int32 dwDesiredAccess, System.IO.FileShare dwShareMode, SecurityAttributes* securityAttrs, System.IO.FileMode dwCreationDisposition, int32 dwFlagsAndAttributes, Handle hTemplateFile); - [CLink, StdCall] + [CLink, CallingConvention(.Stdcall)] public static extern FileHandle CreateFileW(char16* lpFileName, int32 dwDesiredAccess, System.IO.FileShare dwShareMode, SecurityAttributes* securityAttrs, System.IO.FileMode dwCreationDisposition, int32 dwFlagsAndAttributes, Handle hTemplateFile); - [CLink, StdCall] + [CLink, CallingConvention(.Stdcall)] public static extern uint32 GetWindowsDirectoryW(char16* lpBuffer, uint32 uSize); - [CLink, StdCall] + [CLink, CallingConvention(.Stdcall)] public static extern uint32 GetWindowsDirectoryA(char8* lpBuffer, uint32 uSize); - [CLink, StdCall] + [CLink, CallingConvention(.Stdcall)] public static extern IntBool CreateDirectoryW(char16* pathName, SecurityAttributes* securityAttributes); - [CLink, StdCall] + [CLink, CallingConvention(.Stdcall)] public static extern IntBool CreateDirectoryA(char8* pathName, SecurityAttributes* securityAttributes); - [CLink, StdCall] + [CLink, CallingConvention(.Stdcall)] public static extern IntBool RemoveDirectoryW(char16* pathName); - [CLink, StdCall] + [CLink, CallingConvention(.Stdcall)] public static extern IntBool RemoveDirectoryA(char8* pathName); - [CLink, StdCall] + [CLink, CallingConvention(.Stdcall)] public static extern IntBool DeleteFileW(char16* pathName); - [CLink, StdCall] + [CLink, CallingConvention(.Stdcall)] public static extern IntBool DeleteFileA(char8* pathName); - [CLink, StdCall] + [CLink, CallingConvention(.Stdcall)] public static extern IntBool CopyFileW(char16* srcName, char16* dstName, IntBool failIfExists); - [CLink, StdCall] + [CLink, CallingConvention(.Stdcall)] public static extern IntBool CopyFileA(char8* srcName, char8* dstName, IntBool failIfExists); - [CLink, StdCall] + [CLink, CallingConvention(.Stdcall)] public static extern IntBool MoveFileW(char16* srcName, char16* dstName); - [CLink, StdCall] + [CLink, CallingConvention(.Stdcall)] public static extern IntBool MoveFileA(char8* srcName, char8* dstName); - [CLink, StdCall] + [CLink, CallingConvention(.Stdcall)] public static extern int32 ReadFile(Handle handle, uint8* bytes, int32 numBytesToRead, out int32 numBytesRead, Overlapped* overlapped); - [CLink, StdCall] + [CLink, CallingConvention(.Stdcall)] public static extern int32 WriteFile(Handle handle, uint8* bytes, int32 numBytesToWrite, out int32 numBytesWritten, Overlapped* overlapped); - [CLink, StdCall] + [CLink, CallingConvention(.Stdcall)] public static extern FindHandle FindFirstFileW(char16* fileName, ref NativeFindData findFileData); - [CLink, StdCall] + [CLink, CallingConvention(.Stdcall)] public static extern IntBool FindNextFileW(FindHandle findHandle, ref NativeFindData findFileData); - [CLink, StdCall] + [CLink, CallingConvention(.Stdcall)] public static extern IntBool FindClose(FindHandle findHandle); - [CLink, StdCall] + [CLink, CallingConvention(.Stdcall)] public static extern IntBool GetFileAttributesExW(char16* name, int32 fileInfoLevel, FileAttributeData* fileInformation); - [CLink, StdCall] + [CLink, CallingConvention(.Stdcall)] public static extern IntBool SetFileAttributesW(char16* name, int32 attribs); - [Import("user32.lib"), CLink, StdCall] + [Import("user32.lib"), CLink, CallingConvention(.Stdcall)] public static extern int32 MessageBoxA(HWnd hWnd, char8* text, char8* caption, int32 type); - [Import("user32.lib"), CLink, StdCall] + [Import("user32.lib"), CLink, CallingConvention(.Stdcall)] public static extern int32 MessageBoxW(HWnd hWnd, char16* text, char16* caption, int32 type); - [CLink, StdCall] + [CLink, CallingConvention(.Stdcall)] public static extern int32 SetErrorMode(int32 errorMode); - [Import("user32.lib"), CLink, StdCall] + [Import("user32.lib"), CLink, CallingConvention(.Stdcall)] public static extern HWnd GetActiveWindow(); - [Import("user32.lib"), CLink, StdCall] + [Import("user32.lib"), CLink, CallingConvention(.Stdcall)] public static extern HWnd SetActiveWindow(HWnd wnd); - [CLink, StdCall] + [CLink, CallingConvention(.Stdcall)] public static extern int CallWindowProcA(int wndProc, HWnd hWnd, int32 msg, int wParam, int lParam); - [CLink, StdCall] + [CLink, CallingConvention(.Stdcall)] public static extern int CallWindowProcW(int wndProc, HWnd hWnd, int32 msg, int wParam, int lParam); public static int GetWindowLong(HWnd hWnd, int32 nIndex) @@ -1450,10 +1450,10 @@ namespace System } #if BF32 - [CLink, StdCall] + [CLink, CallingConvention(.Stdcall)] public static extern int GetWindowLongA(int hWnd, int nIndex); #else - [CLink, StdCall] + [CLink, CallingConvention(.Stdcall)] public static extern int GetWindowLongPtrW(int hWnd, int32 nIndex); #endif @@ -1467,118 +1467,118 @@ namespace System } #if BF32 - [CLink, StdCall] + [CLink, CallingConvention(.Stdcall)] public static extern int SetWindowLongA(int hWnd, int nIndex, int value); #else - [CLink, StdCall] + [CLink, CallingConvention(.Stdcall)] public static extern int SetWindowLongPtrW(int hWnd, int32 nIndex, int value); #endif - [Import("user32.lib"), CLink, StdCall] + [Import("user32.lib"), CLink, CallingConvention(.Stdcall)] public static extern IntBool PostMessageW(HWnd hWnd, int32 msg, int wParam, int lParam); - [Import("user32.lib"), CLink, StdCall] + [Import("user32.lib"), CLink, CallingConvention(.Stdcall)] public static extern int32 SendMessageW(HWnd hWnd, int32 msg, int wParam, int lParam); - [Import("user32.lib"), CLink, StdCall] + [Import("user32.lib"), CLink, CallingConvention(.Stdcall)] public static extern int32 SendMessageTimeoutW(HWnd hWnd, int32 msg, int wParam, int lParam, int32 flags, int32 timeout, int32* result); - [Import("user32.lib "), CLink, StdCall] + [Import("user32.lib "), CLink, CallingConvention(.Stdcall)] public static extern HWnd SetFocus(HWnd hWnd); - [Import("user32.lib"), CLink, StdCall] + [Import("user32.lib"), CLink, CallingConvention(.Stdcall)] public static extern IntBool EnumWindows(void* callback, void* extraData); - [Import("user32.lib"), CLink, StdCall] + [Import("user32.lib"), CLink, CallingConvention(.Stdcall)] public static extern HWnd GetWindow(HWnd hWnd, int32 uCmd); - [Import("user32.lib"), CLink, StdCall] + [Import("user32.lib"), CLink, CallingConvention(.Stdcall)] public static extern HWnd FindWindowW(char16* className, char16* windowName); - [Import("user32.lib"), CLink, StdCall] + [Import("user32.lib"), CLink, CallingConvention(.Stdcall)] public static extern HWnd FindWindowA(char8* className, char8* windowName); - [Import("user32.lib"), CLink, StdCall] + [Import("user32.lib"), CLink, CallingConvention(.Stdcall)] public static extern IntBool IsWindowVisible(HWnd hWnd); - [Import("user32.lib"), CLink, StdCall] + [Import("user32.lib"), CLink, CallingConvention(.Stdcall)] public static extern int32 GetWindowTextLengthW(HWnd hWnd); - [Import("user32.lib"), CLink, StdCall] + [Import("user32.lib"), CLink, CallingConvention(.Stdcall)] public static extern int32 GetWindowTextW(HWnd hWnd, char16* ptr, int32 length); - [Import("user32.lib"), CLink, StdCall] + [Import("user32.lib"), CLink, CallingConvention(.Stdcall)] public static extern int32 GetWindowTextA(HWnd hWnd, char8* ptr, int32 length); - [CLink, StdCall] + [CLink, CallingConvention(.Stdcall)] public static extern int32 GetWindowThreadProcessId(HWnd handle, out int32 processId); - [Import("comdlg32.lib"), CLink, StdCall] + [Import("comdlg32.lib"), CLink, CallingConvention(.Stdcall)] public static extern IntBool GetOpenFileNameW(ref OpenFileName ofn); - [Import("comdlg32.lib"), CLink, StdCall] + [Import("comdlg32.lib"), CLink, CallingConvention(.Stdcall)] public static extern IntBool GetSaveFileNameW(ref OpenFileName ofn); - [CLink, StdCall] + [CLink, CallingConvention(.Stdcall)] public static extern HModule GetModuleHandleW(char16* modName); - [CLink, StdCall] + [CLink, CallingConvention(.Stdcall)] public static extern HModule GetModuleHandleA(char8* modName); - [CLink, StdCall] + [CLink, CallingConvention(.Stdcall)] public static extern uint32 GetTempFileNameW(char16* tmpPath, char16* prefix, uint32 uniqueIdOrZero, char16* tmpFileName); - [CLink, StdCall] + [CLink, CallingConvention(.Stdcall)] public static extern uint32 GetTempFileNameA(char8* tmpPath, char8* prefix, uint32 uniqueIdOrZero, char8* tmpFileName); - [CLink, StdCall] + [CLink, CallingConvention(.Stdcall)] public static extern uint32 GetTempPathW(int32 bufferLen, char16* buffer); - [CLink, StdCall] + [CLink, CallingConvention(.Stdcall)] public static extern IntBool GetComputerNameA(char8* buffer, ref int32 size); - [CLink, StdCall] + [CLink, CallingConvention(.Stdcall)] public static extern int32 NtQuerySystemInformation(int32 query, void* dataPtr, int32 size, out int32 returnedSize); - [CLink, StdCall] + [CLink, CallingConvention(.Stdcall)] public static extern IntBool ReadDirectoryChangesW(FileHandle handle, uint8* buffer, int32 bufferLength, IntBool watchSubtree, NotifyFilters notifyFilter, out int32 bytesReturned, Overlapped* overlapped, void* completionRoutine); - [CLink, StdCall] + [CLink, CallingConvention(.Stdcall)] public static extern int32 SetFilePointer(FileHandle handle, int32 distanceToMove, int32* distanceToMoveHigh, int32 moveMethod); - [CLink, StdCall] + [CLink, CallingConvention(.Stdcall)] public static extern IntBool SHGetFileInfoW(char16* pszPath, uint32 fileAttributes, SHFileInfo* psfi, uint32 cbFileInfo, uint32 flags); - [CLink, StdCall] + [CLink, CallingConvention(.Stdcall)] public static extern char16* GetEnvironmentStringsW(); - [CLink, StdCall] + [CLink, CallingConvention(.Stdcall)] public static extern void FreeEnvironmentStringsW(char16* ptr); - [CLink, StdCall] + [CLink, CallingConvention(.Stdcall)] public static extern IntBool GetFileMUIPath(uint32 dwFlags, char16* pcwszFilePath, char16* pwszLanguage, uint32* pcchLanguage, char16* pwszFileMUIPath, uint32* pcchFileMUIPath, uint64* pululEnumerator); - [CLink, StdCall] + [CLink, CallingConvention(.Stdcall)] public static extern IntBool SetDllDirectoryW(char16* libFileName); - [CLink, StdCall] + [CLink, CallingConvention(.Stdcall)] public static extern HInstance LoadLibraryW(char16* libFileName); - [CLink, StdCall] + [CLink, CallingConvention(.Stdcall)] public static extern HInstance LoadLibraryA(char8* libFileName); - [CLink, StdCall] + [CLink, CallingConvention(.Stdcall)] public static extern HInstance LoadLibraryExW(char16* libFileName, HModule hFile, uint32 dwFlags); - [CLink, StdCall] + [CLink, CallingConvention(.Stdcall)] public static extern HInstance LoadLibraryExA(char8* libFileName, HModule hFile, uint32 dwFlags); - [CLink, StdCall] + [CLink, CallingConvention(.Stdcall)] public static extern IntBool FreeLibrary(HModule module); - [Import("user32.lib"), CLink, StdCall] + [Import("user32.lib"), CLink, CallingConvention(.Stdcall)] public static extern int32 LoadStringW(HInstance hInstance, uint32 uID, char16* lpBuffer, int32 cchBufferMax); public static Result SafeCreateFile(String lpFileName, diff --git a/BeefTools/DocPrep/src/Program.bf b/BeefTools/DocPrep/src/Program.bf index f707e749..58e8bdd7 100644 --- a/BeefTools/DocPrep/src/Program.bf +++ b/BeefTools/DocPrep/src/Program.bf @@ -5,43 +5,43 @@ namespace DocPrep { class Program { - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void* BfSystem_Create(); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void BfSystem_Delete(void* bfSystem); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void* BfSystem_CreateParser(void* bfSystem, void* bfProject); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void* BfSystem_CreatePassInstance(void* bfSystem); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void BfPassInstance_Delete(void* bfSystem); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void BfSystem_DeleteParser(void* bfSystem, void* bfParser); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void BfParser_SetSource(void* bfParser, char8* data, int32 length, char8* fileName); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern bool BfParser_Parse(void* bfParser, void* bfPassInstance, bool compatMode); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern bool BfParser_Reduce(void* bfParser, void* bfPassInstance); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern char8* BfParser_Format(void* bfParser, int32 formatEnd, int32 formatStart, out int32* outCharMapping); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern char8* BfParser_DocPrep(void* bfParser); - /*[StdCall, CLink] + /*[CallingConvention(.Stdcall), CLink] static extern char8* BfParser_Prep*/ - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void* BfSystem_CreateProject(void* bfSystem, char8* projectName); String mSrcDirPath; diff --git a/BeefTools/MemProfiler/FMod.bf b/BeefTools/MemProfiler/FMod.bf index f30b1c43..69090fc6 100644 --- a/BeefTools/MemProfiler/FMod.bf +++ b/BeefTools/MemProfiler/FMod.bf @@ -1601,7 +1601,7 @@ namespace FMOD #region importfunctions - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_Create (out int system); #endregion @@ -1627,9 +1627,9 @@ namespace FMOD #region importfunctions - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_Memory_Initialize(int poolmem, int32 poollen, MEMORY_ALLOC_CALLBACK useralloc, MEMORY_REALLOC_CALLBACK userrealloc, MEMORY_FREE_CALLBACK userfree, MEMORY_TYPE memtypeflags); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_Memory_GetStats(out int32 currentalloced, out int32 maxalloced, bool blocking); #endregion @@ -1645,7 +1645,7 @@ namespace FMOD #region importfunctions - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_Debug_Initialize(DEBUG_FLAGS flags, DEBUG_MODE mode, DEBUG_CALLBACK callback, String filename); #endregion @@ -2313,189 +2313,189 @@ namespace FMOD #region importfunctions - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_Release (int system); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_SetOutput (int system, OUTPUTTYPE output); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_GetOutput (int system, out OUTPUTTYPE output); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_GetNumDrivers (int system, out int32 numdrivers); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_GetDriverInfo (int system, int32 id, char8* name, int32 namelen, out Guid guid, out int32 systemrate, out SPEAKERMODE speakermode, out int32 speakermodechannels); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_SetDriver (int system, int32 driver); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_GetDriver (int system, out int32 driver); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_SetSoftwareChannels (int system, int32 numsoftwarechannels); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_GetSoftwareChannels (int system, out int32 numsoftwarechannels); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_SetSoftwareFormat (int system, int32 samplerate, SPEAKERMODE speakermode, int32 numrawspeakers); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_GetSoftwareFormat (int system, out int32 samplerate, out SPEAKERMODE speakermode, out int32 numrawspeakers); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_SetDSPBufferSize (int system, uint32 bufferlength, int32 numbuffers); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_GetDSPBufferSize (int system, out uint32 bufferlength, out int32 numbuffers); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_SetFileSystem (int system, FILE_OPENCALLBACK useropen, FILE_CLOSECALLBACK userclose, FILE_READCALLBACK userread, FILE_SEEKCALLBACK userseek, FILE_ASYNCREADCALLBACK userasyncread, FILE_ASYNCCANCELCALLBACK userasynccancel, int32 blockalign); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_AttachFileSystem (int system, FILE_OPENCALLBACK useropen, FILE_CLOSECALLBACK userclose, FILE_READCALLBACK userread, FILE_SEEKCALLBACK userseek); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_SetPluginPath (int system, char8* path); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_LoadPlugin (int system, char8* filename, out uint32 handle, uint32 priority); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_UnloadPlugin (int system, uint32 handle); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_GetNumNestedPlugins (int system, uint32 handle, out int32 count); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_GetNestedPlugin (int system, uint32 handle, int32 index, out uint32 nestedhandle); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_GetNumPlugins (int system, PLUGINTYPE plugintype, out int32 numplugins); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_GetPluginHandle (int system, PLUGINTYPE plugintype, int32 index, out uint32 handle); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_GetPluginInfo (int system, uint32 handle, out PLUGINTYPE plugintype, char8* name, int32 namelen, out uint32 version); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_CreateDSPByPlugin (int system, uint32 handle, out int dsp); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_SetOutputByPlugin (int system, uint32 handle); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_GetOutputByPlugin (int system, out uint32 handle); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_GetDSPInfoByPlugin (int system, uint32 handle, out int description); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] //private static extern RESULT FMOD_System_RegisterCodec (int system, out CODEC_DESCRIPTION description, out uint32 handle, uint32 priority); - //[DllImport(VERSION.dll, Undecorated= true), StdCall] + //[DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_RegisterDSP (int system, ref DSP_DESCRIPTION description, out uint32 handle); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] //private static extern RESULT FMOD_System_RegisterOutput (int system, ref OUTPUT_DESCRIPTION description, out uint32 handle); - //[DllImport(VERSION.dll, Undecorated= true), StdCall] + //[DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_Init (int system, int32 maxchannels, INITFLAGS flags, int extradriverdata); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_Close (int system); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_Update (int system); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_SetAdvancedSettings (int system, ref ADVANCEDSETTINGS settings); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_GetAdvancedSettings (int system, ref ADVANCEDSETTINGS settings); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_Set3DRolloffCallback (int system, CB_3D_ROLLOFFCALLBACK callback); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_MixerSuspend (int system); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_MixerResume (int system); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_GetDefaultMixMatrix (int system, SPEAKERMODE sourcespeakermode, SPEAKERMODE targetspeakermode, float[] matrix, int32 matrixhop); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_GetSpeakerModeChannels (int system, SPEAKERMODE mode, out int32 channels); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_SetCallback (int system, SYSTEM_CALLBACK callback, SYSTEM_CALLBACK_TYPE callbackmask); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_SetSpeakerPosition (int system, SPEAKER speaker, float x, float y, bool active); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_GetSpeakerPosition (int system, SPEAKER speaker, out float x, out float y, out bool active); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_Set3DSettings (int system, float dopplerscale, float distancefactor, float rolloffscale); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_Get3DSettings (int system, out float dopplerscale, out float distancefactor, out float rolloffscale); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_Set3DNumListeners (int system, int32 numlisteners); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_Get3DNumListeners (int system, out int32 numlisteners); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_Set3DListenerAttributes(int system, int32 listener, ref VECTOR pos, ref VECTOR vel, ref VECTOR forward, ref VECTOR up); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_Get3DListenerAttributes(int system, int32 listener, out VECTOR pos, out VECTOR vel, out VECTOR forward, out VECTOR up); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_SetStreamBufferSize (int system, uint32 filebuffersize, TIMEUNIT filebuffersizetype); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_GetStreamBufferSize (int system, out uint32 filebuffersize, out TIMEUNIT filebuffersizetype); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_GetVersion (int system, out uint32 version); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_GetOutputHandle (int system, out int handle); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_GetChannelsPlaying (int system, out int32 channels, out int32 realchannels); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_GetCPUUsage (int system, out float dsp, out float stream, out float geometry, out float update, out float total); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_GetFileUsage (int system, out Int64 sampleuint8sRead, out Int64 streamuint8sRead, out Int64 otheruint8sRead); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_GetSoundRAM (int system, out int32 currentalloced, out int32 maxalloced, out int32 total); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_CreateSound (int system, char8* name_or_data, MODE mode, ref CREATESOUNDEXINFO exinfo, out int sound); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_CreateStream (int system, char8* name_or_data, MODE mode, ref CREATESOUNDEXINFO exinfo, out int sound); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_CreateDSP (int system, ref DSP_DESCRIPTION description, out int dsp); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_CreateDSPByType (int system, DSP_TYPE type, out int dsp); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_CreateChannelGroup (int system, char8* name, out int channelgroup); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_CreateSoundGroup (int system, char8* name, out int soundgroup); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_CreateReverb3D (int system, out int reverb); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_PlaySound (int system, int sound, int channelGroup, bool paused, out int channel); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_PlayDSP (int system, int dsp, int channelGroup, bool paused, out int channel); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_GetChannel (int system, int32 channelid, out int channel); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_GetMasterChannelGroup (int system, out int channelgroup); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_GetMasterSoundGroup (int system, out int soundgroup); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_AttachChannelGroupToPort (int system, uint32 portType, uint64 portIndex, int channelgroup, bool passThru); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_DetachChannelGroupFromPort(int system, int channelgroup); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_SetReverbProperties (int system, int32 instance, ref REVERB_PROPERTIES prop); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_GetReverbProperties (int system, int32 instance, out REVERB_PROPERTIES prop); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_LockDSP (int system); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_UnlockDSP (int system); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_GetRecordNumDrivers (int system, out int32 numdrivers, out int32 numconnected); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_GetRecordDriverInfo (int system, int32 id, char8* name, int32 namelen, out Guid guid, out int32 systemrate, out SPEAKERMODE speakermode, out int32 speakermodechannels, out DRIVER_STATE state); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_GetRecordPosition (int system, int32 id, out uint32 position); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_RecordStart (int system, int32 id, int sound, bool loop); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_RecordStop (int system, int32 id); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_IsRecording (int system, int32 id, out bool recording); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_CreateGeometry (int system, int32 maxpolygons, int32 maxvertices, out int geometry); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_SetGeometrySettings (int system, float maxworldsize); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_GetGeometrySettings (int system, out float maxworldsize); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_LoadGeometry (int system, int data, int32 datasize, out int geometry); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_GetGeometryOcclusion (int system, ref VECTOR listener, ref VECTOR source, out float direct, out float reverb); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_SetNetworkProxy (int system, char8* proxy); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_GetNetworkProxy (int system, char8* proxy, int32 proxylen); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_SetNetworkTimeout (int system, int32 timeout); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_GetNetworkTimeout (int system, out int32 timeout); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_SetUserData (int system, int userdata); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_System_GetUserData (int system, out int userdata); #endregion @@ -2747,91 +2747,91 @@ namespace FMOD #region importfunctions - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_Sound_Release (int sound); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_Sound_GetSystemObject (int sound, out int system); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_Sound_Lock (int sound, uint32 offset, uint32 length, out int ptr1, out int ptr2, out uint32 len1, out uint32 len2); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_Sound_Unlock (int sound, int ptr1, int ptr2, uint32 len1, uint32 len2); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_Sound_SetDefaults (int sound, float frequency, int32 priority); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_Sound_GetDefaults (int sound, out float frequency, out int32 priority); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_Sound_Set3DMinMaxDistance (int sound, float min, float max); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_Sound_Get3DMinMaxDistance (int sound, out float min, out float max); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_Sound_Set3DConeSettings (int sound, float insideconeangle, float outsideconeangle, float outsidevolume); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_Sound_Get3DConeSettings (int sound, out float insideconeangle, out float outsideconeangle, out float outsidevolume); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_Sound_Set3DCustomRolloff (int sound, ref VECTOR points, int32 numpoints); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_Sound_Get3DCustomRolloff (int sound, out int points, out int32 numpoints); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_Sound_GetSubSound (int sound, int32 index, out int subsound); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_Sound_GetSubSoundParent (int sound, out int parentsound); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_Sound_GetName (int sound, char8* name, int32 namelen); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_Sound_GetLength (int sound, out uint32 length, TIMEUNIT lengthtype); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_Sound_GetFormat (int sound, out SOUND_TYPE type, out SOUND_FORMAT format, out int32 channels, out int32 bits); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_Sound_GetNumSubSounds (int sound, out int32 numsubsounds); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_Sound_GetNumTags (int sound, out int32 numtags, out int32 numtagsupdated); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_Sound_GetTag (int sound, char8* name, int32 index, out TAG tag); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_Sound_GetOpenState (int sound, out OPENSTATE openstate, out uint32 percentbuffered, out bool starving, out bool diskbusy); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_Sound_ReadData (int sound, int buffer, uint32 lenuint8s, out uint32 read); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_Sound_SeekData (int sound, uint32 pcm); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_Sound_SetSoundGroup (int sound, int soundgroup); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_Sound_GetSoundGroup (int sound, out int soundgroup); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_Sound_GetNumSyncPoints (int sound, out int32 numsyncpoints); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_Sound_GetSyncPoint (int sound, int32 index, out int point); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_Sound_GetSyncPointInfo (int sound, int point, char8* name, int32 namelen, out uint32 offset, TIMEUNIT offsettype); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_Sound_AddSyncPoint (int sound, uint32 offset, TIMEUNIT offsettype, char8* name, out int point); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_Sound_DeleteSyncPoint (int sound, int point); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_Sound_SetMode (int sound, MODE mode); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_Sound_GetMode (int sound, out MODE mode); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_Sound_SetLoopCount (int sound, int32 loopcount); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_Sound_GetLoopCount (int sound, out int32 loopcount); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_Sound_SetLoopPoints (int sound, uint32 loopstart, TIMEUNIT loopstarttype, uint32 loopend, TIMEUNIT loopendtype); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_Sound_GetLoopPoints (int sound, out uint32 loopstart, TIMEUNIT loopstarttype, out uint32 loopend, TIMEUNIT loopendtype); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_Sound_GetMusicNumChannels (int sound, out int32 numchannels); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_Sound_SetMusicChannelVolume (int sound, int32 channel, float volume); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_Sound_GetMusicChannelVolume (int sound, int32 channel, out float volume); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_Sound_SetMusicSpeed (int sound, float speed); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_Sound_GetMusicSpeed (int sound, out float speed); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_Sound_SetUserData (int sound, int userdata); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_Sound_GetUserData (int sound, out int userdata); #endregion @@ -3127,129 +3127,129 @@ namespace FMOD #region importfunctions - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_Stop(int channelgroup); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_SetPaused(int channelgroup, bool paused); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_GetPaused(int channelgroup, out bool paused); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_GetVolume(int channelgroup, out float volume); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_SetVolumeRamp(int channelgroup, bool ramp); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_GetVolumeRamp(int channelgroup, out bool ramp); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_GetAudibility(int channelgroup, out float audibility); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_SetPitch(int channelgroup, float pitch); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_GetPitch(int channelgroup, out float pitch); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_SetMute(int channelgroup, bool mute); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_GetMute(int channelgroup, out bool mute); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_SetReverbProperties(int channelgroup, int32 instance, float wet); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_GetReverbProperties(int channelgroup, int32 instance, out float wet); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_SetLowPassGain(int channelgroup, float gain); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_GetLowPassGain(int channelgroup, out float gain); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_SetMode(int channelgroup, MODE mode); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_GetMode(int channelgroup, out MODE mode); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_SetCallback(int channelgroup, CHANNEL_CALLBACK callback); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_IsPlaying(int channelgroup, out bool isplaying); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_SetPan(int channelgroup, float pan); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_SetMixLevelsOutput(int channelgroup, float frontleft, float frontright, float center, float lfe, float surroundleft, float surroundright, float backleft, float backright); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_SetMixLevelsInput(int channelgroup, float[] levels, int32 numlevels); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_SetMixMatrix(int channelgroup, float[] matrix, int32 outchannels, int32 inchannels, int32 inchannel_hop); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_GetMixMatrix(int channelgroup, float[] matrix, out int32 outchannels, out int32 inchannels, int32 inchannel_hop); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_GetDSPClock(int channelgroup, out uint64 dspclock, out uint64 parentclock); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_SetDelay(int channelgroup, uint64 dspclock_start, uint64 dspclock_end, bool stopchannels); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_GetDelay(int channelgroup, out uint64 dspclock_start, out uint64 dspclock_end, out bool stopchannels); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_AddFadePoint(int channelgroup, uint64 dspclock, float volume); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_SetFadePointRamp(int channelgroup, uint64 dspclock, float volume); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_RemoveFadePoints(int channelgroup, uint64 dspclock_start, uint64 dspclock_end); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_GetFadePoints(int channelgroup, ref uint32 numpoints, uint64[] point_dspclock, float[] point_volume); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_Set3DAttributes(int channelgroup, ref VECTOR pos, ref VECTOR vel, ref VECTOR alt_pan_pos); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_Get3DAttributes(int channelgroup, out VECTOR pos, out VECTOR vel, out VECTOR alt_pan_pos); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_Set3DMinMaxDistance(int channelgroup, float mindistance, float maxdistance); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_Get3DMinMaxDistance(int channelgroup, out float mindistance, out float maxdistance); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_Set3DConeSettings(int channelgroup, float insideconeangle, float outsideconeangle, float outsidevolume); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_Get3DConeSettings(int channelgroup, out float insideconeangle, out float outsideconeangle, out float outsidevolume); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_Set3DConeOrientation(int channelgroup, ref VECTOR orientation); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_Get3DConeOrientation(int channelgroup, out VECTOR orientation); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_Set3DCustomRolloff(int channelgroup, ref VECTOR points, int32 numpoints); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_Get3DCustomRolloff(int channelgroup, out int points, out int32 numpoints); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_Set3DOcclusion(int channelgroup, float directocclusion, float reverbocclusion); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_Get3DOcclusion(int channelgroup, out float directocclusion, out float reverbocclusion); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_Set3DSpread(int channelgroup, float angle); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_Get3DSpread(int channelgroup, out float angle); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_Set3DLevel(int channelgroup, float level); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_Get3DLevel(int channelgroup, out float level); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_Set3DDopplerLevel(int channelgroup, float level); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_Get3DDopplerLevel(int channelgroup, out float level); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_Set3DDistanceFilter(int channelgroup, bool custom, float customLevel, float centerFreq); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_Get3DDistanceFilter(int channelgroup, out bool custom, out float customLevel, out float centerFreq); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_GetSystemObject(int channelgroup, out int system); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_SetVolume(int channelgroup, float volume); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_GetDSP(int channelgroup, int32 index, out int dsp); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_AddDSP(int channelgroup, int32 index, int dsp); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_RemoveDSP(int channelgroup, int dsp); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_GetNumDSPs(int channelgroup, out int32 numdsps); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_SetDSPIndex(int channelgroup, int dsp, int32 index); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_GetDSPIndex(int channelgroup, int dsp, out int32 index); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_OverridePanDSP(int channelgroup, int pan); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_SetUserData(int channelgroup, int userdata); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_GetUserData(int channelgroup, out int userdata); #endregion @@ -3348,43 +3348,43 @@ namespace FMOD #region importfunctions - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_Channel_SetFrequency (int channel, float frequency); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_Channel_GetFrequency (int channel, out float frequency); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_Channel_SetPriority (int channel, int32 priority); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_Channel_GetPriority (int channel, out int32 priority); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_Channel_SetChannelGroup (int channel, int channelgroup); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_Channel_GetChannelGroup (int channel, out int channelgroup); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_Channel_IsVirtual (int channel, out bool isvirtual); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_Channel_GetCurrentSound (int channel, out int sound); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_Channel_GetIndex (int channel, out int32 index); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_Channel_SetPosition (int channel, uint32 position, TIMEUNIT postype); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_Channel_GetPosition (int channel, out uint32 position, TIMEUNIT postype); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_Channel_SetMode (int channel, MODE mode); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_Channel_GetMode (int channel, out MODE mode); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_Channel_SetLoopCount (int channel, int32 loopcount); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_Channel_GetLoopCount (int channel, out int32 loopcount); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_Channel_SetLoopPoints (int channel, uint32 loopstart, TIMEUNIT loopstarttype, uint32 loopend, TIMEUNIT loopendtype); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_Channel_GetLoopPoints (int channel, out uint32 loopstart, TIMEUNIT loopstarttype, out uint32 loopend, TIMEUNIT loopendtype); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_Channel_SetUserData (int channel, int userdata); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_Channel_GetUserData (int channel, out int userdata); #endregion @@ -3485,21 +3485,21 @@ namespace FMOD } #region importfunctions - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_Release (int channelgroup); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_AddGroup (int channelgroup, int group, bool propagatedspclock, out int connection); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_GetNumGroups (int channelgroup, out int32 numgroups); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_GetGroup (int channelgroup, int32 index, out int group); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_GetParentGroup (int channelgroup, out int group); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_GetName (int channelgroup, char8* name, int32 namelen); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_GetNumChannels (int channelgroup, out int32 numchannels); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_ChannelGroup_GetChannel (int channelgroup, int32 index, out int channel); #endregion @@ -3623,39 +3623,39 @@ namespace FMOD } #region importfunctions - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_SoundGroup_Release (int soundgroup); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_SoundGroup_GetSystemObject (int soundgroup, out int system); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_SoundGroup_SetMaxAudible (int soundgroup, int32 maxaudible); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_SoundGroup_GetMaxAudible (int soundgroup, out int32 maxaudible); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_SoundGroup_SetMaxAudibleBehavior(int soundgroup, SOUNDGROUP_BEHAVIOR behavior); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_SoundGroup_GetMaxAudibleBehavior(int soundgroup, out SOUNDGROUP_BEHAVIOR behavior); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_SoundGroup_SetMuteFadeSpeed (int soundgroup, float speed); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_SoundGroup_GetMuteFadeSpeed (int soundgroup, out float speed); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_SoundGroup_SetVolume (int soundgroup, float volume); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_SoundGroup_GetVolume (int soundgroup, out float volume); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_SoundGroup_Stop (int soundgroup); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_SoundGroup_GetName (int soundgroup, char8* name, int32 namelen); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_SoundGroup_GetNumSounds (int soundgroup, out int32 numsounds); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_SoundGroup_GetSound (int soundgroup, int32 index, out int sound); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_SoundGroup_GetNumPlaying (int soundgroup, out int32 numplaying); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_SoundGroup_SetUserData (int soundgroup, int userdata); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_SoundGroup_GetUserData (int soundgroup, out int userdata); #endregion @@ -3900,83 +3900,83 @@ namespace FMOD #region importfunctions - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_DSP_Release (int dsp); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_DSP_GetSystemObject (int dsp, out int system); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_DSP_AddInput (int dsp, int target, out int connection, DSPCONNECTION_TYPE type); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_DSP_DisconnectFrom (int dsp, int target, int connection); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_DSP_DisconnectAll (int dsp, bool inputs, bool outputs); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_DSP_GetNumInputs (int dsp, out int32 numinputs); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_DSP_GetNumOutputs (int dsp, out int32 numoutputs); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_DSP_GetInput (int dsp, int32 index, out int input, out int inputconnection); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_DSP_GetOutput (int dsp, int32 index, out int output, out int outputconnection); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_DSP_SetActive (int dsp, bool active); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_DSP_GetActive (int dsp, out bool active); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_DSP_SetBypass (int dsp, bool bypass); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_DSP_GetBypass (int dsp, out bool bypass); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_DSP_SetWetDryMix (int dsp, float prewet, float postwet, float dry); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_DSP_GetWetDryMix (int dsp, out float prewet, out float postwet, out float dry); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_DSP_SetChannelFormat (int dsp, CHANNELMASK channelmask, int32 numchannels, SPEAKERMODE source_speakermode); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_DSP_GetChannelFormat (int dsp, out CHANNELMASK channelmask, out int32 numchannels, out SPEAKERMODE source_speakermode); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_DSP_GetOutputChannelFormat (int dsp, CHANNELMASK inmask, int32 inchannels, SPEAKERMODE inspeakermode, out CHANNELMASK outmask, out int32 outchannels, out SPEAKERMODE outspeakermode); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_DSP_Reset (int dsp); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_DSP_SetParameterFloat (int dsp, int32 index, float value); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_DSP_SetParameterInt (int dsp, int32 index, int32 value); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_DSP_SetParameterBool (int dsp, int32 index, bool value); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_DSP_SetParameterData (int dsp, int32 index, uint8* data, uint32 length); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_DSP_GetParameterFloat (int dsp, int32 index, out float value, int valuestr, int32 valuestrlen); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_DSP_GetParameterInt (int dsp, int32 index, out int32 value, int valuestr, int32 valuestrlen); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_DSP_GetParameterBool (int dsp, int32 index, out bool value, int valuestr, int32 valuestrlen); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_DSP_GetParameterData (int dsp, int32 index, out int data, out uint32 length, int valuestr, int32 valuestrlen); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_DSP_GetNumParameters (int dsp, out int32 numparams); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_DSP_GetParameterInfo (int dsp, int32 index, out int desc); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_DSP_GetDataParameterIndex (int dsp, int32 datatype, out int32 index); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_DSP_ShowConfigDialog (int dsp, int hwnd, bool show); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_DSP_GetInfo (int dsp, char8* name, out uint32 version, out int32 channels, out int32 configwidth, out int32 configheight); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_DSP_GetType (int dsp, out DSP_TYPE type); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_DSP_GetIdle (int dsp, out bool idle); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_DSP_SetUserData (int dsp, int userdata); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_DSP_GetUserData (int dsp, out int userdata); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] public static extern RESULT FMOD_DSP_SetMeteringEnabled (int dsp, bool inputEnabled, bool outputEnabled); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] public static extern RESULT FMOD_DSP_GetMeteringEnabled (int dsp, out bool inputEnabled, out bool outputEnabled); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] public static extern RESULT FMOD_DSP_GetMeteringInfo (int dsp, DSP_METERING_INFO inputInfo, DSP_METERING_INFO outputInfo); #endregion @@ -4048,23 +4048,23 @@ namespace FMOD } #region importfunctions - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_DSPConnection_GetInput (int dspconnection, out int input); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_DSPConnection_GetOutput (int dspconnection, out int output); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_DSPConnection_SetMix (int dspconnection, float volume); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_DSPConnection_GetMix (int dspconnection, out float volume); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_DSPConnection_SetMixMatrix (int dspconnection, float[] matrix, int32 outchannels, int32 inchannels, int32 inchannel_hop); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_DSPConnection_GetMixMatrix (int dspconnection, float[] matrix, out int32 outchannels, out int32 inchannels, int32 inchannel_hop); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_DSPConnection_GetType (int dspconnection, out DSPCONNECTION_TYPE type); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_DSPConnection_SetUserData (int dspconnection, int userdata); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_DSPConnection_GetUserData (int dspconnection, out int userdata); #endregion @@ -4176,45 +4176,45 @@ namespace FMOD } #region importfunctions - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_Geometry_Release (int geometry); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_Geometry_AddPolygon (int geometry, float directocclusion, float reverbocclusion, bool doublesided, int32 numvertices, VECTOR[] vertices, out int32 polygonindex); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_Geometry_GetNumPolygons (int geometry, out int32 numpolygons); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_Geometry_GetMaxPolygons (int geometry, out int32 maxpolygons, out int32 maxvertices); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_Geometry_GetPolygonNumVertices(int geometry, int32 index, out int32 numvertices); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_Geometry_SetPolygonVertex (int geometry, int32 index, int32 vertexindex, ref VECTOR vertex); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_Geometry_GetPolygonVertex (int geometry, int32 index, int32 vertexindex, out VECTOR vertex); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_Geometry_SetPolygonAttributes (int geometry, int32 index, float directocclusion, float reverbocclusion, bool doublesided); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_Geometry_GetPolygonAttributes (int geometry, int32 index, out float directocclusion, out float reverbocclusion, out bool doublesided); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_Geometry_SetActive (int geometry, bool active); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_Geometry_GetActive (int geometry, out bool active); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_Geometry_SetRotation (int geometry, ref VECTOR forward, ref VECTOR up); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_Geometry_GetRotation (int geometry, out VECTOR forward, out VECTOR up); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_Geometry_SetPosition (int geometry, ref VECTOR position); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_Geometry_GetPosition (int geometry, out VECTOR position); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_Geometry_SetScale (int geometry, ref VECTOR scale); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_Geometry_GetScale (int geometry, out VECTOR scale); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_Geometry_Save (int geometry, int data, out int32 datasize); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_Geometry_SetUserData (int geometry, int userdata); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_Geometry_GetUserData (int geometry, out int userdata); #endregion @@ -4281,23 +4281,23 @@ namespace FMOD } #region importfunctions - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_Reverb3D_Release(int reverb); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_Reverb3D_Set3DAttributes(int reverb, ref VECTOR position, float mindistance, float maxdistance); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_Reverb3D_Get3DAttributes(int reverb, ref VECTOR position, ref float mindistance, ref float maxdistance); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_Reverb3D_SetProperties(int reverb, ref REVERB_PROPERTIES properties); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_Reverb3D_GetProperties(int reverb, ref REVERB_PROPERTIES properties); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_Reverb3D_SetActive(int reverb, bool active); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_Reverb3D_GetActive(int reverb, out bool active); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_Reverb3D_SetUserData(int reverb, int userdata); - [DllImport(VERSION.dll, Undecorated= true), StdCall] + [DllImport(VERSION.dll, Undecorated= true), CallingConvention(.Stdcall)] private static extern RESULT FMOD_Reverb3D_GetUserData(int reverb, out int userdata); #endregion diff --git a/IDE/mintest/minlib/src/System/Object.bf b/IDE/mintest/minlib/src/System/Object.bf index b707d368..fbd4ba67 100644 --- a/IDE/mintest/minlib/src/System/Object.bf +++ b/IDE/mintest/minlib/src/System/Object.bf @@ -359,7 +359,7 @@ namespace System } } - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern int32 ftoa(float val, char8* str); static extern int32 ToString(float val, char8* str); diff --git a/IDE/mintest/minlib/src/System/Platform.bf b/IDE/mintest/minlib/src/System/Platform.bf index ca40f4d3..c4259103 100644 --- a/IDE/mintest/minlib/src/System/Platform.bf +++ b/IDE/mintest/minlib/src/System/Platform.bf @@ -44,21 +44,21 @@ namespace System TempFileError = (int)Result.TempFileError } - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern uint32 BfpSystem_TickCount(); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern void BfpSystem_GetEnvironmentStrings(char8* outStr, int32* inOutStrSize, BfpSystemResult* outResult); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern uint32 BfpSystem_InterlockedExchange32(uint32* ptr, uint32 val); // Returns the initial value in 'ptr' - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern uint64 BfpSystem_InterlockedExchange64(uint64* ptr, uint64 val); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern uint32 BfpSystem_InterlockedExchangeAdd32(uint32* ptr, uint32 val); // Returns the initial value in 'ptr' - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern uint64 BfpSystem_InterlockedExchangeAdd64(uint64* ptr, uint64 val); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern uint32 BfpSystem_InterlockedCompareExchange32(uint32* ptr, uint32 oldVal, uint32 newVal); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern uint64 BfpSystem_InterlockedCompareExchange64(uint64* ptr, uint64 oldVal, uint64 newVal); public enum BfpFileWatcherFlags : int32 @@ -78,9 +78,9 @@ namespace System public function void BfpDirectoryChangeFunc(BfpFileWatcher* watcher, void* userData, BfpFileChangeKind changeKind, char8* directory, char8* fileName, char8* oldName); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern BfpFileWatcher* BfpFileWatcher_WatchDirectory(char8* path, BfpDirectoryChangeFunc callback, BfpFileWatcherFlags flags, void* userData, BfpFileResult* outResult); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern void BfpFileWatcher_Release(BfpFileWatcher* fileWatcher); public enum BfpProcessResult @@ -89,19 +89,19 @@ namespace System InsufficientBuffer = (int)Result.InsufficientBuffer } - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern bool BfpProcess_IsRemoteMachine(char8* machineName); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern BfpProcess* BfpProcess_GetById(char8* machineName, int32 processId, BfpProcessResult* outResult); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern void BfpProcess_Enumerate(char8* machineName, BfpProcess** outProcesses, int32* inOutProcessesSize, BfpProcessResult* outResult); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern void BfpProcess_Release(BfpProcess* process); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern void BfpProcess_GetMainWindowTitle(BfpProcess* process, char8* outTitle, int32* inOutTitleSize, BfpProcessResult* outResult); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern void BfpProcess_GetProcessName(BfpProcess* process, char8* outName, int32* inOutNameSize, BfpProcessResult* outResult); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern int32 BfpProcess_GetProcessId(BfpProcess* process); public enum BfpSpawnFlags @@ -134,29 +134,29 @@ namespace System UnknownError = (int)Result.UnknownError }; - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern BfpSpawn* BfpSpawn_Create(char8* targetPath, char8* args, char8* workingDir, char8* env, BfpSpawnFlags flags, BfpSpawnResult* outResult); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern void BfpSpawn_Release(BfpSpawn* spawn); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern void BfpSpawn_Kill(BfpSpawn* spawn, int32 exitCode, BfpKillFlags killFlags, BfpSpawnResult* outResult); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern bool BfpSpawn_WaitFor(BfpSpawn* spawn, int waitMS, int* outExitCode, BfpSpawnResult* outResult); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern void BfpSpawn_GetStdHandles(BfpSpawn* spawn, BfpFile** outStdIn, BfpFile** outStdOut, BfpFile** outStdErr); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern int BfpProcess_GetCurrentId(); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern BfpCritSect* BfpCritSect_Create(); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern void BfpCritSect_Release(BfpCritSect* critSect); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern void BfpCritSect_Enter(BfpCritSect* critSect); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern bool BfpCritSect_TryEnter(BfpCritSect* critSect, int32 waitMS); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern void BfpCritSect_Leave(BfpCritSect* critSect); public enum BfpEventFlags : int32 @@ -174,15 +174,15 @@ namespace System BfpEventResult_NotSupported = (int)Result.NotSupported }; - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern BfpEvent* BfpEvent_Create(BfpEventFlags flags); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern void BfpEvent_Release(BfpEvent* event); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern void BfpEvent_Set(BfpEvent* event, bool requireManualReset); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern void BfpEvent_Reset(BfpEvent* event, BfpEventResult* outResult); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern bool BfpEvent_WaitFor(BfpEvent* event, int32 waitMS); public enum BfpLibResult : int32 @@ -192,13 +192,13 @@ namespace System InsufficientBuffer = (int)Result.InsufficientBuffer }; - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern BfpDynLib* BfpDynLib_Load(char8* fileName); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern void BfpDynLib_Release(BfpDynLib* lib); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern void BfpDynLib_GetFilePath(BfpDynLib* lib, char8* outPath, int32* inOutPathSize, BfpLibResult* outResult); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern void* BfpDynLib_GetProcAddress(BfpDynLib* lib, char8* name); public enum BfpFileResult : int32 @@ -216,17 +216,17 @@ namespace System InsufficientBuffer = (int)Result.InsufficientBuffer }; - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern void BfpDirectory_Create(char8* name, BfpFileResult* outResult); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern void BfpDirectory_Rename(char8* oldName, char8* newName, BfpFileResult* outResult); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern void BfpDirectory_Delete(char8* name, BfpFileResult* outResult); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern void BfpDirectory_GetCurrent(char8* outPath, int32* inOutPathSize, BfpFileResult* outResult); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern void BfpDirectory_SetCurrent(char8* path, BfpFileResult* outResult); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern bool BfpDirectory_Exists(char8* path); public enum BfpFileCreateKind : int32 @@ -288,43 +288,43 @@ namespace System IfNewer, }; - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern BfpFile* BfpFile_Create(char8* name, BfpFileCreateKind createKind, BfpFileCreateFlags createFlags, BfpFileAttributes createdFileAttrs, BfpFileResult* outResult); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern void BfpFile_Release(BfpFile* file); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern int BfpFile_Write(BfpFile* file, void* buffer, int size, int timeoutMS, BfpFileResult* outResult); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern int BfpFile_Read(BfpFile* file, void* buffer, int size, int timeoutMS, BfpFileResult* outResult); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern void BfpFile_Flush(BfpFile* file); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern int64 BfpFile_GetFileSize(BfpFile* file); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern int64 BfpFile_Seek(BfpFile* file, int64 offset, BfpFileSeekKind seekKind); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern void BfpFile_Truncate(BfpFile* file); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern BfpTimeStamp BfpFile_GetTime_LastWrite(char8* path); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern BfpFileAttributes BfpFile_GetAttributes(char8* path, BfpFileResult* outResult); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern void BfpFile_SetAttributes(char8* path, BfpFileAttributes attribs, BfpFileResult* outResult); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern void BfpFile_Copy(char8* oldPath, char8* newPath, BfpFileCopyKind copyKind, BfpFileResult* outResult); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern void BfpFile_Rename(char8* oldPath, char8* newPath, BfpFileResult* outResult); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern void BfpFile_Delete(char8* path, BfpFileResult* outResult); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern bool BfpFile_Exists(char8* path); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern void BfpFile_GetTempPath(char8* outPath, int32* inOutPathSize, BfpFileResult* outResult); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern void BfpFile_GetTempFileName(char8* outName, int32* inOutNameSize, BfpFileResult* outResult); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern void BfpFile_GetFullPath(char8* inPath, char8* outPath, int32* inOutPathSize, BfpFileResult* outResult); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern void BfpFile_GetActualPath(char8* inPath, char8* outPath, int32* inOutPathSize, BfpFileResult* outResult); public enum BfpFindFileFlags : int32 @@ -334,21 +334,21 @@ namespace System Directories = 2, }; - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern BfpFindFileData* BfpFindFileData_FindFirstFile(char8* path, BfpFindFileFlags flags, BfpFileResult* outResult); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern bool BfpFindFileData_FindNextFile(BfpFindFileData* findData); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern void BfpFindFileData_GetFileName(BfpFindFileData* findData, char8* outName, int32* inOutNameSize, BfpFileResult* outResult); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern BfpTimeStamp BfpFindFileData_GetTime_LastWrite(BfpFindFileData* findData); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern BfpTimeStamp BfpFindFileData_GetTime_Created(BfpFindFileData* findData); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern BfpTimeStamp BfpFindFileData_GetTime_Access(BfpFindFileData* findData); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern BfpFileAttributes BfpFindFileData_GetFileAttributes(BfpFindFileData* findData); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern void BfpFindFileData_Release(BfpFindFileData* findData); public enum SysDirectory : int32 diff --git a/IDE/mintest/src/main.bf b/IDE/mintest/src/main.bf index d820a050..476af654 100644 --- a/IDE/mintest/src/main.bf +++ b/IDE/mintest/src/main.bf @@ -42,28 +42,28 @@ namespace Hey.Dude.Bro { static int gApzong = 123; - [CLink, StdCall] + [CLink, CallingConvention(.Stdcall)] public static extern void OutputDebugStringA(char8* str); - /*[CLink, StdCall] + /*[CLink, CallingConvention(.Stdcall)] internal static extern void OutputDebugStringW(char16* str);*/ - [CLink, StdCall] + [CLink, CallingConvention(.Stdcall)] public static extern uint32 GetTickCount(); - [Import("winmm.lib"), CLink, StdCall] + [Import("winmm.lib"), CLink, CallingConvention(.Stdcall)] public static extern uint32 timeGetTime(); /*public const String cDllName = @"C:\proj\TestDLL2\x64\Debug\TestDLL2.dll"; - [DllImport(cDllName), CLink, StdCall] + [DllImport(cDllName), CLink, CallingConvention(.Stdcall)] public static extern void Test2(int a, int b, int c, int d);*/ - //[DllImport(cDllName), CLink, StdCall] public static extern void Test3(); + //[DllImport(cDllName), CLink, CallingConvention(.Stdcall)] public static extern void Test3(); - //[DllImport(@"C:\Beef\IDE\dist\IDEHelper64_d.dll"), CLink, StdCall] + //[DllImport(@"C:\Beef\IDE\dist\IDEHelper64_d.dll"), CLink, CallingConvention(.Stdcall)] //public static extern void BFTest(); - /*[StdCall, CLink] + /*[CallingConvention(.Stdcall), CLink] public static extern void ExTest2();*/ //[DllImport(@"\beef\ide\dist\TestDLL.dll"), CLink] diff --git a/IDE/src/Clang/ClangCompiler.bf b/IDE/src/Clang/ClangCompiler.bf index 224d4e5c..e4a7ba6a 100644 --- a/IDE/src/Clang/ClangCompiler.bf +++ b/IDE/src/Clang/ClangCompiler.bf @@ -43,46 +43,46 @@ namespace IDE.Clang { public List mFileRefs = new List(); } - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void* ClangHelper_Create(bool isForResolve); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void ClangHelper_Delete(void* clangHelper); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void ClangHelper_AddTranslationUnit(void* clangHelper, char8* fileName, char8* headerPrefix, char8* clangArgs, void* elementTypeArray, int32 char8Len); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void ClangHelper_RemoveTranslationUnit(void* clangHelper, char8* fileName); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern char8* ClangHelper_Classify(void* clangHelper, char8* fileName, void* elementTypeArray, int32 char8Len, int32 cursorIdx, int32 errorLookupTextIdx,bool ignoreErrors); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern char8* ClangHelper_Autocomplete(void* clangHelper, char8* fileName, void* elementTypeArray, int32 char8Len, int32 cursorIdx); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern char8* ClangHelper_FindDefinition(void* clangHelper, char8* fileName, int32 defPos, out int32 outDefLine, out int32 outDefColumn); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern char8* ClangHelper_GetNavigationData(void* clangHelper, char8* fileName); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern char8* ClangHelper_GetCurrentLocation(void* clangHelper, char8* fileName, int32 defPos); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern char8* ClangHelper_DetermineFilesReferenced(void* clangHelper, char8* fileName); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void CDep_ClearCache(); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void CDep_Shutdown(); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern char8* CDep_DetermineFilesReferenced(char8* fileName, String cArgs); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern int32 CDep_GetIncludePosition(char8* sourceFileName, char8* sourceContent, char8* headerFileName, String cArgs); //static int sRefCount = 0; diff --git a/IDE/src/Clang/ClangHelper.bf b/IDE/src/Clang/ClangHelper.bf index 900e2f41..e0f2b33e 100644 --- a/IDE/src/Clang/ClangHelper.bf +++ b/IDE/src/Clang/ClangHelper.bf @@ -12,19 +12,19 @@ namespace IDE.Clang { public class ClangHelper : CompilerBase { - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern IntPtr ClangHelper_Create(); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void ClangHelper_Delete(IntPtr clangHelper); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern IntPtr ClangHelper_Classify(IntPtr clangHelper, char* fileName, void* elementTypeArray, int charLen, int cursorIdx); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern IntPtr ClangHelper_FindDefinition(IntPtr clangHelper, char* fileName, int line, int column, out int outDefLine, out int outDefColumn); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern IntPtr ClangHelper_Autocomplete(IntPtr clangHelper, char* fileName, int cursorIdx); IntPtr mNativeClangHelper; diff --git a/IDE/src/Compiler/BfCompiler.bf b/IDE/src/Compiler/BfCompiler.bf index c0830949..3efbae90 100644 --- a/IDE/src/Compiler/BfCompiler.bf +++ b/IDE/src/Compiler/BfCompiler.bf @@ -39,72 +39,72 @@ namespace IDE.Compiler NoFramePointerElim = 0x20000, } - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern bool BfCompiler_Compile(void* bfCompiler, void* bfPassInstance, char8* outputDirectory); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern bool BfCompiler_ClearResults(void* bfCompiler); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern bool BfCompiler_VerifyTypeName(void* bfCompiler, char8* typeName, int32 cursorPos); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern bool BfCompiler_ClassifySource(void* bfCompiler, void* bfPassInstance, void* bfParser, void* bfResolvePassData, void* char8Data); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern char8* BfCompiler_GetAutocompleteInfo(void* bfCompiler); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern char8* BfCompiler_GetSymbolReferences(void* bfCompiler, void* bfPassInstance, void* bfResolvePassData); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void BfCompiler_Cancel(void* bfCompiler); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void BfCompiler_ClearCompletionPercentage(void* bfCompiler); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern float BfCompiler_GetCompletionPercentage(void* bfCompiler); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern int32 BfCompiler_GetCompileRevision(void* bfCompiler); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void BfCompiler_Delete(void* bfCompiler); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void BfCompiler_ClearBuildCache(void* bfCompiler); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void BfCompiler_SetBuildValue(void* bfCompiler, char8* cacheDir, char8* key, char8* value); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern char8* BfCompiler_GetBuildValue(void* bfCompiler, char8* cacheDir, char8* key); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void BfCompiler_WriteBuildCache(void* bfCompiler, char8* cacheDir); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern char8* BfCompiler_GetOutputFileNames(void* bfCompiler, void* bfProject, out bool hadOutputChanges); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern char8* BfCompiler_GetUsedOutputFileNames(void* bfCompiler, void* bfProject, bool flushQueuedHotFiles, out bool hadOutputChanges); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern char8* BfCompiler_GetTypeDefList(void* bfCompiler); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern char8* BfCompiler_GetTypeDefMatches(void* bfCompiler, char8* searchStr); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern char8* BfCompiler_GetTypeDefInfo(void* bfCompiler, char8* typeDefName); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void BfCompiler_SetOptions(void* bfCompiler, void* hotProject, int32 hotIdx, char8* targetTriple, int32 toolsetType, int32 simdSetting, int32 allocStackCount, int32 maxWorkerThreads, OptionFlags optionsFlags, char8* mallocName, char8* freeName); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void BfCompiler_ForceRebuild(void* bfCompiler); public enum HotTypeFlags @@ -115,10 +115,10 @@ namespace IDE.Compiler Heap = 4, }; - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern bool BfCompiler_GetHasHotPendingDataChanges(void* bfCompiler); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void BfCompiler_HotCommit(void* bfCompiler); public enum HotResolveFlags @@ -127,22 +127,22 @@ namespace IDE.Compiler HadDataChanges = 1 } - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void BfCompiler_HotResolve_Start(void* bfCompiler, int32 flags); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void BfCompiler_HotResolve_AddActiveMethod(void* bfCompiler, char8* methodName); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void BfCompiler_HotResolve_AddDelegateMethod(void* bfCompiler, char8* methodName); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void BfCompiler_HotResolve_ReportType(void* bfCompiler, int typeId, int usageKind); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void BfCompiler_HotResolve_ReportTypeRange(void* bfCompiler, char8* typeName, int usageKind); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern char8* BfCompiler_HotResolve_Finish(void* bfCompiler); class SetPassInstanceCommand : Command diff --git a/IDE/src/Compiler/BfParser.bf b/IDE/src/Compiler/BfParser.bf index 725201c6..71ac7c5e 100644 --- a/IDE/src/Compiler/BfParser.bf +++ b/IDE/src/Compiler/BfParser.bf @@ -86,58 +86,58 @@ namespace IDE.Compiler str.AppendF("Idx:{0}", mIdx); } - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void BfSystem_DeleteParser(void* bfSystem, void* bfParser); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void BfParser_SetSource(void* bfParser, char8* data, int32 length, char8* fileName); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void BfParser_SetCharIdData(void* bfParser, uint8* data, int32 length); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void BfParser_SetHashMD5(void* bfParser, ref MD5Hash md5Hash); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void BfParser_SetNextRevision(void* bfParser, void* nextParser); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern bool BfParser_SetCursorIdx(void* bfParser, int32 cursorIdx); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern bool BfParser_SetAutocomplete(void* bfParser, int32 cursorIdx); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern bool BfParser_SetIsClassifying(void* bfParser); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern bool BfParser_Parse(void* bfParser, void* bfPassInstance, bool compatMode); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern bool BfParser_Reduce(void* bfParser, void* bfPassInstance); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern char8* BfParser_Format(void* bfParser, int32 formatEnd, int32 formatStart, out int32* outCharMapping); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern char8* BfParser_GetDebugExpressionAt(void* bfParser, int32 cursorIdx); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void* BfParser_CreateResolvePassData(void* bfSystem, int32 resolveType); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern bool BfParser_BuildDefs(void* bfParser, void* bfPassInstance, void* bfResolvePassData, bool fullRefresh); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void BfParser_RemoveDefs(void* bfParser); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void BfParser_ClassifySource(void* bfParser, void* elementTypeArray, bool preserveFlags); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void BfParser_GenerateAutoCompletionFrom(void* bfParser, int32 srcPosition); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void BfParser_SetCompleteParse(void* bfParser); public BfSystem mSystem; diff --git a/IDE/src/Compiler/BfPassInstance.bf b/IDE/src/Compiler/BfPassInstance.bf index 8d44a162..49e22c40 100644 --- a/IDE/src/Compiler/BfPassInstance.bf +++ b/IDE/src/Compiler/BfPassInstance.bf @@ -17,27 +17,27 @@ namespace IDE.Compiler Classify } - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void BfPassInstance_Delete(void* bfSystem); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern char8* BfPassInstance_PopOutString(void* bfSystem); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void BfPassInstance_SetClassifierPassId(void* bfResolvePassData, uint8 classifierPassId); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern int32 BfPassInstance_GetErrorCount(void* mNativeResolvePassData); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern char8* BfPassInstance_GetErrorData(void* mNativeResolvePassData, int32 errorIdx, out int32 code, out bool isWarning, out bool isAfter, out bool isDeferred, out bool isWhileSpecializing, out bool isPersistent, out char8* projectName, out char8* fileName, out int32 srcStart, out int32 srcEnd, int32* srcLine, int32* srcColumn, out int32 moreInfoCount); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern char8* BfPassInstance_Error_GetMoreInfoData(void* mNativeResolvePassData, int32 errorIdx, int32 moreInfoIdx, out char8* fileName, out int32 srcStart, out int32 srcEnd, int32* srcLine, int32* srcColumn); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern bool BfPassInstance_HadSignatureChanges(void* mNativeResolvePassData); public class BfError diff --git a/IDE/src/Compiler/BfProject.bf b/IDE/src/Compiler/BfProject.bf index 66b598ad..099c773b 100644 --- a/IDE/src/Compiler/BfProject.bf +++ b/IDE/src/Compiler/BfProject.bf @@ -20,19 +20,19 @@ namespace IDE.Compiler AsmOutput_ATT = 0x40, } - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] extern static void BfProject_Delete(void* nativeBfProject); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] extern static void BfProject_ClearDependencies(void* nativeBfProject); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] extern static void BfProject_AddDependency(void* nativeBfProject, void* nativeDepProject); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] extern static void BfProject_SetDisabled(void* nativeBfProject, bool disabled); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] extern static void BfProject_SetOptions(void* nativeBfProject, int32 targetType, char8* startupObject, char8* preprocessorMacros, int32 optLevel, int32 ltoType, int32 relocType, int32 picLevel, Flags flags); diff --git a/IDE/src/Compiler/BfResolvePassData.bf b/IDE/src/Compiler/BfResolvePassData.bf index 7e088594..50b74d11 100644 --- a/IDE/src/Compiler/BfResolvePassData.bf +++ b/IDE/src/Compiler/BfResolvePassData.bf @@ -7,36 +7,36 @@ namespace IDE.Compiler { public class BfResolvePassData { - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void BfResolvePassData_Delete(void* bfResolvePassData); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void BfResolvePassData_SetLocalId(void* bfResolvePassData, int32 localId); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void BfResolvePassData_SetTypeGenericParamIdx(void* resolvePassData, int typeGenericParamIdx); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void BfResolvePassData_SetMethodGenericParamIdx(void* resolvePassData, int typeGenericParamIdx); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void BfResolvePassData_SetSymbolReferenceTypeDef(void* bfResolvePassData, char8* replaceStr); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void BfResolvePassData_SetSymbolReferenceFieldIdx(void* bfResolvePassData, int32 fieldIdx); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void BfResolvePassData_SetSymbolReferenceMethodIdx(void* bfResolvePassData, int32 methodIdx); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void BfResolvePassData_SetSymbolReferencePropertyIdx(void* bfResolvePassData, int32 propertyIdx); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void BfResolvePassData_SetDocumentationRequest(void* bfResolvePassData, char8* entryName); // - //[StdCall, CLink] + //[CallingConvention(.Stdcall), CLink] //static extern void* BfParser_CreateResolvePassData(void* bfSystem, int32 resolveType); public void* mNativeResolvePassData; diff --git a/IDE/src/Compiler/BfSystem.bf b/IDE/src/Compiler/BfSystem.bf index 40d762a9..9f4f9a9d 100644 --- a/IDE/src/Compiler/BfSystem.bf +++ b/IDE/src/Compiler/BfSystem.bf @@ -9,77 +9,77 @@ namespace IDE.Compiler { public class BfSystem { - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void BfSystem_CheckLock(void* bfSystem); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void* BfSystem_Create(); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void BfSystem_Delete(void* bfSystem); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void BfSystem_ReportMemory(void* bfSystem); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void BfSystem_Update(void* bfSystem); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void* BfSystem_CreatePassInstance(void* bfSystem); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern char8* BfSystem_GetNamespaceSearch(void* bfSystem, char8* typeName, void* project); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void* BfSystem_CreateProject(void* bfSystem, char8* projectName); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void BfSystem_ClearTypeOptions(void* bfSystem); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void BfSystem_AddTypeOptions(void* bfSystem, char8* filter, int32 simdSetting, int32 optimizationLevel, int32 emitDebugInfo, int32 runtimeChecks, int32 initLocalVariables, int32 emitDynamicCastCheck, int32 emitObjectAccessCheck, int32 allocStackTraceDepth); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void* BfSystem_CreateParser(void* bfSystem, void* bfProject); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void* BfSystem_CreateCompiler(void* bfSystem, bool isResolveOnly = false); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void* BfSystem_RemoveDeletedParsers(void* bfSystem); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void* BfSystem_RemoveOldParsers(void* bfSystem); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void* BfSystem_RemoveOldData(void* bfSystem); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void* BfSystem_NotifyWillRequestLock(void* bfSystem, int32 priority); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void* BfSystem_Lock(void* bfSystem, int32 priority); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] extern static void BfSystem_PerfZoneStart(char8* name); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] extern static void BfSystem_PerfZoneEnd(); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void* BfSystem_Unlock(void* bfSystem); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] extern static void BfSystem_StartTiming(); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] extern static void BfSystem_StopTiming(); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] extern static void BfSystem_DbgPrintTimings(); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] extern static void BfSystem_Log(void* bfSystem, char8* str); public void* mNativeBfSystem; diff --git a/IDE/src/Debugger/Breakpoint.bf b/IDE/src/Debugger/Breakpoint.bf index 21549b4e..87c31fa5 100644 --- a/IDE/src/Debugger/Breakpoint.bf +++ b/IDE/src/Debugger/Breakpoint.bf @@ -34,64 +34,64 @@ namespace IDE.Debugger Disable } - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void Breakpoint_Delete(void* nativeBreakpoint); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern int32 Breakpoint_GetPendingHotBindIdx(void* nativeBreakpoint); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void Breakpoint_HotBindBreakpoint(void* breakpoint, int32 lineNum, int32 hotIdx); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern int Breakpoint_GetAddress(void* nativeBreakpoint, out void* linkedSibling); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern bool Breakpoint_SetCondition(void* nativeBreakpoint, char8* condition); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern bool Breakpoint_SetLogging(void* nativeBreakpoint, char8* logging, bool breakAfterLogging); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern bool Breakpoint_IsMemoryBreakpointBound(void* nativeBreakpoint); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern int32 Breakpoint_GetLineNum(void* nativeBreakpoint); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void Breakpoint_Move(void* nativeBreakpoint, int32 wantLineNum, int32 wantColumn, bool rebindNow); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void Breakpoint_MoveMemoryBreakpoint(void* nativeBreakpoint, int addr, int32 byteCount); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void Breakpoint_Disable(void* nativeBreakpoint); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void* Debugger_CreateBreakpoint(char8* fileName, int32 wantLineNum, int32 wantColumn, int32 instrOffset); - [StdCall,CLink] + [CallingConvention(.Stdcall),CLink] static extern void* Debugger_CreateSymbolBreakpoint(char8* symbolName); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void* Breakpoint_Check(void* nativeBreakpoint); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void Breakpoint_SetThreadId(void* nativeBreakpoint, int threadId); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern int32 Breakpoint_GetHitCount(void* nativeBreakpoint); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern int32 Breakpoint_ClearHitCount(void* nativeBreakpoint); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void Breakpoint_SetHitCountTarget(void* nativeBreakpoint, int hitCountTarget, HitCountBreakKind breakKind); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void* Debugger_GetActiveBreakpoint(); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void* Debugger_CreateMemoryBreakpoint(int addr, int32 byteCount); public void* mNativeBreakpoint; diff --git a/IDE/src/Debugger/Callbacks.bf b/IDE/src/Debugger/Callbacks.bf index e7c20c98..6b6e2501 100644 --- a/IDE/src/Debugger/Callbacks.bf +++ b/IDE/src/Debugger/Callbacks.bf @@ -5,7 +5,7 @@ namespace Debugger { static class Callbacks { - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void Debugger_SetCallbacks(void* callback); public static void Init() diff --git a/IDE/src/Debugger/DebugManager.bf b/IDE/src/Debugger/DebugManager.bf index d81c9a35..be2738aa 100644 --- a/IDE/src/Debugger/DebugManager.bf +++ b/IDE/src/Debugger/DebugManager.bf @@ -112,238 +112,238 @@ namespace IDE.Debugger public List mBreakpointList = new List(); public Dictionary mStepFilterList = new Dictionary(); - [StdCall,CLink] + [CallingConvention(.Stdcall),CLink] static extern void Debugger_Create(); - [StdCall,CLink] + [CallingConvention(.Stdcall),CLink] static extern void Debugger_Delete(); - [StdCall,CLink] + [CallingConvention(.Stdcall),CLink] static extern int32 Debugger_GetAddrSize(); - [StdCall,CLink] + [CallingConvention(.Stdcall),CLink] static extern void Debugger_FullReportMemory(); - [StdCall,CLink] + [CallingConvention(.Stdcall),CLink] static extern bool Debugger_OpenMiniDump(char8* filename); - [StdCall,CLink] + [CallingConvention(.Stdcall),CLink] static extern bool Debugger_OpenFile(char8* launchPath, char8* targetPath, char8* args, char8* workingDir, void* envBlockPtr, int32 envBlockLen); - [StdCall,CLink] + [CallingConvention(.Stdcall),CLink] static extern bool Debugger_Attach(int32 processId, AttachFlags attachFlags); - [StdCall,CLink] + [CallingConvention(.Stdcall),CLink] static extern void Debugger_Run(); - [StdCall,CLink] + [CallingConvention(.Stdcall),CLink] static extern bool Debugger_HotLoad(char8* objectFileNames, int32 hotIdx); - [StdCall,CLink] + [CallingConvention(.Stdcall),CLink] static extern bool Debugger_LoadDebugVisualizers(char8* fileName); - [StdCall,CLink] + [CallingConvention(.Stdcall),CLink] static extern void Debugger_StopDebugging(); - [StdCall,CLink] + [CallingConvention(.Stdcall),CLink] static extern void Debugger_Terminate(); - [StdCall,CLink] + [CallingConvention(.Stdcall),CLink] static extern void Debugger_Detach(); - [StdCall,CLink] + [CallingConvention(.Stdcall),CLink] static extern RunState Debugger_GetRunState(); - [StdCall,CLink] + [CallingConvention(.Stdcall),CLink] static extern char8* Debugger_GetCurrentException(); - [StdCall,CLink] + [CallingConvention(.Stdcall),CLink] static extern void Debugger_Continue(); - [StdCall,CLink] + [CallingConvention(.Stdcall),CLink] static extern void Debugger_BreakAll(); - [StdCall,CLink] + [CallingConvention(.Stdcall),CLink] static extern void Debugger_StepInto(bool inAssembly); - [StdCall,CLink] + [CallingConvention(.Stdcall),CLink] static extern void Debugger_StepIntoSpecific(int addr); - [StdCall,CLink] + [CallingConvention(.Stdcall),CLink] static extern void Debugger_StepOver(bool inAssembly); - [StdCall,CLink] + [CallingConvention(.Stdcall),CLink] static extern void Debugger_StepOut(bool inAssembly); - [StdCall,CLink] + [CallingConvention(.Stdcall),CLink] static extern void Debugger_SetNextStatement(bool inAssembly, char8* fileName, int wantLineNumOrAsmAddr, int32 wantColumn); - [StdCall,CLink] + [CallingConvention(.Stdcall),CLink] static extern bool Debugger_Update(); - [StdCall,CLink] + [CallingConvention(.Stdcall),CLink] static extern void* Debugger_CreateAddressBreakpoint(int address); - [StdCall,CLink] + [CallingConvention(.Stdcall),CLink] static extern void* Debugger_CreateStepFilter(char8* filter, bool isGlobal, StepFilterKind stepFilterKind); - [StdCall,CLink] + [CallingConvention(.Stdcall),CLink] static extern void Debugger_SetDisplayTypes(char8* referenceId, IntDisplayType intDisplayType, MmDisplayType mmDisplayType); - [StdCall,CLink] + [CallingConvention(.Stdcall),CLink] static extern bool Debugger_GetDisplayTypes(char8* referenceId, out IntDisplayType intDisplayType, out MmDisplayType mmDisplayType); - [StdCall,CLink] + [CallingConvention(.Stdcall),CLink] static extern char8* Debugger_GetDisplayTypeNames(); - [StdCall,CLink] + [CallingConvention(.Stdcall),CLink] static extern char8* Debugger_EvaluateContinue(); - [StdCall,CLink] + [CallingConvention(.Stdcall),CLink] static extern void Debugger_EvaluateContinueKeep(); - [StdCall,CLink] + [CallingConvention(.Stdcall),CLink] static extern char8* Debugger_Evaluate(char8* expr, int32 callStackIdx, int32 cursorPos, int32 language, EvalExpressionFlags expressionFlags); - [StdCall,CLink] + [CallingConvention(.Stdcall),CLink] static extern char8* Debugger_EvaluateToAddress(char8* expr, int32 callStackIdx, int32 cursorPos); - [StdCall,CLink] + [CallingConvention(.Stdcall),CLink] static extern char8* Debugger_EvaluateAtAddress(char8* expr, int addr, int32 cursorPos); - [StdCall,CLink] + [CallingConvention(.Stdcall),CLink] static extern char8* Debugger_GetAutoExpressions(int32 callStackIdx, uint64 memoryRangeStart, uint64 memoryRangeLen); - [StdCall,CLink] + [CallingConvention(.Stdcall),CLink] static extern char8* Debugger_GetAutoLocals(int32 callStackIdx, bool showRegs); - [StdCall,CLink] + [CallingConvention(.Stdcall),CLink] static extern char8* Debugger_CompactChildExpression(char8* expr, char8* parentExpr, int32 callStackIdx); - [StdCall,CLink] + [CallingConvention(.Stdcall),CLink] static extern char8* Debugger_GetCollectionContinuation(char8* continuationData, int32 callStackIdx, int32 count); - [StdCall,CLink] + [CallingConvention(.Stdcall),CLink] static extern void Debugger_ForegroundTarget(); - [StdCall,CLink] + [CallingConvention(.Stdcall),CLink] static extern void CallStack_Update(); - [StdCall,CLink] + [CallingConvention(.Stdcall),CLink] static extern void CallStack_Rehup(); - [StdCall,CLink] + [CallingConvention(.Stdcall),CLink] static extern int32 CallStack_GetCount(); - [StdCall,CLink] + [CallingConvention(.Stdcall),CLink] static extern int32 CallStack_GetRequestedStackFrameIdx(); - [StdCall,CLink] + [CallingConvention(.Stdcall),CLink] static extern int32 CallStack_GetBreakStackFrameIdx(); - [StdCall,CLink] + [CallingConvention(.Stdcall),CLink] static extern char8* Debugger_GetCodeAddrInfo(int addr, out int32 hotIdx, out int32 defLineStart, out int32 defLineEnd, out int32 line, out int32 column); - [StdCall,CLink] + [CallingConvention(.Stdcall),CLink] static extern void Debugger_GetStackAllocInfo(int addr, out int threadId, int32* outStackIdx); - [StdCall,CLink] + [CallingConvention(.Stdcall),CLink] static extern char8* CallStack_GetStackFrameInfo(int32 stackFrameIdx, out int addr, out char8* outFile, out int32 hotIdx, out int32 defLineStart, out int32 defLineEnd, out int32 outLine, out int32 outColumn, out int32 outLanguage, out int32 outStackSize, out FrameFlags flags); - [StdCall,CLink] + [CallingConvention(.Stdcall),CLink] static extern char8* Callstack_GetStackFrameOldFileInfo(int32 stackFrameIdx); - [StdCall,CLink] + [CallingConvention(.Stdcall),CLink] static extern int32 CallStack_GetJmpState(int32 stackFrameIdx); - [StdCall,CLink] + [CallingConvention(.Stdcall),CLink] static extern int Debugger_GetStackFrameCalleeAddr(int32 stackFrameIdx); - [StdCall,CLink] + [CallingConvention(.Stdcall),CLink] static extern char8* CallStack_GetStackMethodOwner(int32 stackFrameIdx, out int32 language); - [StdCall,CLink] + [CallingConvention(.Stdcall),CLink] static extern char8* Debugger_GetThreadInfo(); - [StdCall,CLink] + [CallingConvention(.Stdcall),CLink] static extern void Debugger_SetActiveThread(int threadId); - [StdCall,CLink] + [CallingConvention(.Stdcall),CLink] static extern int Debugger_GetActiveThread(); - [StdCall,CLink] + [CallingConvention(.Stdcall),CLink] static extern void Debugger_FreezeThread(int threadId); - [StdCall,CLink] + [CallingConvention(.Stdcall),CLink] static extern void Debugger_ThawThread(int threadId); - [StdCall,CLink] + [CallingConvention(.Stdcall),CLink] static extern bool Debugger_IsActiveThreadWaiting(); - [StdCall,CLink] + [CallingConvention(.Stdcall),CLink] static extern char8* Debugger_PopMessage(); - [StdCall,CLink] + [CallingConvention(.Stdcall),CLink] static extern bool Debugger_HasMessages(); - [StdCall,CLink] + [CallingConvention(.Stdcall),CLink] static extern char8* Debugger_FindCodeAddresses(char8* file, int32 line, int32 column, bool allowAutoResolve); - [StdCall,CLink] + [CallingConvention(.Stdcall),CLink] static extern char8* Debugger_GetAddressSourceLocation(int addr); - [StdCall,CLink] + [CallingConvention(.Stdcall),CLink] static extern char8* Debugger_GetAddressSymbolName(int addr, bool demangle); - [StdCall,CLink] + [CallingConvention(.Stdcall),CLink] static extern char8* Debugger_FindLineCallAddresses(int addr); - [StdCall,CLink] + [CallingConvention(.Stdcall),CLink] static extern char8* Debugger_DisassembleAt(int addr); - [StdCall,CLink] + [CallingConvention(.Stdcall),CLink] static extern void Debugger_ReadMemory(int addr, int size, uint8* data); - [StdCall,CLink] + [CallingConvention(.Stdcall),CLink] static extern void Debugger_WriteMemory(int addr, int size, uint8* data); - [StdCall,CLink] + [CallingConvention(.Stdcall),CLink] static extern void* Debugger_StartProfiling(int threadId, char8* desc, int32 sampleRate); - [StdCall,CLink] + [CallingConvention(.Stdcall),CLink] static extern void* Debugger_PopProfiler(); - [StdCall,CLink] + [CallingConvention(.Stdcall),CLink] static extern void Debugger_SetSymSrvOptions(char8* symCacheDir, char8* symSrvStr, int32 flags); - [StdCall,CLink] + [CallingConvention(.Stdcall),CLink] static extern void Debugger_CancelSymSrv(); - [StdCall,CLink] + [CallingConvention(.Stdcall),CLink] static extern char8* Debugger_GetModulesInfo(); - [StdCall,CLink] + [CallingConvention(.Stdcall),CLink] static extern bool Debugger_HasPendingDebugLoads(); - [StdCall,CLink] + [CallingConvention(.Stdcall),CLink] static extern int32 Debugger_LoadImageForModuleWith(char8* moduleName, char8* imageFileName); - [StdCall,CLink] + [CallingConvention(.Stdcall),CLink] static extern int32 Debugger_LoadDebugInfoForModule(char8* moduleName); - [StdCall,CLink] + [CallingConvention(.Stdcall),CLink] static extern int32 Debugger_LoadDebugInfoForModuleWith(char8* moduleName, char8* debugFileName); - [StdCall,CLink] + [CallingConvention(.Stdcall),CLink] static extern void Debugger_SetStepOverExternalFiles(bool stepOverExternalFiles); - [StdCall,CLink] + [CallingConvention(.Stdcall),CLink] static extern void Debugger_InitiateHotResolve(int32 flags); - [StdCall,CLink] + [CallingConvention(.Stdcall),CLink] static extern char8* Debugger_GetHotResolveData(uint8* outTypeData, int32* outTypeDataSize); - [StdCall,CLink] + [CallingConvention(.Stdcall),CLink] static extern void Debugger_SetAliasPath(char8* origPath, char8* localPath); public String mRunningPath ~ delete _; diff --git a/IDE/src/Debugger/Profiler.bf b/IDE/src/Debugger/Profiler.bf index 3cd60676..d9c14eca 100644 --- a/IDE/src/Debugger/Profiler.bf +++ b/IDE/src/Debugger/Profiler.bf @@ -12,25 +12,25 @@ namespace IDE.Debugger public int mIdx; public bool mIsManual; - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void* Profiler_Delete(void* nativeProfiler); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void Profiler_Stop(void* nativeProfiler); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void Profiler_Clear(void* nativeProfiler); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern char8* Profiler_GetThreadList(void* nativeProfiler); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern char8* Profiler_GetOverview(void* nativeProfiler); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern bool Profiler_IsRunning(void* nativeProfiler); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern char8* Profiler_GetCallTree(void* nativeProfiler, int32 threadId, bool reverse); void* mNativeProfiler; diff --git a/IDE/src/Debugger/StepFilter.bf b/IDE/src/Debugger/StepFilter.bf index 58c6809f..1c72c19f 100644 --- a/IDE/src/Debugger/StepFilter.bf +++ b/IDE/src/Debugger/StepFilter.bf @@ -19,7 +19,7 @@ namespace IDE.Debugger public bool mIsGlobal; public StepFilterKind mKind; - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void StepFilter_Delete(char8* filter); public ~this() diff --git a/IDE/src/IDEApp.bf b/IDE/src/IDEApp.bf index 55b96ccd..bebb65f7 100644 --- a/IDE/src/IDEApp.bf +++ b/IDE/src/IDEApp.bf @@ -529,9 +529,9 @@ namespace IDE } } - [StdCall,CLink] + [CallingConvention(.Stdcall),CLink] static extern void IDEHelper_ProgramStart(); - [StdCall,CLink] + [CallingConvention(.Stdcall),CLink] static extern void IDEHelper_ProgramDone(); public this() @@ -12915,7 +12915,7 @@ namespace IDE } #if BF_PLATFORM_WINDOWS - [Import("user32.lib"), CLink, StdCall] + [Import("user32.lib"), CLink, CallingConvention(.Stdcall)] public static extern bool MessageBeep(MessageBeepType type); #endif } diff --git a/IDE/src/Settings.bf b/IDE/src/Settings.bf index 0474289a..36e81c19 100644 --- a/IDE/src/Settings.bf +++ b/IDE/src/Settings.bf @@ -71,7 +71,7 @@ namespace IDE ReadPaths("Lib64Paths", mLib64Paths); } - [CLink, StdCall] + [CLink, CallingConvention(.Stdcall)] static extern char8* VSSupport_Find(); public bool IsConfigured() diff --git a/IDE/src/SpellChecker.bf b/IDE/src/SpellChecker.bf index b0fc657e..f53d828d 100644 --- a/IDE/src/SpellChecker.bf +++ b/IDE/src/SpellChecker.bf @@ -10,19 +10,19 @@ namespace IDE { public class SpellChecker : CommandQueueManager { - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void* SpellChecker_Create(char8* langPath); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void SpellChecker_Delete(void* nativeSpellchecker); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern bool SpellChecker_IsWord(void* nativeSpellchecker, char8* word); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void SpellChecker_AddWord(void* nativeSpellchecker, char8* word); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern char8* SpellChecker_GetSuggestions(void* spellChecker, char8* word); void* mNativeSpellChecker; diff --git a/IDE/src/Targets.bf b/IDE/src/Targets.bf index cfcfd74b..333a1b23 100644 --- a/IDE/src/Targets.bf +++ b/IDE/src/Targets.bf @@ -7,10 +7,10 @@ namespace IDE { public class Targets { - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void Targets_Create(); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void Targets_Delete(); public this() diff --git a/IDE/src/ui/SourceEditWidgetContent.bf b/IDE/src/ui/SourceEditWidgetContent.bf index 2978d38b..14a18ec0 100644 --- a/IDE/src/ui/SourceEditWidgetContent.bf +++ b/IDE/src/ui/SourceEditWidgetContent.bf @@ -262,7 +262,7 @@ namespace IDE.ui } } - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern char8* BfDiff_DiffText(char8* text1, char8* text2); struct TextLineSegment diff --git a/IDE/src/ui/SourceViewPanel.bf b/IDE/src/ui/SourceViewPanel.bf index fd63c183..2411af72 100644 --- a/IDE/src/ui/SourceViewPanel.bf +++ b/IDE/src/ui/SourceViewPanel.bf @@ -1158,7 +1158,7 @@ namespace IDE.ui bfCompiler.QueueDeferredResolveAll(); } - //[StdCall, CLink] + //[CallingConvention(.Stdcall), CLink] //static extern char8* BfDiff_DiffText(char8* text1, char8* text2); public void DoFastClassify() diff --git a/IDE/src/util/BfLog.bf b/IDE/src/util/BfLog.bf index 0bee6fa2..5a666ae3 100644 --- a/IDE/src/util/BfLog.bf +++ b/IDE/src/util/BfLog.bf @@ -4,10 +4,10 @@ namespace IDE.util { class BfLog { - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void BfLog_Log(char8* str); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] static extern void BfLog_LogDbg(char8* str); public static void Log(StringView str, params Object[] strParams) diff --git a/IDE/src/util/Curl.bf b/IDE/src/util/Curl.bf index 4edf48fe..f95d4eb0 100644 --- a/IDE/src/util/Curl.bf +++ b/IDE/src/util/Curl.bf @@ -854,25 +854,25 @@ namespace CURL HTTP2Stream, /* 92 - stream error in HTTP/2 framing layer */ } - [CLink, StdCall] + [CLink, CallingConvention(.Stdcall)] static extern void* curl_easy_init(); - [CLink, StdCall] + [CLink, CallingConvention(.Stdcall)] static extern int curl_easy_setopt(void* curl, int option, int optVal); - [CLink, StdCall] + [CLink, CallingConvention(.Stdcall)] static extern void* curl_easy_duphandle(void* curl); - [CLink, StdCall] + [CLink, CallingConvention(.Stdcall)] static extern void* curl_easy_cleanup(void* curl); - [CLink, StdCall] + [CLink, CallingConvention(.Stdcall)] static extern int curl_easy_perform(void* curl); - [CLink, StdCall] + [CLink, CallingConvention(.Stdcall)] static extern void* curl_easy_getinfo(void* curl, Option option, void* ptr); - [CLink, StdCall] + [CLink, CallingConvention(.Stdcall)] static extern void* curl_easy_reset(void* curl); void* mCURL; diff --git a/IDE/src/util/Git.bf b/IDE/src/util/Git.bf index b0e73a4d..95461cb9 100644 --- a/IDE/src/util/Git.bf +++ b/IDE/src/util/Git.bf @@ -190,10 +190,10 @@ namespace IDE.Util } - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern void git_strarray_free(git_strarray *array); - [StdCall, CLink] + [CallingConvention(.Stdcall), CLink] public static extern int32 git_strarray_copy(git_strarray *tgt, git_strarray *src); /** Time in a signature */ @@ -604,16 +604,16 @@ namespace IDE.Util public void* remote_cb_payload; } - [CLink, StdCall] + [CLink, CallingConvention(.Stdcall)] public static extern int32 git_libgit2_init(); - [CLink, StdCall] + [CLink, CallingConvention(.Stdcall)] public static extern int32 git_libgit2_shutdown(); - [CLink, StdCall] + [CLink, CallingConvention(.Stdcall)] public static extern int32 git_clone(git_repository** repoOut, char8* url, char8* local_path, git_clone_options* options); - [CLink, StdCall] + [CLink, CallingConvention(.Stdcall)] public static extern void git_repository_free(git_repository *repo); } } diff --git a/IDE/src/util/Transfer.bf b/IDE/src/util/Transfer.bf index d56dae28..9420d1de 100644 --- a/IDE/src/util/Transfer.bf +++ b/IDE/src/util/Transfer.bf @@ -97,7 +97,7 @@ namespace IDE.Util UpdateBytesPerSecond(); } - [StdCall] + [CallingConvention(.Stdcall)] static int Callback(void *p, int dltotal, int dlnow, int ultotal, int ulnow) { Transfer transfer = (Transfer)Internal.UnsafeCastToObject(p); @@ -111,7 +111,7 @@ namespace IDE.Util return 0; } - [StdCall] + [CallingConvention(.Stdcall)] static int Write(void* dataPtr, int size, int count, void* ctx) { Transfer transfer = (Transfer)Internal.UnsafeCastToObject(ctx);