Thursday, December 18, 2014

Visual Studio Find and Replace Regular Expressions / Suchen und Ersetzten mit Regulären Ausdrücken (regex)

auf gefunde Ausdrücke greift man mit z.b. \0 zu, \0 gibt den ersten gefunden Ausdruck zurück. möchte man z.b. in allen DllImport Statements ,CallingConvention=CallingConvention.Cdecl hinzufügen, bsp: [DllImport(DRIVER_DLL_NAME, EntryPoint = "is_StopLiveVideo")] suchen: EntryPoint.*" ersetzen: \0, CallingConvention=CallingConvention.Cdecl Ergebnis: [DllImport(DRIVER_DLL_NAME, EntryPoint = "is_StopLiveVideo",CallingConvention=CallingConvention.Cdecl)]

PInvokeStackImbalance was detected (c# / .net) - fix : CallingConvention.Cdecl

[DllImport(DRIVER_DLL_NAME, EntryPoint = "is_ClearSequence")] // is_ClearSequence private static extern int is_ClearSequence(int hCam); [DllImport(DRIVER_DLL_NAME, EntryPoint = "is_ClearSequence", CallingConvention = CallingConvention.Cdecl)] // is_ClearSequence private static extern int is_ClearSequence(int hCam);