(Gast)
n/a Beiträge
|
Delphi nach C#
15. Aug 2011, 18:15
Delphi-Quellcode:
PBASSVIS_PLUGINS = ^TBASSVIS_PLUGINS;
TBASSVIS_PLUGINS = record
PluginHandle : HVIS; // Plugin Handle
PluginPath : string; // Plugin Name mit Pfad
PluginName : string; // Plugin Name ohne Pfad
ModuleCount : integer; // Module Preset Count
ModuleName : array of string; // Module Preset Name
end;
Mein Anfang!
Code:
[Serializable, StructLayout(LayoutKind.Sequential)]
public sealed class BASSVIS_PLUGINS
{
public int PluginHandle;
[MarshalAs(UnmanagedType.LPStr)]
public string PluginPath = string.Empty;
[MarshalAs(UnmanagedType.LPStr)]
public string PluginName = string.Empty;
public int ModuleCount;
[MarshalAs(UnmanagedType.LPStr)]
public string[,] ModuleName;
public BASSVIS_PLUGINS(BASSVIS_PLUGINS[,] Plugins)
{
}
}
Delphi-Quellcode:
function BASSVIS_GetPlugins(
Kind: TBASSVIS_KIND_T;
PluginPath: PAnsiChar;
Searchflags: DWORD
): TPlugins; stdcall; external dllfile;
Code:
//BASSVIS_GetPlugins
[return: MarshalAs(UnmanagedType.Struct)]
[DllImport("bass_vis.dll", EntryPoint = "BASSVIS_GetPlugins", CharSet = CharSet.Auto)]
private static extern BASSVIS_PLUGINS[,] BASSVIS_GetPlugins(BASSVISKind kind, [In, MarshalAs(UnmanagedType.LPStr)] string PluginPath, BASSVISFindFlags BASSVIS_FIND_DEFAULT);
TPlugins = array of TBASSVIS_PLUGINS
Code:
public BASSVIS_PLUGINS(BASSVIS_PLUGINS[,] Plugins)
EDIT:
Bin mir aber nicht sicher ob das alles seine richtigkeit hat.
gruss
Geändert von EWeiss (15. Aug 2011 um 19:18 Uhr)
|
|
Zitat
|