Comments (1)
已经上传至1.2.1 Release,请注意如果使用C#调用,则需要修改包装类如下代码所示,并启用C调用约定模式。
/// <summary>
/// NeteaseCrypt C# Wrapper
/// </summary>
class NeteaseCrypt
{
const string DLL_PATH = "libncmdump.dll";
[DllImport(DLL_PATH, CallingConvention = CallingConvention.Cdecl)]
private static extern IntPtr CreateNeteaseCrypt(IntPtr path);
[DllImport(DLL_PATH, CallingConvention = CallingConvention.Cdecl)]
private static extern int Dump(IntPtr NeteaseCrypt);
[DllImport(DLL_PATH, CallingConvention = CallingConvention.Cdecl)]
private static extern void FixMetadata(IntPtr NeteaseCrypt);
[DllImport(DLL_PATH, CallingConvention = CallingConvention.Cdecl)]
private static extern void DestroyNeteaseCrypt(IntPtr NeteaseCrypt);
private IntPtr NeteaseCryptClass = IntPtr.Zero;
/// <summary>
/// 创建 NeteaseCrypt 类的实例。
/// </summary>
/// <param name="FileName">网易云音乐 ncm 加密文件路径</param>
public NeteaseCrypt(string FileName)
{
NeteaseCryptClass = CreateNeteaseCrypt(Marshal.StringToHGlobalAuto(FileName));
}
/// <summary>
/// 启动转换过程。
/// </summary>
/// <returns>返回一个整数,指示转储过程的结果。如果成功,返回0;如果失败,返回1。</returns>
public int Dump()
{
return Dump(NeteaseCryptClass);
}
/// <summary>
/// 修复音乐文件元数据。
/// </summary>
public void FixMetadata()
{
FixMetadata(NeteaseCryptClass);
}
}
from ncmdump.
Related Issues (15)
- 保留文件时间戳 HOT 3
- macOS 下编译问题 HOT 1
- 文件名称中带有西语或特殊符号时反序列出错 HOT 1
- 建议增加从文件夹解密支持
- ncmdump.exe for windows直接运行无反应 HOT 2
- 是否可以支持dll HOT 6
- 是否可以支持指定输出目录 HOT 8
- MSVC Windows 版本不支持中文文件名 HOT 6
- [Bug] MSVC版本在处理特殊字符文件名出现问题 HOT 3
- [Bug] 文件夹或文件名中出现符号、部分日文等,会导致转换失败。 HOT 6
- [Bug] 文件被占用 HOT 5
- DoS attack caused by segmentation fault HOT 1
- DoS attack caused by memory exhaustion
- 怎么指定转换的格式为mp3或flac? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ncmdump.